示例#1
0
$header_outofbound = new clsheader_outofbound("../../../includes/", "header_outofbound", $MainPage);
$header_outofbound->Initialize();
$footer = new clsfooter("../../../includes/", "footer", $MainPage);
$footer->Initialize();
$MainPage->header_outofbound =& $header_outofbound;
$MainPage->footer =& $footer;
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
if ($Charset) {
    header("Content-Type: " . $ContentType . "; charset=" . $Charset);
} else {
    header("Content-Type: " . $ContentType);
}
//End Initialize Objects
//Initialize HTML Template @1-50A154CB
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
if (strlen($TemplateSource)) {
    $Tpl->LoadTemplateFromStr($TemplateSource, $BlockToParse, "UTF-8");
} else {
    $Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8");
}
$Tpl->SetVar("CCS_PathToRoot", $PathToRoot);
$Tpl->block_path = "/{$BlockToParse}";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "../../../");
$Attributes->Show();
//End Initialize HTML Template
//Execute Components @1-03EC4543
$footer->Operations();
$header_outofbound->Operations();
//End Execute Components
示例#2
0
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-332FBF3C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($_POST["truncate"]) {
    $db = new clsDBDBNetConnect();
    $query = "TRUNCATE TABLE `listing_index`";
    $db->query($query);
    header("Location: ReIndex.php?truncatedone=1");
    exit;
}
$options = "";
$db = new clsDBNetConnect();
$query = "Select `ItemNum`, `title`, `itemID` from items where status = 1 order by `title` asc";
$db->query($query);
$i = 0;
示例#3
0
文件: index.php 项目: shifter/ospap2
 if (!isset($_SESSION['objUser'])) {
     $objUser = clsUser::getCookie();
 } else {
     $objUser = $_SESSION['objUser'];
 }
 /* This re-loads the user object in case it's changed. */
 if ($objUser) {
     $objUser = new clsUser($objUser->get('id'));
 }
 if ($objUser && $objUser->isNew()) {
     $objUser = null;
 }
 if (!preg_match('/^[a-zA-Z2-9_-]*$/', $strAction)) {
     throw new Exception(ERRORMSG_INVALID);
 }
 $objTemplate = new clsTemplate('default');
 $objTemplate->setText('SCRIPT', clsDB::initializeJS());
 $objTemplate->setText('TITLE', "OSPAP2");
 /* Inline CSS for advanced. */
 $objTemplate->setText('HEAD', clsUser::getAdvancedStyle($objUser));
 if (isset($_REQUEST['error']) && isset($arrMessages[$_REQUEST['error']])) {
     $objTemplate->setText('ERROR', $arrMessages[$_REQUEST['error']]);
 } else {
     if (isset($_REQUEST['message']) && isset($arrMessages[$_REQUEST['message']])) {
         $objTemplate->setText('MESSAGE', $arrMessages[$_REQUEST['message']]);
     }
 }
 $objTemplate->setScript('MENU', 'menu');
 $objTemplate->setScript('LOGO', 'logo');
 $objTemplate->setText('COPYRIGHT', "Written by <a href='mailto:ronospap@skullsecurity.org'>Ron</a>. This page and code are public domain. Code is available upon request. No warranty or promises of any kind.");
 switch ($strAction) {
    if ($Script != "") {
        $ScriptIncludes = $ScriptIncludes . "<script src=\"" . $PathToRoot . $Script . "\" type=\"text/javascript\"></script>\n";
    }
}
$Attributes->SetValue("scriptIncludes", $ScriptIncludes);
BindEvents();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
if ($Charset) {
    header("Content-Type: " . $ContentType . "; charset=" . $Charset);
} else {
    header("Content-Type: " . $ContentType);
}
//End Initialize Objects
//Initialize HTML Template @1-A7427295
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
if (strlen($TemplateSource)) {
    $Tpl->LoadTemplateFromStr($TemplateSource, $BlockToParse, "CP1252");
} else {
    $Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "CP1252");
}
$Tpl->SetVar("CCS_PathToRoot", $PathToRoot);
$Tpl->SetVar("CCS_PathToMasterPage", RelativePath . $PathToCurrentMasterPage);
$Tpl->block_path = "/{$BlockToParse}";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "../");
$Attributes->Show();
//End Initialize HTML Template
//Execute Components @1-93DAD1DB
$MasterPage->Operations();
$modal_end->Operations();
示例#5
0
//End Initialize Objects
//Execute Components @1-B06FCBC8
$Header->Operations();
$itemsSearch->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
//include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
$Tpl->SetVar("QueryString", CCGetQueryString("QueryString", array()));
//Show Page @1-7E62AA77
$Header->Show("Header");
$itemsSearch->Show();
$categories->Show();
$items->Show();
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
if ($file != "templates/ViewCat.html") {
    unlink($file);
示例#6
0
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-332FBF3C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($_GET["generate"]) {
    print "Generating...<br>";
    $catlist = new clsDBNetConnect();
    $catlist->query("select * from categories where sub_cat_id=1");
    while ($catlist->next_record()) {
        $cats[$catlist->f("cat_id")] = $catlist->f("name");
        $catlist2 = new clsDBNetConnect();
        $catlist2->query("select * from categories where sub_cat_id=" . $catlist->f("cat_id"));
        while ($catlist2->next_record()) {
            $cats[$catlist2->f("cat_id")] = $cats[$catlist->f("cat_id")] . " > " . $catlist2->f("name");
            $catlist3 = new clsDBNetConnect();
            $catlist3->query("select * from categories where sub_cat_id=" . $catlist2->f("cat_id"));
示例#7
0
$Header->Operations();
$Footer->Operations();
//End Execute Components

//Go to destination page @1-BEB91355
if($Redirect)
{
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page

//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
if ($_GET["id"] && !$_GET["submit"]){
	$db = new clsDBNetConnect;
	$query = "select * from feedback where `counter` = '" . $_GET["id"] . "'";
	$db->query($query);
	if (!$db->next_record()){
		$query = "select * from feedback where id = '" . $_GET["id"] . "' and being_rated = '" . CCGetUserID() . "'";
		$db->query($query);
		if ($db->next_record()){
			if ($db->f("rating") == 1)
			    $ratetext = "Positive";
	        if ($db->f("rating") == 0)
			    $ratetext = "Neutral";
示例#8
0
//Execute Components @1-12EAE39F
$Header->Operations();
$charges->Operation();
$charges1->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
$Tpl->setVar("ItemNum", CCGetSession("RecentItemNum"));
$Tpl->setVar("finalcat", $finalcat);
//Show Page @1-C99B99CD
$Header->Show("Header");
$charges->Show();
$charges1->Show();
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
示例#9
0
//Execute Components @1-FC6178F0
$Header->Operations();
$charges1->Operation();
$PayPalPay->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($_GET["ItemNum"]) {
    $db = new clsDBNetConnect();
    $query = "select * from items where ItemNum = '" . mysql_escape_string($_GET["ItemNum"]) . "'";
    $db->query($query);
    if ($db->next_record()) {
        $Tpl->SetVar("ItemNum", $_GET["ItemNum"]);
        $Tpl->SetVar("amount", $db->f("amt_due"));
        $Tpl->SetVar("charge", $db->f("amt_due"));
    }
}
//Show Page @1-39CAA23C
示例#10
0
 public function display($objUser)
 {
     $objAlbumOwner = $this->getForeignObject('user');
     $intPictureCount = sizeof($this->getPictures());
     $intSubAlbumCount = sizeof($this->getSubAlbums($objUser));
     if ($intPictureCount == 0 && $intAlbumCount == 0 && $objUser && $objUser->get('show_empty') == 0) {
         return '';
     }
     $objAlbumTemplate = new clsTemplate('album');
     $objAlbumTemplate->setText('NAME', "<a href='index.php?action=albums&" . $this->getIDPair() . "' class='albumentrylink'>" . $this->get('name') . "</a> " . $this->getNewIcon($objUser));
     $objAlbumTemplate->setText('ID', $this->get('id'));
     $objAlbumTemplate->setText('USERNAME', $objAlbumOwner->get('username'));
     $objAlbumTemplate->setText('CAPTION', bbcode_format($this->get('caption')));
     $objAlbumTemplate->setText('EXPANDCLICK', "toggle_album(\"" . $this->get('id') . "\");");
     $objAlbumTemplate->setText('LASTUPDATED', $this->getLastUpdated());
     $objAlbumTemplate->setText('PICTURECOUNT', $intPictureCount);
     $objAlbumTemplate->setText('ALBUMCOUNT', $intSubAlbumCount);
     if ($intPictureCount == 0 && $intSubAlbumCount == 0) {
         $objAlbumTemplate->setText('ISEMPTY', '(empty)');
     }
     $strPreview = "";
     $arrPictures = $this->getTopPictures(ALBUM_NUMPREVIEW);
     foreach ($arrPictures as $objPicture) {
         $objAlbumTemplate->setText('PREVIEW', $objPicture->getHtmlThumbnail(ALBUM_PREVIEWSIZE, ALBUM_PREVIEWSIZE));
     }
     print $objAlbumTemplate->get();
 }
示例#11
0
//End Initialize Objects
//Execute Components @1-9D3C7E64
$Header->Operations();
$usercontrol->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
$subscriptions = subscription_membership(CCGetUserID(), "icontext", "<br><br>", "1");
$Tpl->setVar("subscriptions", $subscriptions);
//Show Page @1-BE2A4A0B
$Header->Show("Header");
$usercontrol->Show();
$Logout->Show();
$emails->Show();
$watchlist->Show();
$items->Show();
$Footer->Show("Footer");
$Tpl->PParse("main", false);
示例#12
0
$Footer->Initialize();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-351F985C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
//Show Page @1-F9F38336
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->setVar("cattable", $cattable);
$Tpl->setVar("catlinks", $links);
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
示例#13
0
文件: upload.php 项目: shifter/ospap2
    }
    /* Make sure that users can only edit their own pictures. */
    $objPicture->delete();
    $objPicture->save();
    header("Location: index.php?action=upload&subaction=preview");
}
if ($strSubAction == 'preview') {
    $objTemplate->setText('PAGETITLE', "Pending Pictures");
    $objBreadcrumbs->add('Upload', 'index.php?action=upload');
    $objBreadcrumbs->add('Pending', 'index.php?action=upload&subaction=preview');
    $arrPictures = clsPicture::getPending($objUser);
    print "You have <strong>" . sizeof($arrPictures) . "</strong> pictures waiting for attention" . ($objUser ? "" : " (note: unsaved images from all guests will appear here)") . ":<br><br>";
    foreach ($arrPictures as $objPicture) {
        $objPicture = new clsPicture($objPicture->get('id'));
        $objAlbum = new clsAlbum($objPicture->get('album_id'));
        $objTemplate = new clsTemplate('preview');
        $objTemplate->setText('HIDDEN', $objPicture->getHiddenField('id'));
        $objTemplate->setText('ALBUM', $objPicture->getCombo('album_id', clsDB::getOptionsFromList($objAlbum->getPostableAlbums($objUser), 'name', 'id', "Select an album")));
        $objTemplate->setText('ID', $objPicture->get('id'));
        $objTemplate->setText('IMAGE', $objPicture->getHtmlThumbnail(250, 250));
        /* TODO: Customizable? */
        $objTemplate->setText('NAME', $objPicture->get('original_name'));
        $objTemplate->setText('WIDTH', $objPicture->get('width'));
        $objTemplate->setText('HEIGHT', $objPicture->get('height'));
        $objTemplate->setText('SAVEDELETE', $objPicture->getCombo('subaction', array('confirm' => 'Keep', 'delete' => 'Don\'t keep'), null, true));
        $objTemplate->setText('TITLE', $objPicture->getTextField('title'));
        $objTemplate->setText('CAPTION', $objPicture->getTextArea('caption'));
        $objTemplate->setText('SUBMIT', $objPicture->getSubmit('Save'));
        print $objTemplate->get();
    }
}
示例#14
0
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-351F985C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
//Show Page @1-F9F38336
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->setVar("inherited", $inherited);
$Tpl->setVar("thiscat", $thiscat);
$Tpl->setVar("name", stripslashes($_POST["name"]));
$Tpl->setVar("template_var", stripslashes($_POST["template_var"]));
$Tpl->setVar("description", stripslashes($_POST["description"]));
$Tpl->setVar("cat", $_REQUEST["cat"]);
$Tpl->setVar("field", $_REQUEST["field"]);
$Tpl->setVar("catname", stripslashes($catname));
$Tpl->setVar("error", $error);
示例#15
0
            header("Location: index.php?action=picture&" . $objPrevPicture->getIDPair());
        } else {
            if ($objNextPicture) {
                header("Location: index.php?action=picture&" . $objNextPicture->getIDPair());
            } else {
                header("Location: index.php?action=albums&" . $objAlbum->getIDPair());
            }
        }
    }
}
if ($strSubAction == 'edit') {
    if (!$objPicture->canEdit($objUser)) {
        throw new Exception('exception_accessdenied');
    }
    $objTemplate->setText('PAGETITLE', "Editing " . $objPicture->get('title'));
    $objEditTemplate = new clsTemplate('editpicture');
    $objEditTemplate->setText('HIDDEN', "<input type='hidden' name='action'    value='picture'>");
    $objEditTemplate->setText('HIDDEN', "<input type='hidden' name='subaction' value='save'>");
    $objEditTemplate->setText('HIDDEN', $objPicture->getHiddenField('id'));
    $objEditTemplate->setText('ID', $objPicture->get('id'));
    $objEditTemplate->setText('WIDTH', $objPicture->get('width'));
    $objEditTemplate->setText('HEIGHT', $objPicture->get('height'));
    $objEditTemplate->setText('IMAGE', $objPicture->getHtmlThumbnail(250, 250));
    $objEditTemplate->setText('ALBUM', $objAlbum->get('name'));
    $objEditTemplate->setText('TITLE', $objPicture->getTextField('title'));
    $objEditTemplate->setText('CAPTION', $objPicture->getTextArea('caption', 4, 45));
    $objEditTemplate->setText('CONFIRMED', $objPicture->getCheckNoJavascript('confirmed'));
    $objEditTemplate->setText('SUBMIT', $objPicture->getSubmit('Save'));
    print $objEditTemplate->get();
}
if ($strSubAction == 'save') {
示例#16
0
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-AB1E45CE
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($_GET["code"] && !$_GET["Cancel"]) {
    $error = "";
    $query = "Select * from coupons where code='" . mysql_escape_string($_GET["code"]) . "'";
    $db = new clsDBNetConnect();
    $db->query($query);
    if ($db->next_record()) {
        if (time() < $db->f("start")) {
            $error = "This Coupon Has Not Started Yet";
        }
        if (time() > $db->f("end")) {
            $error = "This Coupon Has Expired";
示例#17
0
文件: groups.php 项目: shifter/ospap2
    foreach ($arrInvitedUsers as $objMember) {
        $str = '';
        $str .= "<tr>";
        $str .= "<td><a href='index.php?action=members&subaction=view&" . $objMember->getIDPair() . "'>" . $objMember->get('username') . "</a></td>";
        $str .= "<td>Awaiting Acceptance</td>";
        $str .= "</tr>";
        $objGroupTemplate->setText('PENDING', $str);
    }
    print $objGroupTemplate->get();
}
if ($strSubAction == 'edit') {
    if (!$objGroup->canEdit($objUser)) {
        throw new Exception('exception_accessdenied');
    }
    $objTemplate->setText('PAGETITLE', "Editing Group: " . $objGroup->get('name'));
    $objGroupTemplate = new clsTemplate('editgroup');
    $objGroupTemplate->setText('HIDDEN', $objGroup->getHiddenField('id'));
    $objGroupTemplate->setText('HIDDEN', "<input type='hidden' name='action'    value='groups'>");
    $objGroupTemplate->setText('HIDDEN', "<input type='hidden' name='subaction' value='save'>");
    $objGroupTemplate->setText('NAME', $objGroup->getTextField('name'));
    $objGroupTemplate->setText('ISPRIVATE', $objGroup->getCheckNoJavascript('is_private'));
    $objGroupTemplate->setText('ISHIDDEN', $objGroup->getCheckNoJavascript('is_hidden'));
    $objGroupTemplate->setText('SAVE', $objGroup->getSubmit('Save'));
    print $objGroupTemplate->get();
}
if ($strSubAction == 'save') {
    if (!$objGroup->canEdit($objUser)) {
        throw new Exception('exception_accessdenied');
    }
    $objGroup->getFromRequest(array('id', 'name', 'is_private', 'is_hidden'));
    if ($objGroup->isNew()) {
示例#18
0
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-351F985C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($_POST["preview"]) {
    $name = PreviewTemplate($_GET["page"]);
    $JS = "<SCRIPT LANGUAGE=\"JavaScript\">\n<!--\nwindow.open('../" . $phppage . "&prev=" . $name . "','Ad','toolbar=1,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=800,height=600');\n-->\n</script>";
    $Tpl->setVar("JS", $JS);
}
//Show Page @1-F9F38336
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->setVar("textareavalue", htmlspecialchars($textareavalue));
if ($_POST["page_temp"]) {
    $Tpl->setVar("textareavalue", htmlspecialchars(stripslashes($_POST["page_temp"])));
}
示例#19
0
        $objMemberTemplate->setText('PASSWORD2', $objMember->getPasswordField('password2'));
        $objMemberTemplate->setText('EMAIL', $objMember->getTextField('email'));
        $objMemberTemplate->setText('ADVANCED', $objMember->getCheckNoJavascript('is_advanced'));
        $objMemberTemplate->setText('SHOWEMPTY', $objMember->getCheckNoJavascript('show_empty'));
        $objMemberTemplate->setText('REMEMBERFILTER', $objMember->getCheckNoJavascript('remember_filter'));
        $objMemberTemplate->setText('REALNAME', $objMember->getTextField('realname'));
        $objMemberTemplate->setText('LOCATION', $objMember->getTextField('location'));
        $objMemberTemplate->setText('SAVE', $objMember->getSubmit('Save'));
        if (!$objMember->isNew()) {
            $objMemberTemplate->setText('BLANK', "(Blank not to change it.)");
        }
        print $objMemberTemplate->get();
    } else {
        $objTemplate->setText('PAGETITLE', 'Viewing ' . $objMember->get('username'));
        $objBreadcrumbs->add($objMember->get('username'), "index.php?action=members&subaction=view&" . $objMember->getIDPair());
        $objMemberTemplate = new clsTemplate('viewuser');
        $objMemberTemplate->setText('USERNAME', $objMember->get('username'));
        $objMemberTemplate->setText('REALNAME', $objMember->get('realname'));
        $objMemberTemplate->setText('LOCATION', $objMember->get('location'));
        print $objMemberTemplate->get();
    }
}
if ($strSubAction == 'save') {
    if (!clsUser::canEdit($objMember, $objUser)) {
        throw new Exception('exception_accessdenied');
    }
    $objMember->getFromRequest(array('id', 'username', 'password1', 'password2', 'email', 'is_advanced', 'show_empty', 'remember_filter', 'realname', 'location'));
    if ($objMember->isNew()) {
        $ret = $objMember->attemptCreate();
        if (is_string($ret)) {
            $objMember->remove('password1');
示例#20
0
文件: phpads.php 项目: 4v4t4r/CTF-LCC
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-351F985C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
$db = new clsDBNetConnect();
@$db->query("show tables like \"phpads_zones\"");
if ($db->next_record()) {
    if (file_exists("../phpads/index.php")) {
        $Tpl->SetVar("phpadsinstall", "<a class=\"ItechClsDataLink\" href=\"../phpads/\">Continue to the phpAdsNew Installer</a>");
    } else {
        $Tpl->SetVar("phpadsinstall", "Please Double Check Steps 2 and 3.  This will turn to the installation link when the /phpads/ directory has been properly uploaded");
    }
} else {
    $Tpl->SetVar("phpadsinstall", "Once steps 1-3 above have been properly executed this will turn into a 'Continue with Installation' link");
}
//Show Page @1-F9F38336
示例#21
0
    } else {
        if ($strSubAction == 'delete') {
            if (!$objComment->canDelete($objUser)) {
                throw new Exception('exception_accessdenied');
            }
            $objComment->delete();
            $objComment->save();
            header("Location: index.php?action=picture&" . $objPicture->getIDPair());
        } else {
            if ($strSubAction = 'viewnew') {
                if (!$objUser) {
                    throw new Exception('exception_accessdenied');
                }
                $arrComments = clsComment::getNewComments($objUser);
                foreach ($arrComments as $objComment) {
                    $objComment = new clsComment($objComment->get('id'));
                    $objPicture = new clsPicture($objComment->get('picture_id'));
                    $objCommentTemplate = new clsTemplate('newcomment');
                    $objCommentTemplate->setText('IMAGE', "<a href='index.php?action=picture&" . $objPicture->getIDPair() . "'>" . $objPicture->getHtmlThumbnail(128, 128) . "</a>");
                    $objCommentTemplate->setText('TITLE', $objComment->get('title') . ' ' . $objComment->getNewIcon($objUser));
                    $objCommentTemplate->setText('USERNAME', $objComment->getUsername());
                    $objCommentTemplate->setText('DATE', time_to_text(strtotime($objComment->get('date'))));
                    $objCommentTemplate->setText('TEXT', bbcode_format($objComment->get('text')));
                    print $objCommentTemplate->get();
                    /* Mark the comment as viewed */
                    $objComment->setViewed($objUser);
                }
            }
        }
    }
}
示例#22
0
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-351F985C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
//Show Page @1-A1828728
$Header->Show("Header");
$lookup_countries->Show();
$Footer->Show("Footer");
$Tpl->PParse("main", false);
//End Show Page
//Unload Page @1-AB7622EF
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
unset($Tpl);
//End Unload Page
?>
示例#23
0
文件: news.php 项目: shifter/ospap2
    if ($strSubAction == 'archive') {
        $arrNews = clsDB::getListStatic('news', "", 'date', 'DESC');
    } else {
        $arrNews = clsDB::getListStatic('news', "", 'date', 'DESC', 0, 5);
        $objMiniMenu->add('News Archive', 'index.php?subaction=archive');
    }
    if ($objUser && $objUser->get('is_admin')) {
        $objMiniMenu->add('Post News', 'index.php?subaction=edit');
    }
    $objMiniMenu->add('Upload Image', 'index.php?action=upload');
    $objMiniMenu->add('Pending Uploads', 'index.php?action=upload&subaction=preview');
    foreach ($arrNews as $objNews) {
        if ($objUser && $objUser->get('is_admin')) {
            $objNewsTemplate = new clsTemplate('newsitemadmin');
        } else {
            $objNewsTemplate = new clsTemplate('newsitem');
        }
        $objNewsUser = $objNews->getForeignObject('user');
        $objAlbum = $objNews->getForeignObject('album');
        $objNewsTemplate->setText('ID', $objNews->get('id'));
        $objNewsTemplate->setText('USERID', $objNewsUser->get('id'));
        $objNewsTemplate->setText('USERNAME', $objNewsUser->get('username'));
        $objNewsTemplate->setText('DATE', date('Y-m-d', strtotime($objNews->get('date'))));
        $objNewsTemplate->setText('TITLE', $objNews->get('title'));
        $objNewsTemplate->setText('TEXT', bbcode_format($objNews->get('text')));
        echo $objNewsTemplate->get();
    }
} else {
    if (!$objUser || $objUser->get('is_admin') != 1) {
        throw new Exception("exception_accessdenied");
    }
示例#24
0
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-351F985C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
//Show Page @1-F9F38336
$Header->Show("Header");
$Footer->Show("Footer");
$Tpl->SetVar("GroupOptions", $groupoptions);
$Tpl->SetVar("NotInGroup", $notinoptions);
$Tpl->SetVar("InGroup", $inoptions);
$Tpl->SetVar("selected", $selected);
$Tpl->SetVar("GroupName", $name);
$Tpl->SetVar("GroupDesc", $description);
$Tpl->SetVar("GroupNameTitle", "<font class=\"ItechClsFormHeaderFont\">The \"" . $name . "\" Group Has Access to These Categories</font>");
$Tpl->PParse("main", false);
//End Show Page
示例#25
0
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-332FBF3C
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
/*
$options = "";
$db = new clsDBNetConnect;
$query = "Select `ItemNum`, `title` from items where status = 1 order by `title` asc";
$db->query($query);
while ($db->next_record()){
	$options .= "<option value=\"" . $db->f("ItemNum") . "\">" . $db->f("ItemNum") . " - " . $db->f("title") . "</option>\n";
}
$Tpl->setVar("item_Options", $options);
*/
if ($_GET["execute"]) {
    $itemcats[] = '';
示例#26
0
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize");
//End Initialize Objects
//Execute Components @1-9D3C7E64
$Header->Operations();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
if ($error) {
    $Tpl->SetBlockVar("Error", "");
    $Tpl->parse("Error", "");
}
$db = new clsDBNetConnect();
$query = "select sum(rating) from feedback where being_rated = '" . $_GET["user_id"] . "' and `counter` IS NULL";
$db->query($query);
if ($db->next_record()) {
    $rating = $db->f("sum(rating)");
} else {
    $rating = 0;
示例#27
0
文件: albums.php 项目: shifter/ospap2
 /* A tiny kludge, but it could be worse. This allows us to use these objects without conflicting names. */
 $objAlbumGuest->setName('albumpolicy_guest');
 $objAlbumMember->setName('albumpolicy_member');
 $objAlbumGroup->setName('albumpolicy_group');
 /* Set the default width, height, and mime. */
 if ($objAlbum->get('max_width', DEFAULT_X, true) == '') {
     $objAlbum->set('max_width', DEFAULT_X);
 }
 if ($objAlbum->get('max_height', DEFAULT_Y, true) == '') {
     $objAlbum->set('max_height', DEFAULT_Y);
 }
 if ($objAlbum->get('mime', DEFAULT_MIME, true) == '') {
     $objAlbum->set('mime', DEFAULT_MIME);
 }
 /* The template that looks after the edit page. */
 $objEditTemplate = new clsTemplate('editalbum');
 $objEditTemplate->setText('HIDDEN', $objAlbum->getHiddenField('id'));
 $objEditTemplate->setText('HIDDEN', $objAlbumGuest->getHiddenField('id'));
 $objEditTemplate->setText('HIDDEN', $objAlbumMember->getHiddenField('id'));
 $objEditTemplate->setText('HIDDEN', $objAlbumGroup->getHiddenField('id'));
 $objEditTemplate->setText('HIDDEN', $objAlbum->getHiddenField('album_id'));
 $objEditTemplate->setText('HIDDEN', "<input type='hidden' name='action' value='albums'>");
 $objEditTemplate->setText('HIDDEN', "<input type='hidden' name='subaction' value='save'>");
 $objEditTemplate->setText('MAXWIDTH', MAX_X);
 $objEditTemplate->setText('MAXHEIGHT', MAX_Y);
 $objEditTemplate->setText('NAME', $objAlbum->getTextField('name', new clsParameters('SIZE', 40)));
 $objEditTemplate->setText('PARENT', $objParent->isNew() ? "n/a" : $objParent->get('name'));
 $objEditTemplate->setText('GROUP', $objAlbum->getCombo('group_id', clsDB::getOptionsFromList(clsGroup::getGroups($objUser), 'name', 'id', "No group.")));
 $objEditTemplate->setText('CAPTION', $objAlbum->getTextArea('caption', 4, 45));
 $objEditTemplate->setText('EXPORTKEY', $objAlbum->getTextField('export_tag', new clsParameters('SIZE', 4)));
 $objEditTemplate->setText('WIDTH', $objAlbum->getTextField('max_width', new clsParameters('SIZE', 3)));
$MainPage->Attributes =& $Attributes;
// Controls
$t_order_log_kronologisForm =& new clsRecordt_order_log_kronologisForm("", $MainPage);
$MainPage->t_order_log_kronologisForm =& $t_order_log_kronologisForm;
$t_order_log_kronologisForm->Initialize();
BindEvents();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
if ($Charset) {
    header("Content-Type: " . $ContentType . "; charset=" . $Charset);
} else {
    header("Content-Type: " . $ContentType);
}
//End Initialize Objects
//Initialize HTML Template @1-52F9C312
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "CP1252");
$Tpl->block_path = "/{$BlockToParse}";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "../");
$Attributes->Show();
//End Initialize HTML Template
//Execute Components @1-067C5593
$t_order_log_kronologisForm->Operation();
//End Execute Components
//Go to destination page @1-E75D8FC8
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
    $DBConnSIKP->close();
    header("Location: " . $Redirect);
    unset($t_order_log_kronologisForm);
示例#29
0
文件: search.php 项目: 4v4t4r/CTF-LCC
//End Initialize Objects
//Execute Components @1-B06FCBC8
$Header->Operations();
$itemsSearch->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-BEB91355
if ($Redirect) {
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload");
    header("Location: " . $Redirect);
    exit;
}
//End Go to destination page
//Initialize HTML Template @1-A0111C9D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView");
$Tpl = new clsTemplate();
include './Lang/lang_class.php';
$Tpl->LoadTemplate(TemplatePath . $TemplateFileName, "main");
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow");
//End Initialize HTML Template
//BEGIN CUSTOM FIELDS BUILD CODE//
if ($_REQUEST["CatID"]) {
    $finalcat = $_REQUEST["CatID"];
} else {
    $finalcat = "1";
}
$cats = "(";
$db = new clsDBNetConnect();
$query = "select * from categories where cat_id='" . $finalcat . "'";
$db->query($query);
$db->next_record();