| Author |
Message |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 724
|
Posted:
Thu Mar 17, 2005 10:42 am |
|
Show Waiting Submitted Maps in Waiting Content Admin Block.
Open mainfile.php
Find
| Code: |
| $content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=submissions\">"._SUBMISSIONS."</a>: $num<br>"; |
Above, on a new line add
| Code: |
$num_maps = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_maptemp"));
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=mapmain\">Maps</a>: $num_maps<br>"; |
|
|
|
|
 |
sirVIPER
Repeat Offender

Joined: Sep 09, 2005
Posts: 28
Location: Texas
|
Posted:
Sat Sep 10, 2005 2:48 am |
|
The above code is not located in my mainfile.php. I am using PNC and did a search on the file and did not come up with the find code to put above any ideas on how to integrate this further? |
|
|
|
 |
gotcha
Site Admin


Joined: Oct 25, 2004
Posts: 724
|
Posted:
Sat Sep 10, 2005 6:59 am |
|
ive never used PNC but im sure the guys over there could point you in the right direction as to where the code is. Point them over to this thread, or post your mainfile.php and ill look at it. |
|
|
|
 |
sirVIPER
Repeat Offender

Joined: Sep 09, 2005
Posts: 28
Location: Texas
|
Posted:
Thu Sep 15, 2005 7:35 am |
|
ok for any of you using PNC to add this to the Admin Submissions block you will need to goto blocks and open your block-admin_submissions.php file to edit it in. I am working on changing it to match the look then i will post the exact code here.
Ok this seemed to work.
Find
$content .= "<TR><TD class=\"row1\"> <a href=\"".$admin_file.".php?op=reviews\">"._WREVIEWS."</a>: $num</TD></TR>\n";
input the following directly under it
$num_maps = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_maptemp"));
$content .= "<TR><TD class=\"row1\"> <a href=\"admin.php?op=mapmain\">Maps & Demos</a>: $num_maps</TD></TR>\n"; |
|
|
|
 |
GuNS-365th
Newbie


