Source for file pnadminapi.php
Documentation is available at pnadminapi.php
* Zikula Application Framework
* @copyright (c) 2002, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: pnadminapi.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Value_Addons
* @param int $cid client id
* @param int $idtype banner type id
* @param int $imptotal total impressions purchased
* @param string $imageurl source url of the banner image
* @param string $clickurl destination url for the banner
* @return string HTML output string
if (!isset ($args['cid']) ||
!isset ($args['idtype']) ||
!isset ($args['imptotal']) ||
!isset ($args['imageurl']) ||
!isset ($args['clickurl'])) {
$banner = array('cid' => $args['cid'],
'type' => $args['idtype'],
'imptotal' => $args['imptotal'],
'imageurl' => $args['imageurl'],
'clickurl' => $args['clickurl']);
// Return the id of the newly created item to the calling process
* @param int $bid banner id
* @param int $cid client id
* @param int $idtype banner type id
* @param int $impadded additional impressions purchased
* @param int $imptotal total impressions purchased
* @param string $imageurl source url of the banner image
* @param string $clickurl destination url for the banner
* @return string HTML output string
if (!isset ($args['bid']) ||
!isset ($args['idtype']) ||
!isset ($args['imptotal']) ||
!isset ($args['impadded']) ||
!isset ($args['imageurl']) ||
!isset ($args['clickurl'])) {
// Get the existing admin message
$banner = pnModAPIFunc('Banners', 'user', 'get', array('bid' => $args['bid']));
$banner = array('bid' => $args['bid'],
'type' => $args['idtype'],
'imptotal' => $args['imptotal'],
'imageurl' => $args['imageurl'],
'clickurl' => $args['clickurl']);
$banner['imptotal'] += $args['impadded'];
* @param int $bid banner id
* @return bool true on success, false on failure
if (!isset ($args['bid'])) {
// Get the existing admin message
$banner = pnModAPIFunc('Banners', 'user', 'get', array('bid' => $args['bid']));
// Let the calling process know that we have finished successfully
* delete all banners for a client
* @param int $cid client id
* @return bool true on success, false on failure
if (!isset ($args['cid'])) {
// Let the calling process know that we have finished successfully
/********************* client functions *************************/
* @param int $cname client name
* @param int $contact client contact name
* @param int $email client contact e-mail
* @param string $login client login name
* @param string $password client login password
* @param string $extrainfo additional client info
* @return mixed int client id if successful, false otherwise
if (!isset ($args['cname']) ||
!isset ($args['contact']) ||
!isset ($args['email']) ||
!isset ($args['login']) ||
!isset ($args['passwd']) ||
!isset ($args['extrainfo'])) {
$client = array('name' => $args['cname'],
'contact' => $args['contact'],
'email' => $args['email'],
'login' => $args['login'],
'passwd' => $args['passwd'],
'extrainfo' => $args['extrainfo']);
// Return the id of the newly created item to the calling process
* @param int $cid client id
* @param int $cname client name
* @param int $contact client contact name
* @param int $email client contact e-mail
* @param string $login client login name
* @param string $password client login password
* @param string $extrainfo additional client info
* @return bool true if successful, false otherwise
if (!isset ($args['cid']) ||
!isset ($args['cname']) ||
!isset ($args['contact']) ||
!isset ($args['email']) ||
!isset ($args['login']) ||
!isset ($args['passwd']) ||
!isset ($args['extrainfo'])) {
// Get the existing admin message
$client = pnModAPIFunc('Banners', 'user', 'getclient', array('cid' => $args['cid']));
// create the new item array
$client = array('cid' => $args['cid'],
'name' => $args['cname'],
'contact' => $args['contact'],
'email' => $args['email'],
'login' => $args['login'],
'passwd' => $args['passwd'],
'extrainfo' => $args['extrainfo']);
* @param int $cid client id
* @return bool true on success, false on failure
if (!isset ($args['cid'])) {
// Get the existing admin message
$client = pnModAPIFunc('Banners', 'user', 'getclient', array('cid' => $args['cid']));
// delete any banners for this client first
if (!pnModAPIFunc('Banners', 'admin', 'deleteall', array('cid' => $args['cid']))) {
// Let the calling process know that we have finished successfully
/******************* finished banners functions ************************/
* delete a finished banner
* @param int $bid banner id
* @return bool true on success, false on failure
if (!isset ($args['bid'])) {
// Get the existing admin message
$banner = pnModAPIFunc('Banners', 'user', 'getfinished', array('bid' => $args['bid']));
// Let the calling process know that we have finished successfully
* get available admin panel links
* @return array array of admin links
|