sql_fetchrow($db->sql_query("SELECT title, admins FROM ".$prefix."_modules WHERE title='Classifieds'")); $row2 = $db->sql_fetchrow($db->sql_query("SELECT name, radminsuper FROM ".$prefix."_authors WHERE aid='$aid'")); $admins = explode(",", $row['admins']); $auth_user = 0; for ($i=0; $i < sizeof($admins); $i++) { if ($row2['name'] == "$admins[$i]" AND $row['admins'] != "") { $auth_user = 1; } } if ($row2['radminsuper'] == 1 || $auth_user == 1) { $NukeCAddonName = "Classifieds"; @include("modules/".$NukeCAddonName."/functions.php"); @include("modules/".$NukeCAddonName."/language/lang-".$currentlang.".php"); function NukeCCustomContent($msg_id) { global $prefix, $db, $adsbgcolor1, $adsbgcolor2, $adsbgcolor3, $adsbgcolor4, $adsbgcolor5; @include("header.php"); GraphicAdmin(); OpenTable(); NukeCAdminMenu(); CustomContentheaderAdmin(); listingcontent(); CloseTable(); @include("footer.php"); } function listingcontent() { global $prefix, $db, $NukeCAddonName, $adsbgcolor1, $adsbgcolor2, $adsbgcolor3, $adsbgcolor4, $adsbgcolor5, $admin_file; $re = $db->sql_query("select custom_id, custom_title, weight, active, language from ".$prefix."_nukec_ads_custom order by weight"); if ($db->sql_numrows($re) > 0) { echo "
"; echo ""; echo "\n" ."" ."\n"; while (list ($custom_id, $custom_title, $weight, $active, $language) = $db->sql_fetchrow($re)) { if ($active == 1) { $imgstatus = "\"Deactivate\""; } else { $imgstatus = "\"Activate\""; } $linkstatus = "$imgstatus"; echo ""; echo "\n" ."" ."\n" ." \n"; } echo "
TitleWeightStatusLanguage 
$custom_title$weight"; $weight1 = $weight - 1; $weight3 = $weight + 1; $res = $db->sql_query("select custom_id from ".$prefix."_nukec_ads_custom where weight='$weight1'"); list ($cid1) = $db->sql_fetchrow($res); $con1 = "$cid1"; $res2 = $db->sql_query("select custom_id from ".$prefix."_nukec_ads_custom where weight='$weight3'"); list ($cid2) = $db->sql_fetchrow($res2); $con2 = "$cid2"; if ($con1) { echo"\""._BLOCKUP."\""; } if ($con2) { echo "\""._BLOCKDOWN."\""; } if ($language != "") { $cplanguage = ucfirst($language); } else { $cplanguage = "All"; } echo "$linkstatus".$cplanguage."\n" ."\""._NUKECEDIT."\" \n" ."\""._NUKECDELETE."\"
"; echo "
"; } else { echo "
No Ads Duration Initialized
"; } } function NukeCCustomContentAdd() { global $prefix, $db, $adsbgcolor1, $adsbgcolor2, $adsbgcolor3, $adsbgcolor4, $adsbgcolor5, $admin_file; @include("header.php"); GraphicAdmin(); OpenTable(); NukeCAdminMenu(); CustomContentheaderAdmin(); echo "
"; echo "
"; echo "\n" ."" ."" ."" ."\n" ."\n" ."" ."" ."" ."
Add Custom Page
Title is only as identification at NukeC admin page and will not be viewed at NukeC modules pages, only Custom content will be viewed at NukeC Modules pages
Both of them are required. HTML tags are allowed at Custom content, but please doouble check it.
Title
Custom Content
Language"; echo ""; echo "
Activate Yes No
"; echo "
\n"; CloseTable(); @include("footer.php"); } function NukeCCustomContentSubmit($cptitle,$cpcontent,$cpstatus,$cplanguage) { global $prefix,$db; if (($cptitle == "") or ($cpcontent == "")) { global $adsbgcolor1, $adsbgcolor2, $adsbgcolor3, $adsbgcolor4, $adsbgcolor5, $admin_file; @include("header.php"); GraphicAdmin(); OpenTable(); NukeCAdminMenu(); CustomContentheaderAdmin(); echo "
"; echo "
"; if ($cptitle == "") { echo "Title is Required
"; } if ($cpcontent == "") { echo "Custom Content is required
"; } echo "
The form is not complete, please click on back and complete the form"; echo "
Back"; echo "
"; CloseTable(); @include("footer.php"); } else { if ($cpstatus) { $cpstatus = 1; } else { $cpstatus = 0; } $cptitle = stripslashes(FixQuotes($cptitle)); $cpcontent = stripslashes(FixQuotes($cpcontent)); $resultweight = $db->sql_query("select MAX(weight) from ".$prefix."_nukec_ads_custom"); list($cpweight) = $db->sql_fetchrow($resultweight); $cpweight = $cpweight + 1; $sqlinsert = "insert into ".$prefix."_nukec_ads_custom values ('','$cptitle','$cpcontent','$cpweight','$cpstatus','$cplanguage',NOW())"; $db->sql_query($sqlinsert); $msg = "CPadded"; header("location: ".$admin_file.".php?op=ClassifiedsCustomContent&msg_id=$msg"); } } function NukeCCustomContentOrder($weight,$bidori,$weightrep,$bidrep) { global $prefix, $db, $admin_file; $result = $db->sql_query("update ".$prefix."_nukec_ads_custom set weight='$weight' where custom_id='$bidrep'"); $result2 = $db->sql_query("update ".$prefix."_nukec_ads_custom set weight='$weightrep' where custom_id='$bidori'"); Header("Location: ".$admin_file.".php?op=ClassifiedsCustomContent"); } function ClassifiedsCustomContentDelete($nod) { global $prefix, $db, $admin_file; $result = $db->sql_query("delete from ".$prefix."_nukec_ads_custom where custom_id='$nod'"); Header("location: ".$admin_file.".php?op=ClassifiedsCustomContent&msg_id=CDeleted"); } function NukeCCustomContentEdit($nod) { global $prefix,$db; global $adsbgcolor1, $adsbgcolor2, $adsbgcolor3, $adsbgcolor4, $adsbgcolor5, $admin_file; @include("header.php"); GraphicAdmin(); OpenTable(); NukeCAdminMenu(); CustomContentheaderAdmin(); echo "
"; $resultcontent = $db->sql_query("select custom_title, content, active ,language from ".$prefix."_nukec_ads_custom where custom_id='$nod'"); list ($cptitle, $cpcontent, $cpactive ,$cplanguage) = $db->sql_fetchrow($resultcontent); echo "
"; echo "\n" ."" ."" ."" ."" ."\n" ."\n" .""; if ($cpactive == 1) { $radioactive = " Yes "; $radioinactive = " No"; } else { $radioactive = " Yes "; $radioinactive = " No"; } echo "" ."" ."
Edit Custom Page
Title is only as identification at NukeC admin page and will not be viewed at NukeC modules pages, only Custom content will be viewed at NukeC Modules pages
Both of them are required. HTML tags are allowed at Custom content, but please doouble check it.
Title
Custom Content
Language"; echo ""; echo "
Activate".$radioactive." ".$radioinactive."
"; echo "
\n"; CloseTable(); @include("footer.php"); } function ClassifiedsCustomContentUpdate($xcpid, $xcptitle, $xcpcontent, $xcpstatus, $xcplanguage) { global $prefix,$db; if (($xcptitle == "") or ($xcpcontent == "")) { global $adsbgcolor1, $adsbgcolor2, $adsbgcolor3, $adsbgcolor4, $adsbgcolor5, $admin_file; @include("header.php"); GraphicAdmin(); OpenTable(); NukeCAdminMenu(); CustomContentheaderAdmin(); echo "
"; echo "
"; if ($xcptitle == "") { echo "Title is Required
"; } if ($xcpcontent == "") { echo "Custom Content is required
"; } echo "
The form is not complete, please click on back and complete the form"; echo "
Back"; echo "
"; CloseTable(); @include("footer.php"); } else { if ($xcpstatus) { $xcpstatus = 1; } else { $xcpstatus = 0; } $xcptitle = stripslashes(FixQuotes($xcptitle)); $xcpcontent = stripslashes(FixQuotes($xcpcontent)); $sqlupdatecontent = "update ".$prefix."_nukec_ads_custom set custom_title='$xcptitle', content='$xcpcontent', language='$xcplanguage', active='$xcpstatus' where custom_id='$xcpid'"; $db->sql_query($sqlupdatecontent); $msg = "CUpdated"; header("location: ".$admin_file.".php?op=ClassifiedsCustomContent&msg_id=$msg"); } } function NukeCCustomContentChangeStatus($content_id) { global $prefix, $db, $admin_file; $resultstatus = $db->sql_query("select active from ".$prefix."_nukec_ads_custom where custom_id='$content_id'"); if (!$resultstatus) { die(mysql_error()); } list ($status) = $db->sql_fetchrow($resultstatus); if ($status == 0) { $setto = 1; $msg = "CustomContentActivated"; } else { $setto = 0; $msg = "CustomContentDeActivated"; } $resultset = $db->sql_query("update ".$prefix."_nukec_ads_custom set active='$setto' where custom_id='$content_id'"); if (!$resultset) { die(mysql_error()); } header("location: ".$admin_file.".php?op=ClassifiedsCustomContent&msg_id=$msg"); } function CustomContentheaderAdmin() { global $msg_id, $adsbgcolor1, $adsbgcolor2, $adsbgcolor3, $adsbgcolor4, $adsbgcolor5, $admin_file; echo "
"; echo "
"; echo "
"; echo "Custom Content Pages"; echo "

