/*
/////////////////////////////////////////////////////////////////////////////////////
// JohnCMS                                                                   	  ///
//    : http://johncms.com                              ///
//   : http://gazenwagen.com                           ///
/////////////////////////////////////////////////////////////////////////////////////
// JohnCMS core team:                                                             ///
//   aka john77          john77@johncms.com                         ///
//   aka AlkatraZ          alkatraz@johncms.com                       ///
//                                                                                ///
/////////////////////////////////////////////////////////////////////////////////////
*/
////////////////////////////////////////////
//Mod by Mobula 				       /////
//http://mobula.cn 				       /////
//-------------------------------------/////
//  JohnCMS v3.0 by VARG      /////
//http://varg.us                       /////
////////////////////////////////////////////

////////////////////////////////////////////
//                              ///
////////////////////////////////////////////

*****************************************************************************************************************************
1 .       .					                                                                *
2 .    (chmod, permission) 777 :                                                                 *
/files                                                                                                                      *
/screen                                                                                                                     *
/graftemp                                                                                                                   *
/book                                                                                                                       *
/mp3temp                                                                                                                    *
/temp                                                                                                                       *
3 .     http://_/upload/install.php                                                   *
4 .        ,     install.php   !!!*
//      update.php   !!!                                                          *
*****************************************************************************************************************************

     incfiles/func.php   3.0,     2 : provupl()  upload(),
 ,   -    ,    -    func.php  :

  incfiles/func.php:
----------------------------

function provupl($catalog)
{
    $cat1 = mysql_query("select * from `upload` where type = 'cat' and id = '" . $catalog . "';");
    $cat2 = mysql_num_rows($cat1);
    $adrdir = mysql_fetch_array($cat1);
    if (($cat2 == 0) || (!is_dir("$adrdir[adres]/$adrdir[name]")))
    {
        echo "   <br/><a href='?'> </a><br/>";
        require_once ('../incfiles/end.php');
        exit;
    }
}

function upload() {
    ////////////////////////////////////////////////////////////
    //                                      //
    ////////////////////////////////////////////////////////////
    global $realtime;
    $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `upload` WHERE `type` = 'file'"), 0);
    $old = $realtime - (3 * 24 * 3600);
    $new = mysql_result(mysql_query("SELECT COUNT(*) FROM `upload` WHERE `time` > '" . $old . "' AND `type` = 'file'"), 0);
    if ($new > 0)
        $total .= '&nbsp;/&nbsp;<span class="red"><a href="/upload/?act=new">+' . $new . '</a></span>';
    return $total;
}


  pages/mainmenu.php:
----------------------

echo '<a href="upload/"></a> (' . upload() . ')<br />';

________________
      VARG