Joined: Oct 20, 2005
Posts: 14
Location: Rivers, Manitoba, Canada
|
Posted:
Fri Dec 02, 2005 8:53 am |
|
For Pc-Nuke Extreme 7.8.31 this is the code to show it
| Code: |
<?php
/************************************************************************/
/* Pc-Nuke! Systems - Advanced Content Management System */
/* ============================================ */
/* Php based web portal systems & more... */
/* Put together by PcNuke.com */
/* http://www.pcnuke.com www.max.pcnuke.com */
/* */
/************************************************************************/
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/************************************************************************/
if (stristr($_SERVER['PHP_SELF'], "block-GCAdmin.php") || stristr($_SERVER['SCRIPT_NAME'], "block-GCAdmin.php")) { Header("Location: index.php"); }
if (eregi("block-Administration.php", $_SERVER['SCRIPT_NAME'])) {
Header("Location: index.php");
die();
}
global $admin, $nukecprefix, $redirect, $mode, $f, $t, $sitekey, $nukeurl, $user, $cookie, $prefix, $user_prefix, $db, $anonymous, $gfx_chk;
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
if (is_admin($admin)) {
/*THIS IS WHERE THE CHECK SCRIPTS GO*/
//Waiting Downloads
$newdownloads = "0";
$newdownloads = $db->sql_numrows($db->sql_query("select * from ".$user_prefix."_downloads_newdownloads"));
$totalnewdownloads = number_format($newdownloads, 0);
//Mod Downloads
$moddownloads = "0";
$moddownloads = $db->sql_numrows($db->sql_query("select * from ".$user_prefix."_downloads_modrequest"));
$totalmoddownloads = number_format($moddownloads, 0);
// Waiting News Article Submissions
$num1 = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_queue"));
// Waiting Links
$num2 = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_links_newlink"));
// Waiting Events
$events = "0";
$events = $db->sql_numrows($db->sql_query("select * from ".$prefix."_nucal_events where isapproved='0'"));
$num3 = number_format($events, 0);
// Waiting Reviews
$reviews = "0";
$reviews = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_reviews_add"));
$num4 = number_format($reviews, 0);
// Waiting Banners
$banners = "0";
$banners = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE active = 0"));
$num5 = number_format($banners, 0);
// Waiting Classified Ads
$classified = "0";
$classified = $db->sql_numrows($db->sql_query("select id_ads,title,language,dateposted from nukec30_ads_ads where active=0"));
$num6 = number_format($classified, 0);
// Waiting Top Sites
$result_2 = "0";
$result_2 = $db->sql_query("select * from ".$prefix."_top_sites where validation='N' ");
$num7 = $db->sql_numrows($result_2, 0);
// Waiting Downloads
$downloads = "0";
$downloads = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsngd_new ORDER BY lid"));
$num8 = number_format($downloads, 0);
// Waiting Webcams
$webcams = "0";
$webcams = $db->sql_numrows($db->sql_query("select lid, title, camurl, fullurl, submitter, email, cat, date from ".$prefix."_webcams_new order by title"));
$num9 = number_format($webcams, 0);
// Waiting Supporters
$supporters = "0";
$supporters = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_nsnsp_sites WHERE site_status='0' ORDER BY site_name"));
$num10 = number_format($supporters, 0);
//Waiting Maps
$maps = "0";
$maps = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_maptemp"));
$num11 = number_format($maps, 0);
/*END OF CHECKS*/
/*What the admin sees*/
$content = "<center>";
$content .= "<b>Administration Panels</b><br>";
$content .= "</center>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php\"><b>Nuke</b></a> - <a href=\"modules/Forums/admin/index.php\"><b> Forum</b></a><br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"index.php\">Home Page</a> - ";
$content .= "<font color=\"#800000\"><a href=\"admin.php?op=logout\"> Logout</font></a><br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=BlocksAdmin\">Blocks</a> - ";
$content .= "<a href=\"admin.php?op=modules\"> Modules</a><br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=adminStory\">Create News Story</a><br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=create\">Create New Survey</a><br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=optimize\">Optimize DataBase</a><br>";
$content .= "<hr width=\"88%\">";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=BannersAdmin\">Waiting Banners:</a> $num5<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=NukeC30\">Waiting Classified:</a> $num6<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=DownloadNew\">Waiting Downloads:</a> $num8<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=NuCalendar\">Waiting Events:</a> $num3<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=reviews\">Waiting Reviews:</a> $num4<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=submissions\">Waiting Stories:</a> $num1<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=Supporterspending\">Waiting Supporters:</a> $num10<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=topsitesnotvalidelink\">Waiting TopSites:</a> $num7<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=Links\">Waiting WebLinks:</a> $num2<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=webcams\">Waiting Webcams:</a> $num9<br>";
$content .= "<strong><big>·;</big></strong> ;;<a href=\"admin.php?op=mapmain\">Waiting Maps:</a> $num11<br>";
} else {
/*********************************************************/
/*Admin Login Function */
/*********************************************************/
$content = "<center>";
$content .= "<form action=\"admin.php\" method=\"post\">";
$content .= "<table border=\"0\">";
$content .= "<td><input type=\"text\" NAME=\"aid\" SIZE=\"17\" MAXLENGTH=\"25\"></td></tr>";
$content .= "<td><input type=\"password\" NAME=\"pwd\" SIZE=\"17\" MAXLENGTH=\"40\"></td></tr>";
if (extension_loaded("gd") AND ($gfx_chk == 1 OR $gfx_chk == 5 OR $gfx_chk == 6 OR $gfx_chk == 7)) {
$content .=""._SI_CODE.": <img src='index.php?gfx=gfx&random_num=$random_num' border='1' height='20' width='77' alt='"._SI_CODE."' title='"._SI_CODE."'><br>\n";
$content .=""._SI_TYPE.": <input type=\"text\" NAME=\"gfx_check\" SIZE=\"10\" MAXLENGTH=\"10\"><br>\n";
}
$content .= "<tr><td>";
$content .= "<input type=\"hidden\" NAME=\"random_num\" value=\"$random_num\">";
$content .= "<input type=\"hidden\" NAME=\"op\" value=\"login\">";
$content .= "<center><input type=\"submit\" VALUE=\""._LOGIN."\"></center>";
$content .= "</td></tr></table>";
$content .= "</form>";
$content .= "</center>";
}
?>
|
|
|
|
|
 |
x-Ammo-Nx-x
Newbie


Joined: Apr 16, 2007
Posts: 9
|
Posted:
Tue Apr 17, 2007 5:11 am |
|
It seems these forums or my browser doesnt like displaying the &.m.i.d.d.o.t.; ( remove all . from &.m.i.d.d.o.t.; to use in script) piece of code, it displays on my browser as, ·; Not sure if others have this problem.
| Code: |
$num_maps = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_maptemp"));
$content .= "<strong><big>&.m.i.d.d.o.t;</big></strong><a href=\"admin.php?op=mapmain\"> Map Submissions</a>: $num_maps<br>";
|
|
|
|
|
 |
BooFeZ
Newbie


Joined: May 01, 2007
Posts: 5
|
Posted:
Wed May 02, 2007 4:26 am |
|
How would you add reviews for maps waiting to be submitted into the waiting content block?
EDIT: Nevermind figured it out
| Code: |
$num_reviews = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_mapreviews WHERE rapprove='0'"));
$content .= "<strong><big>·</big></strong> <a href=\"admin.php?op=mapmain\">Map Reviews</a>: $num_reviews<br>";
|
|
|
|
|
 |
|
|