[ Add Custom Page ]"; if ((isset($msg_id)) && ($msg_id != "")) { echo "

"; switch ($msg_id) { case "CPadded": echo "New Custom Content Added";break; case "CUpdated": echo "Custom content updated"; break; case "CDeleted": echo "Selected Custom content Deleted"; break; case "CustomContentActivated": echo "Selected custom content activated";break; case "CustomContentDeActivated": echo "Selected custom content deactivated";break; } echo "
"; } echo "
"; echo "
"; } switch($op) { case "ClassifiedsCustomContent" : NukeCCustomContent($msg_id);break; case "ClassifiedsCustomContentOrder":NukeCCustomContentOrder($weight,$bidori,$weightrep,$bidrep);break; case "ClassifiedsCustomContentAdd" :NukeCCustomContentAdd();break; case "ClassifiedsCustomContentEdit" : NukeCCustomContentEdit($nod);break; case "ClassifiedsCustomContentChangeStatus" :NukeCCustomContentChangeStatus($content_id);break; case "ClassifiedsCustomContentUpdate" : ClassifiedsCustomContentUpdate($xcpid, $xcptitle, $xcpcontent, $xcpstatus, $xcplanguage);break; case "ClassifiedsCustomContentDelete" : ClassifiedsCustomContentDelete($nod); case "ClassifiedsCustomContentSubmit":NukeCCustomContentSubmit($cptitle,$cpcontent,$cpstatus,$cplanguage);break; } } else { echo "Access Denied"; } ?>