Sea modded script -8.1 (New Version-2010)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Sea modded script -8.1 (New Version-2010)

    Sea modded script -8.1 (New Version-2010)
    Modernization of sea 8.1 without shell, etc. (Unlike the version that was posted on the Internet).
    In this version:
    1. Added output easy (general and folders)
    2. Cleared Bugs in the library, tank top, in the creation and editing of sections
    3. Added an entry with a description of the Admin directly to the file.
    4. Add Screenshot to all files.
    5. It written semi-automatic database updates. This will be updated database with very large number of files.
    6. Added write protection "garbage", ie files and folders with a Russian name that does not appear in the App Center, and only clog up the base.
    7. Preview screenshots to all files
    8. The output links in the table reservation for the requested file (for Admin tests)
    9. Fixed incorrect counting of downloads pictures
    10. Fixed bugs that were in the bath, Unban and cleaning the table orders.
    11. Advance orders rewritten register_globals off
    12. Added the ability to withdraw payment for the section with admin.
    13. View. Avi. Flv. Swf. Mp4 flash player for those with a computer.
    14. Added displaying the 20 most recent comments for users and the ability to control, remove all comments for admin.
    15. Added syntax highlight PHP code in the txt reader, as well as setting the "Font size" and "Number of characters per page.
    16. Fixed user preferences.
    17. Modernized file manager.
    18. Modernized the closure of sections of sms and activation options.
    19. Added lower ad unit.
    Requirements: PHP5, MySQL, HTML, MbString, ffmpeg.

    Installation :
    ----------------------------------------------
    1.Create new database in the control panel site.
    2.CHMOD 666 the file moduls / config.php
    3.Run install.php file and introduce the necessary.
    4.installation is successful, then delete the file install.php. If not, then check the correctness of the fields are filled out in paragraph 3 or the script can not change the file moduls / config.php
    5.CHMOD 777 on the folder files /, about /, screen /, mp3data /, jardata /, zipdata /, themedata /, razdely /, We put a CHMOD 666 on files gocount.txt.
    6.in the admin area and run the file input.php TARGET, studying the script.
    7.after installing the right to put 644 on the file moduls / config.php
    8.Deleter files install.php and update.php

    Backup database :
    Run the file dumper.php and do First chmod the folder backup 777.

    Screenshots :


    Search section :


    Wallpaper :


    mp3 with online playing :



    Java Games with icon preview



    S40 theme (.nth) Preview :


    3gp Video preview :



    avi,mp4 videos screen shot and online playing :


    Admin Panel :


    Download :
    Code:
    Code:
    http://hotfile.com/dl/42122958/6cb2c43/sea.zip.html
    All the thanks must go to Srini from Coding - Central . info

    Guys I would apreciate ig someone can help me setup the ads for this script admob etc...?

    #2
    create file admob.php and then past this code in index.php where u want to display ads <?php include 'admob.php'; ?>
    Originally posted by cobusbo View Post
    Sea modded script -8.1 (New Version-2010)
    Modernization of sea 8.1 without shell, etc. (Unlike the version that was posted on the Internet).
    In this version:
    1. Added output easy (general and folders)
    2. Cleared Bugs in the library, tank top, in the creation and editing of sections
    3. Added an entry with a description of the Admin directly to the file.
    4. Add Screenshot to all files.
    5. It written semi-automatic database updates. This will be updated database with very large number of files.
    6. Added write protection "garbage", ie files and folders with a Russian name that does not appear in the App Center, and only clog up the base.
    7. Preview screenshots to all files
    8. The output links in the table reservation for the requested file (for Admin tests)
    9. Fixed incorrect counting of downloads pictures
    10. Fixed bugs that were in the bath, Unban and cleaning the table orders.
    11. Advance orders rewritten register_globals off
    12. Added the ability to withdraw payment for the section with admin.
    13. View. Avi. Flv. Swf. Mp4 flash player for those with a computer.
    14. Added displaying the 20 most recent comments for users and the ability to control, remove all comments for admin.
    15. Added syntax highlight PHP code in the txt reader, as well as setting the "Font size" and "Number of characters per page.
    16. Fixed user preferences.
    17. Modernized file manager.
    18. Modernized the closure of sections of sms and activation options.
    19. Added lower ad unit.
    Requirements: PHP5, MySQL, HTML, MbString, ffmpeg.

    Installation :
    ----------------------------------------------
    1.Create new database in the control panel site.
    2.CHMOD 666 the file moduls / config.php
    3.Run install.php file and introduce the necessary.
    4.installation is successful, then delete the file install.php. If not, then check the correctness of the fields are filled out in paragraph 3 or the script can not change the file moduls / config.php
    5.CHMOD 777 on the folder files /, about /, screen /, mp3data /, jardata /, zipdata /, themedata /, razdely /, We put a CHMOD 666 on files gocount.txt.
    6.in the admin area and run the file input.php TARGET, studying the script.
    7.after installing the right to put 644 on the file moduls / config.php
    8.Deleter files install.php and update.php

    Backup database :
    Run the file dumper.php and do First chmod the folder backup 777.

    Screenshots :


    Search section :


    Wallpaper :


    mp3 with online playing :



    Java Games with icon preview



    S40 theme (.nth) Preview :


    3gp Video preview :



    avi,mp4 videos screen shot and online playing :


    Admin Panel :


    Download :
    Code:
    Code:
    http://hotfile.com/dl/42122958/6cb2c43/sea.zip.html
    All the thanks must go to Srini from Coding - Central . info

    Guys I would apreciate ig someone can help me setup the ads for this script admob etc...?

    Comment


      #3
      Code:
      <?php
      #-----------------------------------------------------#
      #             Sharing is Caring....                   #
      #              www.share4m.com                        #
      #        Script is translated by admin@share4m.com    #
      #-----------------------------------------------------#
      
      require 'moduls/ini.php';
      require 'moduls/fun.php';
      require 'moduls/connect.php';
      require 'online.php';
      //require 'moduls/header.php';
      session_name('SID') ;
      
      ###############Сесии###############
      if(session_start()){
      if(!empty($_SESSION["onpage"]) AND !empty($_GET['onpage'])){
      $_SESSION["onpage"]=$_GET['onpage'];
      }
      elseif(empty($_SESSION["onpage"]) AND !empty($_GET['onpage']))
      {
       $onpage=$_GET['onpaget'];
       session_register ("onpage") ;
      }
      
      if(!empty($_SESSION["prew"]) AND !empty($_GET['prew']))
      $_SESSION["prew"]=$_GET['prew'];
      elseif(empty($_SESSION["prew"]) AND !empty($_GET['prew']))
      {
       $prew=$_GET['prew'];
       session_register ("prew") ;
      }
      
      if(!empty($_SESSION["sort"]) AND !empty($_GET['sort']))
      $_SESSION["sort"]=$_GET['sort'];
      elseif(empty($_SESSION["sort"]) AND !empty($_GET['sort']))
      {
       $sort=$_GET['sort'];
       session_register ("sort") ;
      }
       }
       ###############админ###############
      $error = false;
      
      if($_SESSION['autorise'] != $setup['password']){
      $error = true;
      }
      
      if($_SESSION['ipu'] != clean($ip)){
      $error = true;
      }
      ###############Проверка переменных###############
      $onpage = intval($_SESSION["onpage"]);
      $prew = intval($_SESSION["prew"]);
      $sort = get2ses('sort');
      $id = intval($_GET['id']);
      if (!empty ($_POST['page']))
      {
      $page = intval($_POST['page']);}
      else {$page = intval($_GET['page']);}
      $start = intval($_GET['start']);
      
      if($onpage < 3){
      $onpage = 10;
      }
      
      if($prew != 0 and $prew != 1){
      $prew = $setup['preview'];
      }
      
      $valid_sort = array('name' => '','data' => '','load' => '','size' => '','eval' =>'');
      if(!isset($valid_sort[$sort])){
      $sort='name';
      }
      
      $MODE = '`priority` DESC,`name` ASC';
      if($sort == 'data') $MODE = '`priority` DESC,`timeupload` DESC';
      elseif($sort == 'size') $MODE = '`priority` DESC,`size` ASC';
      elseif($sort == 'load') $MODE = '`priority` DESC,`loads` DESC';
      elseif($sort == 'eval' && $setup['eval_change']) $MODE = '`priority` DESC,`yes` DESC ,`no` ASC';
      ###############Получаем текущий каталог#############
      if(!$id){
      $d['path'] = $setup['path'].'/';
      }
      else{
      $d = mysql_fetch_assoc(mysql_query('SELECT `path` FROM `files` WHERE `id` = '.$id.' LIMIT 1'));
      }
      
      if(!is_dir($d['path'])) die('Folder not found.</body></html>');
      
      
      ###############Постраничная навигация###############
      $all = mysql_fetch_row(mysql_query('SELECT COUNT(`id`) FROM `files` WHERE `infolder` = "'.$d['path'].'"'));
      $all = $all[0];
      $pages = ceil($all/$onpage);
      if(!$pages) $pages = 1;
      if($page>$pages or $page<=0) $page=1;
      if($start>$all or $start<=0) $start = 0;
      if($page) $start = ($page - 1) * $onpage; else $start = 0;
      ###############Получаем список файлов###############
      $array_id = array();
      $query = mysql_query('SELECT `id` FROM `files` WHERE `infolder` = "'.$d['path'].'" ORDER BY '.$MODE.' LIMIT '.$start.', '.$onpage);
      while($list_sw = mysql_fetch_row($query)){
      $array_id[] = $list_sw[0];
      }
      ###############Готовим заголовок###################
      $ex = explode('/',$d['path']);
      foreach($ex as $k=>$v)
      {
      if($v!='' and $v!='.' and $v!='..' and $v!=$setup['path'])
      {
      $s = mysql_fetch_array(mysql_query("SELECT `id`,`name` FROM `files` WHERE `path` LIKE '%".clean($v)."/' AND `size` = '0'"));
      $s['name'] = str_replace('*','',$s['name']);
      if($k >= sizeof($ex)-2) $put .= $s['name'];
      else $put .= '<a href="index.php?id='.$s['id'].'">'.$s['name'].'</a>&raquo;';
      }
      }
                                     include 'moduls/header.php';
      ##############Заголовок##########################
      
      echo '<div class="menu"> <a href="'.$setup['site_url'].'">'.$setup['site_url'].'</a>&raquo;<a href="index.php">Downloads</a>&raquo;'.$put.'</div>';
      ###############Вывод рекламы###############
      if($setup['buy_change']==1)
      {
      echo '<div class="a">';
      $list = explode("\n",$setup['buy']);
      if($setup['randbuy']==1) echo '<div class="i_bar_t">'.bbcode($list[mt_rand(0,sizeof($list)-1)]).'</div> ';
      else foreach($list as $value) echo '<div class="i_bar_t">'.bbcode($value).'</div> ';
      echo'</div>';
      }
      
      ############################################
      echo '<div class="a">';
      if($setup['search_change']==1) echo '<div class="i_bar_t"><a href="search.php">Search</a></div>';
      if($setup['top_change']==1) echo '<div class="i_bar_t"><a href="top.php">ТОP '.$setup['top_num'].' files</a></div>';
        $new_all_files = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `files` WHERE `timeupload` > '.($time-(86400*$setup['day_new'])).' AND `size` > 0'));
      if($new_all_files[0]!=0 AND $setup['new_change']==1) echo '<div class="i_bar_t"><a href="new.php">New (+'.$new_all_files[0].')</a></div>';
      include 'user2.php';
      if(!$id AND $setup['new_komm']==1) echo '<div class="i_bar_t"> <a href="allkomm.php?">New. '.$setup['komm_num'].' Comments.</a></div>';
      echo '</div></div>
      ';
      <?php include 'admob.php'; ?>;
      ###############Список фалов и папок###############
      if ($all == 0) echo '<div class="a"><strong>[Empty]</strong></div>';
      foreach($array_id as $key => $value)
      {
       	$file_info = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`path`,`fastabout`,`timeupload`,`infolder`,`size`,`loads`,`yes`,`no` FROM `files` WHERE `id` = "'.$value.'";'));
      
      	if(is_dir($file_info['path']))
       	{
         	if(is_integer($key / 2)) $row = '<div class="dl2">'; else $row = '<div class="dl">';
       	if (!empty($file_info['fastabout'])) $file_info['about'] = str_replace("\n", '<br>',$file_info['about']);
         		//Кол-во новых файлов в папке
         		$new_all="";
              $stime=$time-(3600*24*$setup['day_new']);
         		//NOT USE//$new_all = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `timeupload` > "'.$stime.'" AND `infolder` REGEXP "'.$file_info['path'].'*" AND `size` > "0";'));
         		if($setup['day_new']!=0) $new_all = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `timeupload` > "'.$stime.'" AND `infolder` LIKE  "'.$file_info['path'].'%" AND `size` > "0";'));
      		if($new_all[0] and $setup['day_new']!=0) $new_all = '<font color="red">+'.$new_all[0].'</font>'; else $new_all="";
         		//Всего файлов в папке
         		//NOT USE//$allinfolder = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `infolder` REGEXP "'.$file_info['path'].'*" AND `size` > "0";'));
         		$allinfolder = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `infolder` LIKE  "'.$file_info['path'].'%" AND `size` > "0";'));
      		$name = str_replace('*','',$file_info['name']);
      		###############Cоздание РАЗДЕЛОВ
      	$name32=$file_info['path'];
        	$name32=str_replace('files/','',$name32);
        		$name32=str_replace('/',';',$name32);
        			$name32=str_replace('_',' ',$name32);
      		if (is_file('razdely/'.$name32.'.txt')) //если оно в файле
      	{
       	$razd = file_get_contents('razdely/'.$name32.'.txt');
      $razdely= '<div class="block_top_s_l"> '.$razd.'</div>';
      echo $razdely;
      	}
      			###############Проверка на платность раздела
      			$block=false; //обнуление
      	    click_change();
      		if (is_file('razdely/'.$name32.'.dat')) //если оно в файле
      	{
       $block=1;
      	}
      		if (is_file('razdely/'.$name32.'1.dat')) //если оно в файле
      	{
       $block=2;
      	}
      		//Иконка к папке
      		if(!file_exists($file_info['path'].'folder.png')) $ico = '<img src="ext/dir.png" alt="">'; else $ico = '<img src="'.$file_info['path'].'folder.png" alt="">';
      		//Собсвенно вывод
      		if (!empty($name) and !$block){
         		echo $row.$ico.'<strong><a href="index.php?id='.$file_info[id].'">'.$name.'</a></strong>('.$allinfolder[0].')';
         		if($new_all) echo '<a href="new.php?id1='.$file_info[id].'">'.$new_all.'</a>';
              if(!empty($file_info['fastabout'])) echo '<br>'.str_replace("\n", '<br>',$file_info['fastabout']);
         		echo '</div>';}
         		elseif ($block==1) { ///если раздел платный
         		$id=$file_info[id];
         		$sid=$id*2-30;
             echo $row.$ico.'<strong><a href="pay.php?sid='.$sid.'">'.$name.'</a></strong>('.$allinfolder[0].')'.$new_all;
              if(!empty($file_info['fastabout'])) echo '<br>'.str_replace("\n", '<br>',$file_info['fastabout']);
         		echo '</div>';
             }
            elseif ($block==2) { ///если раздел платный
         		$id=$file_info[id];
         		$gid=$id*2-30;
             echo $row.$ico.'<strong><a href="click.php?gid='.$gid.'&action=1">'.$name.'</a></strong>('.$allinfolder[0].')'.$new_all;
              if(!empty($file_info['fastabout'])) echo '<br>'.str_replace("\n", '<br>',$file_info['fastabout']);
         		echo '</div>';
             }
       	}
       	elseif(is_file($file_info['path']))
       	{
       		if(is_integer($key / 2)) $row = '<div class="title_bord">'; else $row = '<div class="title_bord">'; /////////К ДИЗАЙНУ О ВЫВЕДЕНИИ ФАЙЛОВ
       	if (!empty($file_info['fastabout'])) $file_info['about'] = str_replace("\n", '<br>',$file_info['about']);
        		$ex = pathinfo($file_info['path']);
       		$ext = strtolower($ex['extension']);
        		//Предосмотр
            click_change();
        		$pre = '';
        		if ($prew==0)
        		{
         			if ($ext == 'bmp') $pre = 'Impossible Preview <br>';
         			if ($ext == 'gif' or $ext == 'jpeg' or $ext == 'jpg' or $ext == 'png' or $ext == 'JPG' or $ext == 'GIF' or $ext == 'PNG'or $ext == 'JPEG') $pre = '<img style="margin: 1px;" src="im.php?bab=1&id='.$file_info['id'].'" alt=""/>';
        		}
        		//Komments and loads
        		$all_komments = @mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `komments` WHERE file_id = "'.$file_info['id'].'"'));
        		$all_komments = $all_komments[0];
        		$all_loads = $file_info['loads'];
        		$file_time = date('d.m.y', $file_info['timeupload']);
        		if ($sort=='name'or $sort=='size') $info = '';
        		if($sort=='load') $info = '(<font color="#FFFF00">'.$all_loads.'</font>)';
        		if ($sort=='data') $info = "($file_time)";
        		if ($sort=='eval' and $setup['eval_change']==1) $info = '(<font color="#800000">'.$file_info['yes'].'</font>/<font color="#004080">'.$file_info[no].'</font>)';
        		//Новизна файла
        		$new_info='';
        		$filtime2 = $file_info['timeupload']+(3600*24*$setup['day_new']);
        		if($filtime2>=$time and $setup['day_new']!=0) $new_info = '<font color="black">NEW!</font>';
        		//Красивый размер
        		if($file_info['size'] < 1024) $file_info['size'] = '('.$file_info['size'].'b)';
        		if($file_info['size'] < 1048576 and $file_info['size'] >= 1024) $file_info['size'] = '('.round($file_info['size']/1024, 2).'Kb)';
        		if($file_info['size'] > 1048576) $file_info['size'] = '('.round($file_info['size']/1024/1024, 2).'Mb)';
        		//Иконка к файлу
        		if(!file_exists('ext/'.$ext.'.png') ) $ico = '<img src="ext/stand.png" alt="">';
            elseif ($ext =='jar')  $ico = ' <img src="ic.php?lf='.$file_info['path'].'&id='.$file_info[id].'" alt="" width="16" height="16"/>';
      
             else $ico = '<img src="ext/'.$ext.'.png" alt="">';
        		//Показ расиширения
        		if($setup['ext']==1) $extension = "($ext)"; else $extension = '';
        		//Собственно вывод
        		echo $row;
            $size1=str_replace(')','|',$file_info['size']);
        		$size2=str_replace('(','|',$size1);
        		$info=str_replace('(','|',$info);
        		$info=str_replace(')','|',$info);
        		  		echo '<div class="t_block">'.$ico.'<a href="view.php?id='.$file_info[id].'"><strong>'.$file_info['name'].'</strong></a></div><div class="block">'.$extension.$size2.$info.'|<a href="load.php?id='.$file_info[id].'"><font color="red">Download</font></a>|';
             if($ext =='txt')     {  echo '<a href="read.php?id='.$file_info['id'].'&id2='.$id.'"><font color="red">Read</font></a>';}
                  echo $new_info.'';
        		if(!empty($file_info['fastabout'])) echo str_replace("\n", '<br>',$file_info['fastabout']);
        		echo '</div>';
        		######################################################
        
        
        
        
        
        
        
        		###############Получаем инфу о файле###########
        		$id2=$file_info[id];
      $file_info2 = mysql_fetch_array(mysql_query('SELECT * FROM `files` WHERE `id` = '.$id2));
      if (!is_file ($file_info2['path']))  die('Файл не существует');  		
        		###############Скиншот GIF #############################
        		#######Получаем имя файла и обратный каталог#####
      $filename = pathinfo($file_info2['path']);
      $ext = $filename['extension'];
      $dir = $filename['dirname'].'/';
      $filename = $filename['basename'];
      $back = mysql_fetch_array(mysql_query("SELECT * FROM `files` WHERE `path` = '".clean($dir)."'"));
            #   	
      ##################
      $bolt=0;
           if(($ext == 'avi' || $ext == '3gp' || $ext == 'mp4') && extension_loaded('ffmpeg')){
      $pre = '<img style="margin: 1px;" src="ffmpeg.php?id='.$file_info['id'].'" alt=""/><br>';
      $bolt=1;
      }
      elseif($ext == 'thm' || $ext == 'nth'){
      $pre =  '<img style="margin: 1px;"  src="theme.php?id='.$file_info['id'].'&amp;W=40&amp;H=40" alt="prev">';
      $bolt=1;
      }
      if(($ext == 'avi' || $ext == 'flv' || $ext =='swf' || $ext =='mp4') AND ( 
          !$h_ua || 
          strpos($h_ua, 'windows') !== false    || 
          strpos($h_ua, 'linux') !== false    || 
          strpos($h_ua, 'bsd') !== false        || 
          strpos($h_ua, 'x11') !== false        || 
          strpos($h_ua, 'unix') !== false        || 
          strpos($h_ua, 'macintosh') !== false    || 
          strpos($h_ua, 'macos') !== false))
      {
      $pre ='<object type="application/x-shockwave-flash" data="uflvplayer_500x375.swf" height="99" width="125">
      <param name="bgcolor" value="#DFE6EF" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="uflvplayer_500x375.swf" />
      <param name="FlashVars" value="way='.$file_info['path'].'&amp;swf=uflvplayer_500x375.swf&amp;w=400&amp;h=300&amp;pic=ffmpeg.php?id='.$file_info['id'].'&amp;autoplay=0&amp;tools=1&amp;skin=white&amp;volume=70&amp;q=&amp;comment=" /></object>
      ';
      	
      }
            if($ext == 'mp3' or $ext == 'wav'){
      echo '<div class="block">';
      if ( 
          !$h_ua || 
          strpos($h_ua, 'windows') !== false    || 
          strpos($h_ua, 'linux') !== false    || 
          strpos($h_ua, 'bsd') !== false        || 
          strpos($h_ua, 'x11') !== false        || 
          strpos($h_ua, 'unix') !== false        || 
          strpos($h_ua, 'macintosh') !== false    || 
          strpos($h_ua, 'macos') !== false) 
          {
      echo'<b>Wiretapping:</b> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 " width="96" height="20" id="own_flashplayer" align="middle">
      <param name="allowScriptAccess" value="sameDomain" />
      <embed src="own_flashplayer_plc.swf?file='.$file_info['path']. '&amp;sta rtplay=false" quality="high" bgcolor="#ffffff" width="96" height="20" name="own_flashplayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
      </object></br>'; }  
      
      
      
      echo '</div>';
      }
       #################	 Скиншот GIF #############################
           if($pre!=NULL) echo '<div class="block">'.$pre.'</div>';
          
      if(is_file($setup['spath'].'/'.$filename.'.gif') or is_file($setup['spath'].'/'.$filename.'.GIF')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.gif&W=40&H=47" alt="screen"></td><td></div>';
      ###############Скиншот JPG #############################
      if(is_file($setup['spath'].'/'.$filename.'.jpg') or is_file($setup['spath'].'/'.$filename.'.JPG')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.jpg&W=40&H=47" alt="screen"></td><td></div> ';
      ###############Скиншот PNG #############################
      if(is_file($setup['spath'].'/'.$filename.'.png') or is_file($setup['spath'].'/'.$filename.'.PNG')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.png&W=40&H=47" alt="screen"></td><td></div>';
      ###############Скиншот JPEG #############################
      if(is_file($setup['spath'].'/'.$filename.'.jpeg') or is_file($setup['spath'].'/'.$filename.'.JPEG')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.jpeg&W=40&H=47" alt="screen"></td><td></div> ';
      
            
      
      
      if (is_file($setup['opath'].'/'.$filename.'.txt')) //если оно в файле
      	{
       	$f = file_get_contents($setup['opath'].'/'.$filename.'.txt');
       	$f=substr($f,0,300);
       	$f = htmlentities($f, ENT_QUOTES, 'UTF-8');
      	echo '<div class="a">'.$f.'...</td></tr></div>';
      	$outp=1;
      	}
       if ($ext == 'txt') {$popis=file_get_contents($file_info2['path']);
        $popis=substr($popis,0,100);
          $popis = htmlentities($popis, ENT_QUOTES, 'UTF-8');
        echo '<div class="a">'.$popis.'...</div>';
        $outp=1;
        }
      //if ($ext != '3gp' and $ext != 'mp4' and $ext != 'jpg' and $ext != 'gif' and $ext != 'png' and $outp!=1) echo'<div class="a">description is missing</div>';
      
      echo'<div class="a"><a href="komm.php?id='.$id2.'">Comment.: ['.$all_komments.']</a>|Rating:<font color="black">'.$file_info['yes'].'</font>/<font color="red">'.$file_info['no'].'</font><font color="blue">|Downloads:</font>['.$file_info['loads'].']<br/></div></div>';
      
      
      
      
      
       	}
      }
      ###############Постраничная навигация########
      echo '
      <div class="pages">';
      $asd= $page - 2;
      $asd2= $page + 3; if ($pages>1){
      if($asd<$all && $asd>0 && $page>3 ) echo ' <a class="page" href="index.php?id='.$id.'&amp;page=1">1</a> ... ';
      for($i=$asd; $i<$asd2;$i++)
      {
      	if($i<$all && $i>0)
       	{
        		if ($i > $pages )  break;
        		if ($page==$i) echo '<span class="page"><b>'.$i.'</b></span> ';
        		else echo '<a class="page" href="index.php?id='.$id.'&amp;page='.$i.'">'.$i.'</a> ';
       	}
      }
      if ($i <= $pages)
      {
       	if($asd2<$all) echo ' ... <a class="page" href="index.php?id='.$id.'&amp;page='.$pages.'">'.$pages.'</a>';
      }
      echo '</div><div class="pages">';}
      ###############Ручной ввод страниц###############
      if ($pages>$setup['pagehand'] and $setup['pagehand_change'] == 1)
      {
      echo '
      
      <form action="index.php?id='.$id.'" method="post"><div class="i_bar">Стр:
      <input class="enter" name="page" type="text" maxlength="4" size="2" value="'.$page.'">
      &nbsp;<input class="buttom" type="submit" value="GO">
      </form></div>';
      }
      echo '
      <div class="title_bord">
      <div class="a">
      <div class="i_bar_t"><a href="user.php?id='.$id.'">Settings</a></div>';
      if($setup['stat_change'] == 1) echo '<div class="i_bar_t"> <a href="stat.php?">Satistics</a></div>';
      if($setup['zakaz'] == 1) echo '<div class="i_bar_t"><a href="table.php?">Advance orders</a></div>';
      echo '<div class="i_bar_t"><a href="'.$setup['site_url'].'">Home</a></div></div>';
      ###############Вывод рекламы###############
      if($setup['buy_change']==1)
      {
      echo '<div class="a">';
      $list = explode("\n",$setup['buy2']);
      if($setup['randbuy']==1) echo '<div class="i_bar_t">'.bbcode($list[mt_rand(0,sizeof($list)-1)]).'</div> ';
      else foreach($list as $value) echo '<div class="i_bar_t">'.bbcode($value).'</div> ';
      echo'</div>';
      }
      
      if($setup['online'] == 1)echo '<div class="menu">Online: <strong>'.$all_online[0].'</strong></div>';
      if(!$error){
      list($msec,$sec)=explode(chr(32),microtime());
      echo '<div class="a">-<a href="apanel.php">Admin Cp</a><br/>Generation. '.round(($sec+$msec)-$HeadTime,4).'с.</div>';}
      echo '<div class="title">';
      echo bbcode($setup['buy3']);
      echo '</div></div></body></html>';
      ?>
      Here is my index file added it as you said admob.php now i get the error
      Parse error: syntax error, unexpected '<' in /home/vhosts/wapwire.co.cc/index.php on line 142
      here is my admob publisher code saved in the file named admob.php
      Code:
        <?php
      // AdMob Publisher Code
      // Language: PHP (curl)
      // Version: 20081105
      // Copyright AdMob, Inc., All rights reserved
      // Documentation at http://developer.admob.com/wiki/Main_Page
      
      $admob_params = array(
        'PUBLISHER_ID'      => 'a14c57099b72085', // Required to request ads. To find your Publisher ID, log in to your AdMob account and click on the "Sites & Apps" tab.
        'ANALYTICS_ID'      => 'your_analytics_site_id', // Required to collect Analytics data. To find your Analytics ID, log in to your Analytics account and click on the "Edit" link next to the name of your site.
        'AD_REQUEST'        => true, // To request an ad, set to TRUE.
        'ANALYTICS_REQUEST' => false, // To enable the collection of analytics data, set to TRUE.
        'TEST_MODE'         => false, // While testing, set to TRUE. When you are ready to make live requests, set to FALSE.
        // Additional optional parameters are available at: http://developer.admob.com/wiki/AdCodeDocumentation
        'OPTIONAL'          => array()
      );
      
      // Optional parameters for AdMob Analytics (http://analytics.admob.com)
      //$admob_params['OPTIONAL']['title'] = "Enter Page Title Here"; // Analytics allows you to track site usage based on custom page titles. Enter custom title in this parameter.
      //$admob_params['OPTIONAL']['event'] = "Enter Event Name Here"; // To learn more about events, log in to your Analytics account and visit this page: http://analytics.admob.com/reports/events/add
      
      /* This code supports the ability for your website to set a cookie on behalf of AdMob
       * To set an AdMob cookie, simply call admob_setcookie() on any page that you call admob_request()
       * The call to admob_setcookie() must occur before any output has been written to the page (http://www.php.net/setcookie)
       * If your mobile site uses multiple subdomains (e.g. "a.example.com" and "b.example.com"), then pass the root domain of your mobile site (e.g. "example.com") as a parameter to admob_setcookie().
       * This will allow the AdMob cookie to be visible across subdomains
       */
      //admob_setcookie();
      
      /* AdMob strongly recommends using cookies as it allows us to better uniquely identify users on your website.
       * This benefits your mobile site by providing:
       *    - Improved ad targeting = higher click through rates = more revenue!
       *    - More accurate analytics data (http://analytics.admob.com)
       */
       
      // Send request to AdMob. To make additional ad requests per page, copy and paste this function call elsewhere on your page.
      echo admob_request($admob_params);
      
      /////////////////////////////////
      // Do not edit below this line //
      /////////////////////////////////
      
      // This section defines AdMob functions and should be used AS IS.
      // We recommend placing the following code in a separate file that is included where needed.
      
      function admob_request($admob_params) {
        static $pixel_sent = false;
      
        $ad_mode = false;
        if (!empty($admob_params['AD_REQUEST']) && !empty($admob_params['PUBLISHER_ID'])) $ad_mode = true;
        
        $analytics_mode = false;
        if (!empty($admob_params['ANALYTICS_REQUEST']) && !empty($admob_params['ANALYTICS_ID']) && !$pixel_sent) $analytics_mode = true;
        
        $protocol = 'http';
        if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') $protocol = 'https';
        
        $rt = $ad_mode ? ($analytics_mode ? 2 : 0) : ($analytics_mode ? 1 : -1);
        if ($rt == -1) return '';
        
        list($usec, $sec) = explode(' ', microtime()); 
        $params = array('rt=' . $rt,
                        'z=' . ($sec + $usec),
                        'u=' . urlencode($_SERVER['HTTP_USER_AGENT']), 
                        'i=' . urlencode($_SERVER['REMOTE_ADDR']), 
                        'p=' . urlencode("$protocol://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']),
                        'v=' . urlencode('20081105-PHPCURL-acda0040bcdea222')); 
      
        $sid = empty($admob_params['SID']) ? session_id() : $admob_params['SID'];
        if (!empty($sid)) $params[] = 't=' . md5($sid);
        if ($ad_mode) $params[] = 's=' . $admob_params['PUBLISHER_ID'];
        if ($analytics_mode) $params[] = 'a=' . $admob_params['ANALYTICS_ID'];
        if (!empty($_COOKIE['admobuu'])) $params[] = 'o=' . $_COOKIE['admobuu'];
        if (!empty($admob_params['TEST_MODE'])) $params[] = 'm=test';
      
        if (!empty($admob_params['OPTIONAL'])) {
          foreach ($admob_params['OPTIONAL'] as $k => $v) {
            $params[] = urlencode($k) . '=' . urlencode($v);
          }
        }
      
        $ignore = array('HTTP_PRAGMA' => true, 'HTTP_CACHE_CONTROL' => true, 'HTTP_CONNECTION' => true, 'HTTP_USER_AGENT' => true, 'HTTP_COOKIE' => true);
        foreach ($_SERVER as $k => $v) {
          if (substr($k, 0, 4) == 'HTTP' && empty($ignore[$k]) && isset($v)) {
            $params[] = urlencode('h[' . $k . ']') . '=' . urlencode($v);
          }
        }
        
        $post = implode('&', $params);
        $request = curl_init();
        $request_timeout = 1; // 1 second timeout
        curl_setopt($request, CURLOPT_URL, 'http://r.admob.com/ad_source.php');
        curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($request, CURLOPT_TIMEOUT, $request_timeout);
        curl_setopt($request, CURLOPT_CONNECTTIMEOUT, $request_timeout);
        curl_setopt($request, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded', 'Connection: Close'));
        curl_setopt($request, CURLOPT_POSTFIELDS, $post);
        list($usec_start, $sec_start) = explode(' ', microtime());
        $contents = curl_exec($request);
        list($usec_end, $sec_end) = explode(' ', microtime());
        curl_close($request);
      
        if ($contents === true || $contents === false) $contents = '';
      
        if (!$pixel_sent) {
          $pixel_sent = true;
          $contents .= "<img src=\"$protocol://p.admob.com/e0?"
                    . 'rt=' . $rt
                    . '&amp;z=' . ($sec + $usec)
                    . '&amp;a=' . ($analytics_mode ? $admob_params['ANALYTICS_ID'] : '')
                    . '&amp;s=' . ($ad_mode ? $admob_params['PUBLISHER_ID'] : '')
                    . '&amp;o=' . (empty($_COOKIE['admobuu']) ? '' : $_COOKIE['admobuu'])
                    . '&amp;lt=' . ($sec_end + $usec_end - $sec_start - $usec_start)
                    . '&amp;to=' . $request_timeout
                    . '" alt="" width="1" height="1"/>';
        }
        
        return $contents;
      }
      
      function admob_setcookie($domain = 'http://wapwire.co.cc', $path = '/') {
        if (empty($_COOKIE['admobuu'])) {    
          $value = md5(uniqid(rand(), true));
          if (!empty($domain) && $domain[0] != '.') $domain = ".$domain";
          if (setcookie('admobuu', $value, mktime(0, 0, 0, 1, 1, 2038), $path, $domain)) {
            $_COOKIE['admobuu'] = $value; // make it visible to admob_request()
          } 
        }
      }
      What am i doing wrong here? help me out here please

      Comment


        #4
        Originally posted by cobusbo View Post
        Code:
        <?php
        #-----------------------------------------------------#
        #             Sharing is Caring....                   #
        #              www.share4m.com                        #
        #        Script is translated by admin@share4m.com    #
        #-----------------------------------------------------#
        
        require 'moduls/ini.php';
        require 'moduls/fun.php';
        require 'moduls/connect.php';
        require 'online.php';
        //require 'moduls/header.php';
        session_name('SID') ;
        
        ###############Сесии###############
        if(session_start()){
        if(!empty($_SESSION["onpage"]) AND !empty($_GET['onpage'])){
        $_SESSION["onpage"]=$_GET['onpage'];
        }
        elseif(empty($_SESSION["onpage"]) AND !empty($_GET['onpage']))
        {
         $onpage=$_GET['onpaget'];
         session_register ("onpage") ;
        }
        
        if(!empty($_SESSION["prew"]) AND !empty($_GET['prew']))
        $_SESSION["prew"]=$_GET['prew'];
        elseif(empty($_SESSION["prew"]) AND !empty($_GET['prew']))
        {
         $prew=$_GET['prew'];
         session_register ("prew") ;
        }
        
        if(!empty($_SESSION["sort"]) AND !empty($_GET['sort']))
        $_SESSION["sort"]=$_GET['sort'];
        elseif(empty($_SESSION["sort"]) AND !empty($_GET['sort']))
        {
         $sort=$_GET['sort'];
         session_register ("sort") ;
        }
         }
         ###############админ###############
        $error = false;
        
        if($_SESSION['autorise'] != $setup['password']){
        $error = true;
        }
        
        if($_SESSION['ipu'] != clean($ip)){
        $error = true;
        }
        ###############Проверка переменных###############
        $onpage = intval($_SESSION["onpage"]);
        $prew = intval($_SESSION["prew"]);
        $sort = get2ses('sort');
        $id = intval($_GET['id']);
        if (!empty ($_POST['page']))
        {
        $page = intval($_POST['page']);}
        else {$page = intval($_GET['page']);}
        $start = intval($_GET['start']);
        
        if($onpage < 3){
        $onpage = 10;
        }
        
        if($prew != 0 and $prew != 1){
        $prew = $setup['preview'];
        }
        
        $valid_sort = array('name' => '','data' => '','load' => '','size' => '','eval' =>'');
        if(!isset($valid_sort[$sort])){
        $sort='name';
        }
        
        $MODE = '`priority` DESC,`name` ASC';
        if($sort == 'data') $MODE = '`priority` DESC,`timeupload` DESC';
        elseif($sort == 'size') $MODE = '`priority` DESC,`size` ASC';
        elseif($sort == 'load') $MODE = '`priority` DESC,`loads` DESC';
        elseif($sort == 'eval' && $setup['eval_change']) $MODE = '`priority` DESC,`yes` DESC ,`no` ASC';
        ###############Получаем текущий каталог#############
        if(!$id){
        $d['path'] = $setup['path'].'/';
        }
        else{
        $d = mysql_fetch_assoc(mysql_query('SELECT `path` FROM `files` WHERE `id` = '.$id.' LIMIT 1'));
        }
        
        if(!is_dir($d['path'])) die('Folder not found.</body></html>');
        
        
        ###############Постраничная навигация###############
        $all = mysql_fetch_row(mysql_query('SELECT COUNT(`id`) FROM `files` WHERE `infolder` = "'.$d['path'].'"'));
        $all = $all[0];
        $pages = ceil($all/$onpage);
        if(!$pages) $pages = 1;
        if($page>$pages or $page<=0) $page=1;
        if($start>$all or $start<=0) $start = 0;
        if($page) $start = ($page - 1) * $onpage; else $start = 0;
        ###############Получаем список файлов###############
        $array_id = array();
        $query = mysql_query('SELECT `id` FROM `files` WHERE `infolder` = "'.$d['path'].'" ORDER BY '.$MODE.' LIMIT '.$start.', '.$onpage);
        while($list_sw = mysql_fetch_row($query)){
        $array_id[] = $list_sw[0];
        }
        ###############Готовим заголовок###################
        $ex = explode('/',$d['path']);
        foreach($ex as $k=>$v)
        {
        if($v!='' and $v!='.' and $v!='..' and $v!=$setup['path'])
        {
        $s = mysql_fetch_array(mysql_query("SELECT `id`,`name` FROM `files` WHERE `path` LIKE '%".clean($v)."/' AND `size` = '0'"));
        $s['name'] = str_replace('*','',$s['name']);
        if($k >= sizeof($ex)-2) $put .= $s['name'];
        else $put .= '<a href="index.php?id='.$s['id'].'">'.$s['name'].'</a>&raquo;';
        }
        }
                                       include 'moduls/header.php';
        ##############Заголовок##########################
        
        echo '<div class="menu"> <a href="'.$setup['site_url'].'">'.$setup['site_url'].'</a>&raquo;<a href="index.php">Downloads</a>&raquo;'.$put.'</div>';
        ###############Вывод рекламы###############
        if($setup['buy_change']==1)
        {
        echo '<div class="a">';
        $list = explode("\n",$setup['buy']);
        if($setup['randbuy']==1) echo '<div class="i_bar_t">'.bbcode($list[mt_rand(0,sizeof($list)-1)]).'</div> ';
        else foreach($list as $value) echo '<div class="i_bar_t">'.bbcode($value).'</div> ';
        echo'</div>';
        }
        
        ############################################
        echo '<div class="a">';
        if($setup['search_change']==1) echo '<div class="i_bar_t"><a href="search.php">Search</a></div>';
        if($setup['top_change']==1) echo '<div class="i_bar_t"><a href="top.php">ТОP '.$setup['top_num'].' files</a></div>';
          $new_all_files = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `files` WHERE `timeupload` > '.($time-(86400*$setup['day_new'])).' AND `size` > 0'));
        if($new_all_files[0]!=0 AND $setup['new_change']==1) echo '<div class="i_bar_t"><a href="new.php">New (+'.$new_all_files[0].')</a></div>';
        include 'user2.php';
        if(!$id AND $setup['new_komm']==1) echo '<div class="i_bar_t"> <a href="allkomm.php?">New. '.$setup['komm_num'].' Comments.</a></div>';
        echo '</div></div>
        ';
        <?php include 'admob.php'; ?>;
        ###############Список фалов и папок###############
        if ($all == 0) echo '<div class="a"><strong>[Empty]</strong></div>';
        foreach($array_id as $key => $value)
        {
         	$file_info = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`path`,`fastabout`,`timeupload`,`infolder`,`size`,`loads`,`yes`,`no` FROM `files` WHERE `id` = "'.$value.'";'));
        
        	if(is_dir($file_info['path']))
         	{
           	if(is_integer($key / 2)) $row = '<div class="dl2">'; else $row = '<div class="dl">';
         	if (!empty($file_info['fastabout'])) $file_info['about'] = str_replace("\n", '<br>',$file_info['about']);
           		//Кол-во новых файлов в папке
           		$new_all="";
                $stime=$time-(3600*24*$setup['day_new']);
           		//NOT USE//$new_all = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `timeupload` > "'.$stime.'" AND `infolder` REGEXP "'.$file_info['path'].'*" AND `size` > "0";'));
           		if($setup['day_new']!=0) $new_all = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `timeupload` > "'.$stime.'" AND `infolder` LIKE  "'.$file_info['path'].'%" AND `size` > "0";'));
        		if($new_all[0] and $setup['day_new']!=0) $new_all = '<font color="red">+'.$new_all[0].'</font>'; else $new_all="";
           		//Всего файлов в папке
           		//NOT USE//$allinfolder = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `infolder` REGEXP "'.$file_info['path'].'*" AND `size` > "0";'));
           		$allinfolder = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `infolder` LIKE  "'.$file_info['path'].'%" AND `size` > "0";'));
        		$name = str_replace('*','',$file_info['name']);
        		###############Cоздание РАЗДЕЛОВ
        	$name32=$file_info['path'];
          	$name32=str_replace('files/','',$name32);
          		$name32=str_replace('/',';',$name32);
          			$name32=str_replace('_',' ',$name32);
        		if (is_file('razdely/'.$name32.'.txt')) //если оно в файле
        	{
         	$razd = file_get_contents('razdely/'.$name32.'.txt');
        $razdely= '<div class="block_top_s_l"> '.$razd.'</div>';
        echo $razdely;
        	}
        			###############Проверка на платность раздела
        			$block=false; //обнуление
        	    click_change();
        		if (is_file('razdely/'.$name32.'.dat')) //если оно в файле
        	{
         $block=1;
        	}
        		if (is_file('razdely/'.$name32.'1.dat')) //если оно в файле
        	{
         $block=2;
        	}
        		//Иконка к папке
        		if(!file_exists($file_info['path'].'folder.png')) $ico = '<img src="ext/dir.png" alt="">'; else $ico = '<img src="'.$file_info['path'].'folder.png" alt="">';
        		//Собсвенно вывод
        		if (!empty($name) and !$block){
           		echo $row.$ico.'<strong><a href="index.php?id='.$file_info[id].'">'.$name.'</a></strong>('.$allinfolder[0].')';
           		if($new_all) echo '<a href="new.php?id1='.$file_info[id].'">'.$new_all.'</a>';
                if(!empty($file_info['fastabout'])) echo '<br>'.str_replace("\n", '<br>',$file_info['fastabout']);
           		echo '</div>';}
           		elseif ($block==1) { ///если раздел платный
           		$id=$file_info[id];
           		$sid=$id*2-30;
               echo $row.$ico.'<strong><a href="pay.php?sid='.$sid.'">'.$name.'</a></strong>('.$allinfolder[0].')'.$new_all;
                if(!empty($file_info['fastabout'])) echo '<br>'.str_replace("\n", '<br>',$file_info['fastabout']);
           		echo '</div>';
               }
              elseif ($block==2) { ///если раздел платный
           		$id=$file_info[id];
           		$gid=$id*2-30;
               echo $row.$ico.'<strong><a href="click.php?gid='.$gid.'&action=1">'.$name.'</a></strong>('.$allinfolder[0].')'.$new_all;
                if(!empty($file_info['fastabout'])) echo '<br>'.str_replace("\n", '<br>',$file_info['fastabout']);
           		echo '</div>';
               }
         	}
         	elseif(is_file($file_info['path']))
         	{
         		if(is_integer($key / 2)) $row = '<div class="title_bord">'; else $row = '<div class="title_bord">'; /////////К ДИЗАЙНУ О ВЫВЕДЕНИИ ФАЙЛОВ
         	if (!empty($file_info['fastabout'])) $file_info['about'] = str_replace("\n", '<br>',$file_info['about']);
          		$ex = pathinfo($file_info['path']);
         		$ext = strtolower($ex['extension']);
          		//Предосмотр
              click_change();
          		$pre = '';
          		if ($prew==0)
          		{
           			if ($ext == 'bmp') $pre = 'Impossible Preview <br>';
           			if ($ext == 'gif' or $ext == 'jpeg' or $ext == 'jpg' or $ext == 'png' or $ext == 'JPG' or $ext == 'GIF' or $ext == 'PNG'or $ext == 'JPEG') $pre = '<img style="margin: 1px;" src="im.php?bab=1&id='.$file_info['id'].'" alt=""/>';
          		}
          		//Komments and loads
          		$all_komments = @mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `komments` WHERE file_id = "'.$file_info['id'].'"'));
          		$all_komments = $all_komments[0];
          		$all_loads = $file_info['loads'];
          		$file_time = date('d.m.y', $file_info['timeupload']);
          		if ($sort=='name'or $sort=='size') $info = '';
          		if($sort=='load') $info = '(<font color="#FFFF00">'.$all_loads.'</font>)';
          		if ($sort=='data') $info = "($file_time)";
          		if ($sort=='eval' and $setup['eval_change']==1) $info = '(<font color="#800000">'.$file_info['yes'].'</font>/<font color="#004080">'.$file_info[no].'</font>)';
          		//Новизна файла
          		$new_info='';
          		$filtime2 = $file_info['timeupload']+(3600*24*$setup['day_new']);
          		if($filtime2>=$time and $setup['day_new']!=0) $new_info = '<font color="black">NEW!</font>';
          		//Красивый размер
          		if($file_info['size'] < 1024) $file_info['size'] = '('.$file_info['size'].'b)';
          		if($file_info['size'] < 1048576 and $file_info['size'] >= 1024) $file_info['size'] = '('.round($file_info['size']/1024, 2).'Kb)';
          		if($file_info['size'] > 1048576) $file_info['size'] = '('.round($file_info['size']/1024/1024, 2).'Mb)';
          		//Иконка к файлу
          		if(!file_exists('ext/'.$ext.'.png') ) $ico = '<img src="ext/stand.png" alt="">';
              elseif ($ext =='jar')  $ico = ' <img src="ic.php?lf='.$file_info['path'].'&id='.$file_info[id].'" alt="" width="16" height="16"/>';
        
               else $ico = '<img src="ext/'.$ext.'.png" alt="">';
          		//Показ расиширения
          		if($setup['ext']==1) $extension = "($ext)"; else $extension = '';
          		//Собственно вывод
          		echo $row;
              $size1=str_replace(')','|',$file_info['size']);
          		$size2=str_replace('(','|',$size1);
          		$info=str_replace('(','|',$info);
          		$info=str_replace(')','|',$info);
          		  		echo '<div class="t_block">'.$ico.'<a href="view.php?id='.$file_info[id].'"><strong>'.$file_info['name'].'</strong></a></div><div class="block">'.$extension.$size2.$info.'|<a href="load.php?id='.$file_info[id].'"><font color="red">Download</font></a>|';
               if($ext =='txt')     {  echo '<a href="read.php?id='.$file_info['id'].'&id2='.$id.'"><font color="red">Read</font></a>';}
                    echo $new_info.'';
          		if(!empty($file_info['fastabout'])) echo str_replace("\n", '<br>',$file_info['fastabout']);
          		echo '</div>';
          		######################################################
          
          
          
          
          
          
          
          		###############Получаем инфу о файле###########
          		$id2=$file_info[id];
        $file_info2 = mysql_fetch_array(mysql_query('SELECT * FROM `files` WHERE `id` = '.$id2));
        if (!is_file ($file_info2['path']))  die('Файл не существует');  		
          		###############Скиншот GIF #############################
          		#######Получаем имя файла и обратный каталог#####
        $filename = pathinfo($file_info2['path']);
        $ext = $filename['extension'];
        $dir = $filename['dirname'].'/';
        $filename = $filename['basename'];
        $back = mysql_fetch_array(mysql_query("SELECT * FROM `files` WHERE `path` = '".clean($dir)."'"));
              #   	
        ##################
        $bolt=0;
             if(($ext == 'avi' || $ext == '3gp' || $ext == 'mp4') && extension_loaded('ffmpeg')){
        $pre = '<img style="margin: 1px;" src="ffmpeg.php?id='.$file_info['id'].'" alt=""/><br>';
        $bolt=1;
        }
        elseif($ext == 'thm' || $ext == 'nth'){
        $pre =  '<img style="margin: 1px;"  src="theme.php?id='.$file_info['id'].'&amp;W=40&amp;H=40" alt="prev">';
        $bolt=1;
        }
        if(($ext == 'avi' || $ext == 'flv' || $ext =='swf' || $ext =='mp4') AND ( 
            !$h_ua || 
            strpos($h_ua, 'windows') !== false    || 
            strpos($h_ua, 'linux') !== false    || 
            strpos($h_ua, 'bsd') !== false        || 
            strpos($h_ua, 'x11') !== false        || 
            strpos($h_ua, 'unix') !== false        || 
            strpos($h_ua, 'macintosh') !== false    || 
            strpos($h_ua, 'macos') !== false))
        {
        $pre ='<object type="application/x-shockwave-flash" data="uflvplayer_500x375.swf" height="99" width="125">
        <param name="bgcolor" value="#DFE6EF" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="uflvplayer_500x375.swf" />
        <param name="FlashVars" value="way='.$file_info['path'].'&amp;swf=uflvplayer_500x375.swf&amp;w=400&amp;h=300&amp;pic=ffmpeg.php?id='.$file_info['id'].'&amp;autoplay=0&amp;tools=1&amp;skin=white&amp;volume=70&amp;q=&amp;comment=" /></object>
        ';
        	
        }
              if($ext == 'mp3' or $ext == 'wav'){
        echo '<div class="block">';
        if ( 
            !$h_ua || 
            strpos($h_ua, 'windows') !== false    || 
            strpos($h_ua, 'linux') !== false    || 
            strpos($h_ua, 'bsd') !== false        || 
            strpos($h_ua, 'x11') !== false        || 
            strpos($h_ua, 'unix') !== false        || 
            strpos($h_ua, 'macintosh') !== false    || 
            strpos($h_ua, 'macos') !== false) 
            {
        echo'<b>Wiretapping:</b> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 " width="96" height="20" id="own_flashplayer" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <embed src="own_flashplayer_plc.swf?file='.$file_info['path']. '&amp;sta rtplay=false" quality="high" bgcolor="#ffffff" width="96" height="20" name="own_flashplayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object></br>'; }  
        
        
        
        echo '</div>';
        }
         #################	 Скиншот GIF #############################
             if($pre!=NULL) echo '<div class="block">'.$pre.'</div>';
            
        if(is_file($setup['spath'].'/'.$filename.'.gif') or is_file($setup['spath'].'/'.$filename.'.GIF')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.gif&W=40&H=47" alt="screen"></td><td></div>';
        ###############Скиншот JPG #############################
        if(is_file($setup['spath'].'/'.$filename.'.jpg') or is_file($setup['spath'].'/'.$filename.'.JPG')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.jpg&W=40&H=47" alt="screen"></td><td></div> ';
        ###############Скиншот PNG #############################
        if(is_file($setup['spath'].'/'.$filename.'.png') or is_file($setup['spath'].'/'.$filename.'.PNG')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.png&W=40&H=47" alt="screen"></td><td></div>';
        ###############Скиншот JPEG #############################
        if(is_file($setup['spath'].'/'.$filename.'.jpeg') or is_file($setup['spath'].'/'.$filename.'.JPEG')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.jpeg&W=40&H=47" alt="screen"></td><td></div> ';
        
              
        
        
        if (is_file($setup['opath'].'/'.$filename.'.txt')) //если оно в файле
        	{
         	$f = file_get_contents($setup['opath'].'/'.$filename.'.txt');
         	$f=substr($f,0,300);
         	$f = htmlentities($f, ENT_QUOTES, 'UTF-8');
        	echo '<div class="a">'.$f.'...</td></tr></div>';
        	$outp=1;
        	}
         if ($ext == 'txt') {$popis=file_get_contents($file_info2['path']);
          $popis=substr($popis,0,100);
            $popis = htmlentities($popis, ENT_QUOTES, 'UTF-8');
          echo '<div class="a">'.$popis.'...</div>';
          $outp=1;
          }
        //if ($ext != '3gp' and $ext != 'mp4' and $ext != 'jpg' and $ext != 'gif' and $ext != 'png' and $outp!=1) echo'<div class="a">description is missing</div>';
        
        echo'<div class="a"><a href="komm.php?id='.$id2.'">Comment.: ['.$all_komments.']</a>|Rating:<font color="black">'.$file_info['yes'].'</font>/<font color="red">'.$file_info['no'].'</font><font color="blue">|Downloads:</font>['.$file_info['loads'].']<br/></div></div>';
        
        
        
        
        
         	}
        }
        ###############Постраничная навигация########
        echo '
        <div class="pages">';
        $asd= $page - 2;
        $asd2= $page + 3; if ($pages>1){
        if($asd<$all && $asd>0 && $page>3 ) echo ' <a class="page" href="index.php?id='.$id.'&amp;page=1">1</a> ... ';
        for($i=$asd; $i<$asd2;$i++)
        {
        	if($i<$all && $i>0)
         	{
          		if ($i > $pages )  break;
          		if ($page==$i) echo '<span class="page"><b>'.$i.'</b></span> ';
          		else echo '<a class="page" href="index.php?id='.$id.'&amp;page='.$i.'">'.$i.'</a> ';
         	}
        }
        if ($i <= $pages)
        {
         	if($asd2<$all) echo ' ... <a class="page" href="index.php?id='.$id.'&amp;page='.$pages.'">'.$pages.'</a>';
        }
        echo '</div><div class="pages">';}
        ###############Ручной ввод страниц###############
        if ($pages>$setup['pagehand'] and $setup['pagehand_change'] == 1)
        {
        echo '
        
        <form action="index.php?id='.$id.'" method="post"><div class="i_bar">Стр:
        <input class="enter" name="page" type="text" maxlength="4" size="2" value="'.$page.'">
        &nbsp;<input class="buttom" type="submit" value="GO">
        </form></div>';
        }
        echo '
        <div class="title_bord">
        <div class="a">
        <div class="i_bar_t"><a href="user.php?id='.$id.'">Settings</a></div>';
        if($setup['stat_change'] == 1) echo '<div class="i_bar_t"> <a href="stat.php?">Satistics</a></div>';
        if($setup['zakaz'] == 1) echo '<div class="i_bar_t"><a href="table.php?">Advance orders</a></div>';
        echo '<div class="i_bar_t"><a href="'.$setup['site_url'].'">Home</a></div></div>';
        ###############Вывод рекламы###############
        if($setup['buy_change']==1)
        {
        echo '<div class="a">';
        $list = explode("\n",$setup['buy2']);
        if($setup['randbuy']==1) echo '<div class="i_bar_t">'.bbcode($list[mt_rand(0,sizeof($list)-1)]).'</div> ';
        else foreach($list as $value) echo '<div class="i_bar_t">'.bbcode($value).'</div> ';
        echo'</div>';
        }
        
        if($setup['online'] == 1)echo '<div class="menu">Online: <strong>'.$all_online[0].'</strong></div>';
        if(!$error){
        list($msec,$sec)=explode(chr(32),microtime());
        echo '<div class="a">-<a href="apanel.php">Admin Cp</a><br/>Generation. '.round(($sec+$msec)-$HeadTime,4).'с.</div>';}
        echo '<div class="title">';
        echo bbcode($setup['buy3']);
        echo '</div></div></body></html>';
        ?>
        Here is my index file added it as you said admob.php now i get the error


        here is my admob publisher code saved in the file named admob.php
        Code:
          <?php
        // AdMob Publisher Code
        // Language: PHP (curl)
        // Version: 20081105
        // Copyright AdMob, Inc., All rights reserved
        // Documentation at http://developer.admob.com/wiki/Main_Page
        
        $admob_params = array(
          'PUBLISHER_ID'      => 'a14c57099b72085', // Required to request ads. To find your Publisher ID, log in to your AdMob account and click on the "Sites & Apps" tab.
          'ANALYTICS_ID'      => 'your_analytics_site_id', // Required to collect Analytics data. To find your Analytics ID, log in to your Analytics account and click on the "Edit" link next to the name of your site.
          'AD_REQUEST'        => true, // To request an ad, set to TRUE.
          'ANALYTICS_REQUEST' => false, // To enable the collection of analytics data, set to TRUE.
          'TEST_MODE'         => false, // While testing, set to TRUE. When you are ready to make live requests, set to FALSE.
          // Additional optional parameters are available at: http://developer.admob.com/wiki/AdCodeDocumentation
          'OPTIONAL'          => array()
        );
        
        // Optional parameters for AdMob Analytics (http://analytics.admob.com)
        //$admob_params['OPTIONAL']['title'] = "Enter Page Title Here"; // Analytics allows you to track site usage based on custom page titles. Enter custom title in this parameter.
        //$admob_params['OPTIONAL']['event'] = "Enter Event Name Here"; // To learn more about events, log in to your Analytics account and visit this page: http://analytics.admob.com/reports/events/add
        
        /* This code supports the ability for your website to set a cookie on behalf of AdMob
         * To set an AdMob cookie, simply call admob_setcookie() on any page that you call admob_request()
         * The call to admob_setcookie() must occur before any output has been written to the page (http://www.php.net/setcookie)
         * If your mobile site uses multiple subdomains (e.g. "a.example.com" and "b.example.com"), then pass the root domain of your mobile site (e.g. "example.com") as a parameter to admob_setcookie().
         * This will allow the AdMob cookie to be visible across subdomains
         */
        //admob_setcookie();
        
        /* AdMob strongly recommends using cookies as it allows us to better uniquely identify users on your website.
         * This benefits your mobile site by providing:
         *    - Improved ad targeting = higher click through rates = more revenue!
         *    - More accurate analytics data (http://analytics.admob.com)
         */
         
        // Send request to AdMob. To make additional ad requests per page, copy and paste this function call elsewhere on your page.
        echo admob_request($admob_params);
        
        /////////////////////////////////
        // Do not edit below this line //
        /////////////////////////////////
        
        // This section defines AdMob functions and should be used AS IS.
        // We recommend placing the following code in a separate file that is included where needed.
        
        function admob_request($admob_params) {
          static $pixel_sent = false;
        
          $ad_mode = false;
          if (!empty($admob_params['AD_REQUEST']) && !empty($admob_params['PUBLISHER_ID'])) $ad_mode = true;
          
          $analytics_mode = false;
          if (!empty($admob_params['ANALYTICS_REQUEST']) && !empty($admob_params['ANALYTICS_ID']) && !$pixel_sent) $analytics_mode = true;
          
          $protocol = 'http';
          if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') $protocol = 'https';
          
          $rt = $ad_mode ? ($analytics_mode ? 2 : 0) : ($analytics_mode ? 1 : -1);
          if ($rt == -1) return '';
          
          list($usec, $sec) = explode(' ', microtime()); 
          $params = array('rt=' . $rt,
                          'z=' . ($sec + $usec),
                          'u=' . urlencode($_SERVER['HTTP_USER_AGENT']), 
                          'i=' . urlencode($_SERVER['REMOTE_ADDR']), 
                          'p=' . urlencode("$protocol://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']),
                          'v=' . urlencode('20081105-PHPCURL-acda0040bcdea222')); 
        
          $sid = empty($admob_params['SID']) ? session_id() : $admob_params['SID'];
          if (!empty($sid)) $params[] = 't=' . md5($sid);
          if ($ad_mode) $params[] = 's=' . $admob_params['PUBLISHER_ID'];
          if ($analytics_mode) $params[] = 'a=' . $admob_params['ANALYTICS_ID'];
          if (!empty($_COOKIE['admobuu'])) $params[] = 'o=' . $_COOKIE['admobuu'];
          if (!empty($admob_params['TEST_MODE'])) $params[] = 'm=test';
        
          if (!empty($admob_params['OPTIONAL'])) {
            foreach ($admob_params['OPTIONAL'] as $k => $v) {
              $params[] = urlencode($k) . '=' . urlencode($v);
            }
          }
        
          $ignore = array('HTTP_PRAGMA' => true, 'HTTP_CACHE_CONTROL' => true, 'HTTP_CONNECTION' => true, 'HTTP_USER_AGENT' => true, 'HTTP_COOKIE' => true);
          foreach ($_SERVER as $k => $v) {
            if (substr($k, 0, 4) == 'HTTP' && empty($ignore[$k]) && isset($v)) {
              $params[] = urlencode('h[' . $k . ']') . '=' . urlencode($v);
            }
          }
          
          $post = implode('&', $params);
          $request = curl_init();
          $request_timeout = 1; // 1 second timeout
          curl_setopt($request, CURLOPT_URL, 'http://r.admob.com/ad_source.php');
          curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
          curl_setopt($request, CURLOPT_TIMEOUT, $request_timeout);
          curl_setopt($request, CURLOPT_CONNECTTIMEOUT, $request_timeout);
          curl_setopt($request, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded', 'Connection: Close'));
          curl_setopt($request, CURLOPT_POSTFIELDS, $post);
          list($usec_start, $sec_start) = explode(' ', microtime());
          $contents = curl_exec($request);
          list($usec_end, $sec_end) = explode(' ', microtime());
          curl_close($request);
        
          if ($contents === true || $contents === false) $contents = '';
        
          if (!$pixel_sent) {
            $pixel_sent = true;
            $contents .= "<img src=\"$protocol://p.admob.com/e0?"
                      . 'rt=' . $rt
                      . '&amp;z=' . ($sec + $usec)
                      . '&amp;a=' . ($analytics_mode ? $admob_params['ANALYTICS_ID'] : '')
                      . '&amp;s=' . ($ad_mode ? $admob_params['PUBLISHER_ID'] : '')
                      . '&amp;o=' . (empty($_COOKIE['admobuu']) ? '' : $_COOKIE['admobuu'])
                      . '&amp;lt=' . ($sec_end + $usec_end - $sec_start - $usec_start)
                      . '&amp;to=' . $request_timeout
                      . '" alt="" width="1" height="1"/>';
          }
          
          return $contents;
        }
        
        function admob_setcookie($domain = 'http://wapwire.co.cc', $path = '/') {
          if (empty($_COOKIE['admobuu'])) {    
            $value = md5(uniqid(rand(), true));
            if (!empty($domain) && $domain[0] != '.') $domain = ".$domain";
            if (setcookie('admobuu', $value, mktime(0, 0, 0, 1, 1, 2038), $path, $domain)) {
              $_COOKIE['admobuu'] = $value; // make it visible to admob_request()
            } 
          }
        }
        What am i doing wrong here? help me out here please
        u have to close php tag before u start.

        use only
        PHP Code:
        include('admob.php'); 
        sigpic

        Comment


          #5
          okay heres my code now
          Code:
          <?php
          #-----------------------------------------------------#
          #             Sharing is Caring....                   #
          #              www.share4m.com                        #
          #        Script is translated by admin@share4m.com    #
          #-----------------------------------------------------#
          
          require 'moduls/ini.php';
          require 'moduls/fun.php';
          require 'moduls/connect.php';
          require 'online.php';
          //require 'moduls/header.php';
          session_name('SID') ;
          
          ###############Сесии###############
          if(session_start()){
          if(!empty($_SESSION["onpage"]) AND !empty($_GET['onpage'])){
          $_SESSION["onpage"]=$_GET['onpage'];
          }
          elseif(empty($_SESSION["onpage"]) AND !empty($_GET['onpage']))
          {
           $onpage=$_GET['onpaget'];
           session_register ("onpage") ;
          }
          
          if(!empty($_SESSION["prew"]) AND !empty($_GET['prew']))
          $_SESSION["prew"]=$_GET['prew'];
          elseif(empty($_SESSION["prew"]) AND !empty($_GET['prew']))
          {
           $prew=$_GET['prew'];
           session_register ("prew") ;
          }
          
          if(!empty($_SESSION["sort"]) AND !empty($_GET['sort']))
          $_SESSION["sort"]=$_GET['sort'];
          elseif(empty($_SESSION["sort"]) AND !empty($_GET['sort']))
          {
           $sort=$_GET['sort'];
           session_register ("sort") ;
          }
           }
           ###############админ###############
          $error = false;
          
          if($_SESSION['autorise'] != $setup['password']){
          $error = true;
          }
          
          if($_SESSION['ipu'] != clean($ip)){
          $error = true;
          }
          ###############Проверка переменных###############
          $onpage = intval($_SESSION["onpage"]);
          $prew = intval($_SESSION["prew"]);
          $sort = get2ses('sort');
          $id = intval($_GET['id']);
          if (!empty ($_POST['page']))
          {
          $page = intval($_POST['page']);}
          else {$page = intval($_GET['page']);}
          $start = intval($_GET['start']);
          
          if($onpage < 3){
          $onpage = 10;
          }
          
          if($prew != 0 and $prew != 1){
          $prew = $setup['preview'];
          }
          
          $valid_sort = array('name' => '','data' => '','load' => '','size' => '','eval' =>'');
          if(!isset($valid_sort[$sort])){
          $sort='name';
          }
          
          $MODE = '`priority` DESC,`name` ASC';
          if($sort == 'data') $MODE = '`priority` DESC,`timeupload` DESC';
          elseif($sort == 'size') $MODE = '`priority` DESC,`size` ASC';
          elseif($sort == 'load') $MODE = '`priority` DESC,`loads` DESC';
          elseif($sort == 'eval' && $setup['eval_change']) $MODE = '`priority` DESC,`yes` DESC ,`no` ASC';
          ###############Получаем текущий каталог#############
          if(!$id){
          $d['path'] = $setup['path'].'/';
          }
          else{
          $d = mysql_fetch_assoc(mysql_query('SELECT `path` FROM `files` WHERE `id` = '.$id.' LIMIT 1'));
          }
          
          if(!is_dir($d['path'])) die('Folder not found.</body></html>');
          
          
          ###############Постраничная навигация###############
          $all = mysql_fetch_row(mysql_query('SELECT COUNT(`id`) FROM `files` WHERE `infolder` = "'.$d['path'].'"'));
          $all = $all[0];
          $pages = ceil($all/$onpage);
          if(!$pages) $pages = 1;
          if($page>$pages or $page<=0) $page=1;
          if($start>$all or $start<=0) $start = 0;
          if($page) $start = ($page - 1) * $onpage; else $start = 0;
          ###############Получаем список файлов###############
          $array_id = array();
          $query = mysql_query('SELECT `id` FROM `files` WHERE `infolder` = "'.$d['path'].'" ORDER BY '.$MODE.' LIMIT '.$start.', '.$onpage);
          while($list_sw = mysql_fetch_row($query)){
          $array_id[] = $list_sw[0];
          }
          ###############Готовим заголовок###################
          $ex = explode('/',$d['path']);
          foreach($ex as $k=>$v)
          {
          if($v!='' and $v!='.' and $v!='..' and $v!=$setup['path'])
          {
          $s = mysql_fetch_array(mysql_query("SELECT `id`,`name` FROM `files` WHERE `path` LIKE '%".clean($v)."/' AND `size` = '0'"));
          $s['name'] = str_replace('*','',$s['name']);
          if($k >= sizeof($ex)-2) $put .= $s['name'];
          else $put .= '<a href="index.php?id='.$s['id'].'">'.$s['name'].'</a>&raquo;';
          }
          }
                                         include 'moduls/header.php';
          ##############Заголовок##########################
          
          echo '<div class="menu"> <a href="'.$setup['site_url'].'">'.$setup['site_url'].'</a>&raquo;<a href="index.php">Downloads</a>&raquo;'.$put.'</div>';
          ###############Вывод рекламы###############
          if($setup['buy_change']==1)
          {
          echo '<div class="a">';
          $list = explode("\n",$setup['buy']);
          if($setup['randbuy']==1) echo '<div class="i_bar_t">'.bbcode($list[mt_rand(0,sizeof($list)-1)]).'</div> ';
          else foreach($list as $value) echo '<div class="i_bar_t">'.bbcode($value).'</div> ';
          echo'</div>';
          }
          
          ############################################
          echo '<div class="a">';
          if($setup['search_change']==1) echo '<div class="i_bar_t"><a href="search.php">Search</a></div>';
          if($setup['top_change']==1) echo '<div class="i_bar_t"><a href="top.php">ТОP '.$setup['top_num'].' files</a></div>';
            $new_all_files = mysql_fetch_row(mysql_query('SELECT COUNT(*) FROM `files` WHERE `timeupload` > '.($time-(86400*$setup['day_new'])).' AND `size` > 0'));
          if($new_all_files[0]!=0 AND $setup['new_change']==1) echo '<div class="i_bar_t"><a href="new.php">New (+'.$new_all_files[0].')</a></div>';
          include 'user2.php';
          if(!$id AND $setup['new_komm']==1) echo '<div class="i_bar_t"> <a href="allkomm.php?">New. '.$setup['komm_num'].' Comments.</a></div>';
          echo '</div></div>
          ';
          include 'admob.php';
          ###############Список фалов и папок###############
          if ($all == 0) echo '<div class="a"><strong>[Empty]</strong></div>';
          foreach($array_id as $key => $value)
          {
           	$file_info = mysql_fetch_array(mysql_query('SELECT `id`,`name`,`path`,`fastabout`,`timeupload`,`infolder`,`size`,`loads`,`yes`,`no` FROM `files` WHERE `id` = "'.$value.'";'));
          
          	if(is_dir($file_info['path']))
           	{
             	if(is_integer($key / 2)) $row = '<div class="dl2">'; else $row = '<div class="dl">';
           	if (!empty($file_info['fastabout'])) $file_info['about'] = str_replace("\n", '<br>',$file_info['about']);
             		//Кол-во новых файлов в папке
             		$new_all="";
                  $stime=$time-(3600*24*$setup['day_new']);
             		//NOT USE//$new_all = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `timeupload` > "'.$stime.'" AND `infolder` REGEXP "'.$file_info['path'].'*" AND `size` > "0";'));
             		if($setup['day_new']!=0) $new_all = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `timeupload` > "'.$stime.'" AND `infolder` LIKE  "'.$file_info['path'].'%" AND `size` > "0";'));
          		if($new_all[0] and $setup['day_new']!=0) $new_all = '<font color="red">+'.$new_all[0].'</font>'; else $new_all="";
             		//Всего файлов в папке
             		//NOT USE//$allinfolder = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `infolder` REGEXP "'.$file_info['path'].'*" AND `size` > "0";'));
             		$allinfolder = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `files` WHERE `infolder` LIKE  "'.$file_info['path'].'%" AND `size` > "0";'));
          		$name = str_replace('*','',$file_info['name']);
          		###############Cоздание РАЗДЕЛОВ
          	$name32=$file_info['path'];
            	$name32=str_replace('files/','',$name32);
            		$name32=str_replace('/',';',$name32);
            			$name32=str_replace('_',' ',$name32);
          		if (is_file('razdely/'.$name32.'.txt')) //если оно в файле
          	{
           	$razd = file_get_contents('razdely/'.$name32.'.txt');
          $razdely= '<div class="block_top_s_l"> '.$razd.'</div>';
          echo $razdely;
          	}
          			###############Проверка на платность раздела
          			$block=false; //обнуление
          	    click_change();
          		if (is_file('razdely/'.$name32.'.dat')) //если оно в файле
          	{
           $block=1;
          	}
          		if (is_file('razdely/'.$name32.'1.dat')) //если оно в файле
          	{
           $block=2;
          	}
          		//Иконка к папке
          		if(!file_exists($file_info['path'].'folder.png')) $ico = '<img src="ext/dir.png" alt="">'; else $ico = '<img src="'.$file_info['path'].'folder.png" alt="">';
          		//Собсвенно вывод
          		if (!empty($name) and !$block){
             		echo $row.$ico.'<strong><a href="index.php?id='.$file_info[id].'">'.$name.'</a></strong>('.$allinfolder[0].')';
             		if($new_all) echo '<a href="new.php?id1='.$file_info[id].'">'.$new_all.'</a>';
                  if(!empty($file_info['fastabout'])) echo '<br>'.str_replace("\n", '<br>',$file_info['fastabout']);
             		echo '</div>';}
             		elseif ($block==1) { ///если раздел платный
             		$id=$file_info[id];
             		$sid=$id*2-30;
                 echo $row.$ico.'<strong><a href="pay.php?sid='.$sid.'">'.$name.'</a></strong>('.$allinfolder[0].')'.$new_all;
                  if(!empty($file_info['fastabout'])) echo '<br>'.str_replace("\n", '<br>',$file_info['fastabout']);
             		echo '</div>';
                 }
                elseif ($block==2) { ///если раздел платный
             		$id=$file_info[id];
             		$gid=$id*2-30;
                 echo $row.$ico.'<strong><a href="click.php?gid='.$gid.'&action=1">'.$name.'</a></strong>('.$allinfolder[0].')'.$new_all;
                  if(!empty($file_info['fastabout'])) echo '<br>'.str_replace("\n", '<br>',$file_info['fastabout']);
             		echo '</div>';
                 }
           	}
           	elseif(is_file($file_info['path']))
           	{
           		if(is_integer($key / 2)) $row = '<div class="title_bord">'; else $row = '<div class="title_bord">'; /////////К ДИЗАЙНУ О ВЫВЕДЕНИИ ФАЙЛОВ
           	if (!empty($file_info['fastabout'])) $file_info['about'] = str_replace("\n", '<br>',$file_info['about']);
            		$ex = pathinfo($file_info['path']);
           		$ext = strtolower($ex['extension']);
            		//Предосмотр
                click_change();
            		$pre = '';
            		if ($prew==0)
            		{
             			if ($ext == 'bmp') $pre = 'Impossible Preview <br>';
             			if ($ext == 'gif' or $ext == 'jpeg' or $ext == 'jpg' or $ext == 'png' or $ext == 'JPG' or $ext == 'GIF' or $ext == 'PNG'or $ext == 'JPEG') $pre = '<img style="margin: 1px;" src="im.php?bab=1&id='.$file_info['id'].'" alt=""/>';
            		}
            		//Komments and loads
            		$all_komments = @mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `komments` WHERE file_id = "'.$file_info['id'].'"'));
            		$all_komments = $all_komments[0];
            		$all_loads = $file_info['loads'];
            		$file_time = date('d.m.y', $file_info['timeupload']);
            		if ($sort=='name'or $sort=='size') $info = '';
            		if($sort=='load') $info = '(<font color="#FFFF00">'.$all_loads.'</font>)';
            		if ($sort=='data') $info = "($file_time)";
            		if ($sort=='eval' and $setup['eval_change']==1) $info = '(<font color="#800000">'.$file_info['yes'].'</font>/<font color="#004080">'.$file_info[no].'</font>)';
            		//Новизна файла
            		$new_info='';
            		$filtime2 = $file_info['timeupload']+(3600*24*$setup['day_new']);
            		if($filtime2>=$time and $setup['day_new']!=0) $new_info = '<font color="black">NEW!</font>';
            		//Красивый размер
            		if($file_info['size'] < 1024) $file_info['size'] = '('.$file_info['size'].'b)';
            		if($file_info['size'] < 1048576 and $file_info['size'] >= 1024) $file_info['size'] = '('.round($file_info['size']/1024, 2).'Kb)';
            		if($file_info['size'] > 1048576) $file_info['size'] = '('.round($file_info['size']/1024/1024, 2).'Mb)';
            		//Иконка к файлу
            		if(!file_exists('ext/'.$ext.'.png') ) $ico = '<img src="ext/stand.png" alt="">';
                elseif ($ext =='jar')  $ico = ' <img src="ic.php?lf='.$file_info['path'].'&id='.$file_info[id].'" alt="" width="16" height="16"/>';
          
                 else $ico = '<img src="ext/'.$ext.'.png" alt="">';
            		//Показ расиширения
            		if($setup['ext']==1) $extension = "($ext)"; else $extension = '';
            		//Собственно вывод
            		echo $row;
                $size1=str_replace(')','|',$file_info['size']);
            		$size2=str_replace('(','|',$size1);
            		$info=str_replace('(','|',$info);
            		$info=str_replace(')','|',$info);
            		  		echo '<div class="t_block">'.$ico.'<a href="view.php?id='.$file_info[id].'"><strong>'.$file_info['name'].'</strong></a></div><div class="block">'.$extension.$size2.$info.'|<a href="load.php?id='.$file_info[id].'"><font color="red">Download</font></a>|';
                 if($ext =='txt')     {  echo '<a href="read.php?id='.$file_info['id'].'&id2='.$id.'"><font color="red">Read</font></a>';}
                      echo $new_info.'';
            		if(!empty($file_info['fastabout'])) echo str_replace("\n", '<br>',$file_info['fastabout']);
            		echo '</div>';
            		######################################################
            
            
            
            
            
            
            
            		###############Получаем инфу о файле###########
            		$id2=$file_info[id];
          $file_info2 = mysql_fetch_array(mysql_query('SELECT * FROM `files` WHERE `id` = '.$id2));
          if (!is_file ($file_info2['path']))  die('Файл не существует');  		
            		###############Скиншот GIF #############################
            		#######Получаем имя файла и обратный каталог#####
          $filename = pathinfo($file_info2['path']);
          $ext = $filename['extension'];
          $dir = $filename['dirname'].'/';
          $filename = $filename['basename'];
          $back = mysql_fetch_array(mysql_query("SELECT * FROM `files` WHERE `path` = '".clean($dir)."'"));
                #   	
          ##################
          $bolt=0;
               if(($ext == 'avi' || $ext == '3gp' || $ext == 'mp4') && extension_loaded('ffmpeg')){
          $pre = '<img style="margin: 1px;" src="ffmpeg.php?id='.$file_info['id'].'" alt=""/><br>';
          $bolt=1;
          }
          elseif($ext == 'thm' || $ext == 'nth'){
          $pre =  '<img style="margin: 1px;"  src="theme.php?id='.$file_info['id'].'&amp;W=40&amp;H=40" alt="prev">';
          $bolt=1;
          }
          if(($ext == 'avi' || $ext == 'flv' || $ext =='swf' || $ext =='mp4') AND ( 
              !$h_ua || 
              strpos($h_ua, 'windows') !== false    || 
              strpos($h_ua, 'linux') !== false    || 
              strpos($h_ua, 'bsd') !== false        || 
              strpos($h_ua, 'x11') !== false        || 
              strpos($h_ua, 'unix') !== false        || 
              strpos($h_ua, 'macintosh') !== false    || 
              strpos($h_ua, 'macos') !== false))
          {
          $pre ='<object type="application/x-shockwave-flash" data="uflvplayer_500x375.swf" height="99" width="125">
          <param name="bgcolor" value="#DFE6EF" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="movie" value="uflvplayer_500x375.swf" />
          <param name="FlashVars" value="way='.$file_info['path'].'&amp;swf=uflvplayer_500x375.swf&amp;w=400&amp;h=300&amp;pic=ffmpeg.php?id='.$file_info['id'].'&amp;autoplay=0&amp;tools=1&amp;skin=white&amp;volume=70&amp;q=&amp;comment=" /></object>
          ';
          	
          }
                if($ext == 'mp3' or $ext == 'wav'){
          echo '<div class="block">';
          if ( 
              !$h_ua || 
              strpos($h_ua, 'windows') !== false    || 
              strpos($h_ua, 'linux') !== false    || 
              strpos($h_ua, 'bsd') !== false        || 
              strpos($h_ua, 'x11') !== false        || 
              strpos($h_ua, 'unix') !== false        || 
              strpos($h_ua, 'macintosh') !== false    || 
              strpos($h_ua, 'macos') !== false) 
              {
          echo'<b>Wiretapping:</b> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 " width="96" height="20" id="own_flashplayer" align="middle">
          <param name="allowScriptAccess" value="sameDomain" />
          <embed src="own_flashplayer_plc.swf?file='.$file_info['path']. '&amp;sta rtplay=false" quality="high" bgcolor="#ffffff" width="96" height="20" name="own_flashplayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
          </object></br>'; }  
          
          
          
          echo '</div>';
          }
           #################	 Скиншот GIF #############################
               if($pre!=NULL) echo '<div class="block">'.$pre.'</div>';
              
          if(is_file($setup['spath'].'/'.$filename.'.gif') or is_file($setup['spath'].'/'.$filename.'.GIF')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.gif&W=40&H=47" alt="screen"></td><td></div>';
          ###############Скиншот JPG #############################
          if(is_file($setup['spath'].'/'.$filename.'.jpg') or is_file($setup['spath'].'/'.$filename.'.JPG')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.jpg&W=40&H=47" alt="screen"></td><td></div> ';
          ###############Скиншот PNG #############################
          if(is_file($setup['spath'].'/'.$filename.'.png') or is_file($setup['spath'].'/'.$filename.'.PNG')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.png&W=40&H=47" alt="screen"></td><td></div>';
          ###############Скиншот JPEG #############################
          if(is_file($setup['spath'].'/'.$filename.'.jpeg') or is_file($setup['spath'].'/'.$filename.'.JPEG')) echo '<div class="block"><tr><td><img style="margin: 1px;" src="im2.php?pic='.$setup['spath'].'/'.$filename.'.jpeg&W=40&H=47" alt="screen"></td><td></div> ';
          
                
          
          
          if (is_file($setup['opath'].'/'.$filename.'.txt')) //если оно в файле
          	{
           	$f = file_get_contents($setup['opath'].'/'.$filename.'.txt');
           	$f=substr($f,0,300);
           	$f = htmlentities($f, ENT_QUOTES, 'UTF-8');
          	echo '<div class="a">'.$f.'...</td></tr></div>';
          	$outp=1;
          	}
           if ($ext == 'txt') {$popis=file_get_contents($file_info2['path']);
            $popis=substr($popis,0,100);
              $popis = htmlentities($popis, ENT_QUOTES, 'UTF-8');
            echo '<div class="a">'.$popis.'...</div>';
            $outp=1;
            }
          //if ($ext != '3gp' and $ext != 'mp4' and $ext != 'jpg' and $ext != 'gif' and $ext != 'png' and $outp!=1) echo'<div class="a">description is missing</div>';
          
          echo'<div class="a"><a href="komm.php?id='.$id2.'">Comment.: ['.$all_komments.']</a>|Rating:<font color="black">'.$file_info['yes'].'</font>/<font color="red">'.$file_info['no'].'</font><font color="blue">|Downloads:</font>['.$file_info['loads'].']<br/></div></div>';
          
          
          
          
          
           	}
          }
          ###############Постраничная навигация########
          echo '
          <div class="pages">';
          $asd= $page - 2;
          $asd2= $page + 3; if ($pages>1){
          if($asd<$all && $asd>0 && $page>3 ) echo ' <a class="page" href="index.php?id='.$id.'&amp;page=1">1</a> ... ';
          for($i=$asd; $i<$asd2;$i++)
          {
          	if($i<$all && $i>0)
           	{
            		if ($i > $pages )  break;
            		if ($page==$i) echo '<span class="page"><b>'.$i.'</b></span> ';
            		else echo '<a class="page" href="index.php?id='.$id.'&amp;page='.$i.'">'.$i.'</a> ';
           	}
          }
          if ($i <= $pages)
          {
           	if($asd2<$all) echo ' ... <a class="page" href="index.php?id='.$id.'&amp;page='.$pages.'">'.$pages.'</a>';
          }
          echo '</div><div class="pages">';}
          ###############Ручной ввод страниц###############
          if ($pages>$setup['pagehand'] and $setup['pagehand_change'] == 1)
          {
          echo '
          
          <form action="index.php?id='.$id.'" method="post"><div class="i_bar">Стр:
          <input class="enter" name="page" type="text" maxlength="4" size="2" value="'.$page.'">
          &nbsp;<input class="buttom" type="submit" value="GO">
          </form></div>';
          }
          echo '
          <div class="title_bord">
          <div class="a">
          <div class="i_bar_t"><a href="user.php?id='.$id.'">Settings</a></div>';
          if($setup['stat_change'] == 1) echo '<div class="i_bar_t"> <a href="stat.php?">Satistics</a></div>';
          if($setup['zakaz'] == 1) echo '<div class="i_bar_t"><a href="table.php?">Advance orders</a></div>';
          echo '<div class="i_bar_t"><a href="'.$setup['site_url'].'">Home</a></div></div>';
          ###############Вывод рекламы###############
          if($setup['buy_change']==1)
          {
          echo '<div class="a">';
          $list = explode("\n",$setup['buy2']);
          if($setup['randbuy']==1) echo '<div class="i_bar_t">'.bbcode($list[mt_rand(0,sizeof($list)-1)]).'</div> ';
          else foreach($list as $value) echo '<div class="i_bar_t">'.bbcode($value).'</div> ';
          echo'</div>';
          }
          
          if($setup['online'] == 1)echo '<div class="menu">Online: <strong>'.$all_online[0].'</strong></div>';
          if(!$error){
          list($msec,$sec)=explode(chr(32),microtime());
          echo '<div class="a">-<a href="apanel.php">Admin Cp</a><br/>Generation. '.round(($sec+$msec)-$HeadTime,4).'с.</div>';}
          echo '<div class="title">';
          echo bbcode($setup['buy3']);
          echo '</div></div></body></html>';
          ?>
          but still no ads show on the script check W4pw!r3

          Comment


            #6
            we checked you site, you have hosted on freetzi.com which provide free hosting. free hosting provider are not allow php ads for wap sites, if you want to ads display on your site then choose paid hosting.

            if you want to paid hosting then we can help u

            Comment


              #7
              Originally posted by videodesihot View Post
              we checked you site, you have hosted on freetzi.com which provide free hosting. free hosting provider are not allow php ads for wap sites, if you want to ads display on your site then choose paid hosting.

              if you want to paid hosting then we can help u
              howcome? i can use ads on 000webhost not on freetzi? very strange oh ok i just checked admob.php is gone
              Last edited by cobusbo; 05.08.10, 19:53.

              Comment


                #8
                Nothing is New...every single thing is same....///problem with indexing directory date wise..is still...
                if i had folders music>engish songs>album
                then albums in english songs folder not arranged with date wise...the latest album goes down to page...any genius can help me ......???????????????????

                Comment


                  #9
                  Getting Error

                  I m getting error 'Folder not found' after setup.... i m new coder... what wrong am i doing??????
                  Last edited by Subha632; 28.07.12, 06:20.

                  Comment

                  Working...
                  X