Esempio n. 1
0
        case "BannersAdd":
            BannersAdd($name, $cid, $imptotal, $imageurl, $clickurl, $alttext, $type, $active);
            break;
        case "BannerAddClient":
            BannerAddClient($name, $contact, $email, $login, $passwd, $extrainfo);
            break;
        case "BannerDelete":
            BannerDelete($bid, $ok);
            break;
        case "BannerEdit":
            BannerEdit($bid);
            break;
        case "BannerChange":
            BannerChange($bid, $cid, $imptotal, $impadded, $imageurl, $clickurl, $alttext, $type, $active);
            break;
        case "BannerClientDelete":
            BannerClientDelete($cid, $ok);
            break;
        case "BannerClientEdit":
            BannerClientEdit($cid);
            break;
        case "BannerClientChange":
            BannerClientChange($cid, $name, $contact, $email, $extrainfo, $login, $passwd);
            break;
        case "BannerStatus":
            BannerStatus($bid, $status);
            break;
    }
} else {
    echo "Access Denied";
}
Esempio n. 2
0
     $imageurl = isset($_POST['imageurl']) ? trim($_POST['imageurl']) : '';
     $clickurl = isset($_POST['clickurl']) ? trim($_POST['clickurl']) : '';
     $imptotal = isset($_POST['imptotal']) ? intval($_POST['imptotal']) : 0;
     $impadded = isset($_POST['impadded']) ? intval($_POST['impadded']) : 0;
     $htmlbanner = isset($_POST['htmlbanner']) ? intval($_POST['htmlbanner']) : 0;
     $htmlcode = isset($_POST['htmlcode']) ? trim($_POST['htmlcode']) : '';
     $db =& Database::getInstance();
     $myts =& MyTextSanitizer::getInstance();
     $sql = sprintf("UPDATE %s SET cid = %d, imptotal = %d, imageurl = %s, clickurl = %s, htmlbanner = %d, htmlcode = %s WHERE bid = %d", $db->prefix("banner"), $cid, $imptotal + $impadded, $db->quoteString($myts->stripSlashesGPC($imageurl)), $db->quoteString($myts->stripSlashesGPC($clickurl)), $htmlbanner, $db->quoteString($myts->stripSlashesGPC($htmlcode)), $bid);
     $db->query($sql);
     redirect_header("admin.php?fct=banners&op=BannersAdmin#top", 1, _AM_DBUPDATED);
     break;
 case "BannerClientDelete":
     $cid = isset($_GET['cid']) ? intval($_GET['cid']) : 0;
     if ($cid > 0) {
         BannerClientDelete($cid);
     }
     break;
 case "BannerClientDelete2":
     $cid = isset($_POST['cid']) ? intval($_POST['cid']) : 0;
     $db =& Database::getInstance();
     if ($cid <= 0 || !xoops_confirm_validate()) {
         redirect_header("admin.php?fct=banners&amp;op=BannersAdmin#top");
     }
     $sql = sprintf("DELETE FROM %s WHERE cid = %u", $db->prefix("banner"), $cid);
     $db->query($sql);
     $sql = sprintf("DELETE FROM %s WHERE cid = %u", $db->prefix("bannerclient"), $cid);
     $db->query($sql);
     redirect_header("admin.php?fct=banners&amp;op=BannersAdmin#top", 1, _AM_DBUPDATED);
     break;
 case "BannerClientEdit":
Esempio n. 3
0
										htmlcode = %s WHERE bid = '%d'",
						$db->prefix('banner'),
						$cid,
						$imptotal + $impadded,
						$db->quoteString(icms_core_DataFilter::stripSlashesGPC($imageurl)),
						$db->quoteString(icms_core_DataFilter::stripSlashesGPC($clickurl)),
						$htmlbanner,
						$db->quoteString(icms_core_DataFilter::stripSlashesGPC($htmlcode)),
						$bid
					);
		$db->query($sql);
		redirect_header('admin.php?fct=banners&amp;op=BannersAdmin#top', 1, _AM_DBUPDATED);
		break;

	case 'BannerClientDelete':
		if ($cid > 0) {BannerClientDelete($cid);}
		break;

	case 'BannerClientDelete2':
		$db =& icms_db_Factory::instance();
		if ($cid <= 0 | !icms::$security->check()) {
			redirect_header('admin.php?fct=banners&amp;op=BannersAdmin#top', 3, implode('<br />', icms::$security->getErrors()));
		}
		$sql = sprintf("DELETE FROM %s WHERE cid = '%u'", $db->prefix('banner'), $cid);
		$db->query($sql);
		$sql = sprintf("DELETE FROM %s WHERE cid = '%u'", $db->prefix('bannerclient'), $cid);
		$db->query($sql);
		redirect_header('admin.php?fct=banners&amp;op=BannersAdmin#top', 1, _AM_DBUPDATED);
		break;

	case 'BannerClientEdit':