View next topic
View previous topic
Post new topic   Reply to topic
Author Message
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 893

PostPosted: Wed Mar 16, 2005 7:42 pm
Reply with quote

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>";
 
View user's profile Send private message Visit poster's website
sirVIPER




Joined: Sep 09, 2005
Posts: 28
Location: Texas

PostPosted: Fri Sep 09, 2005 11:48 am
Reply with quote

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?
 
View user's profile Send private message Visit poster's website MSN Messenger
gotcha
Site Admin
Site Admin



Joined: Oct 25, 2004
Posts: 893

PostPosted: Fri Sep 09, 2005 3:59 pm
Reply with quote

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.
 
View user's profile Send private message Visit poster's website
sirVIPER




Joined: Sep 09, 2005
Posts: 28
Location: Texas

PostPosted: Wed Sep 14, 2005 4:35 pm
Reply with quote

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";
 
View user's profile Send private message Visit poster's website MSN Messenger
GuNS-365th




Joined: Oct 20, 2005
Posts: 14
Location: Rivers, Manitoba, Canada

PostPosted: Thu Dec 01, 2005 5:53 pm
Reply with quote

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>";
}





?>
 
View user's profile Send private message Send e-mail Visit poster's website
x-Ammo-Nx-x




Joined: Apr 16, 2007
Posts: 9

PostPosted: Mon Apr 16, 2007 2:11 pm
Reply with quote

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>";
 
View user's profile Send private message
BooFeZ




Joined: May 01, 2007
Posts: 5

PostPosted: Tue May 01, 2007 1:26 pm
Reply with quote

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>";
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 5 Hours