HellFire Posted March 10, 2008 Report Share Posted March 10, 2008 (edited) Labdien man ir maza problema ar demo.php failu nju to jus varesiet redzet seit un es taisuju pamacino no sejienes un man ir demo noraditaja mepe ieksa un scripta ari noradiju pareizi bet nerada nekadus failus man kapec taa un es vel iedosu to scripta kodu <?php include 'lv.php'; $available_dates = array(); $all_files = array(); foreach (glob("C:/Appserv/www/demo/demo2/HLTV Spy-*.zip") as $filename) { if (preg_match('/^demo\/\-\d{10}\-[a-zA-Z0-9_\-\.]{1,200}\.zip$/', $filename)) { $parts = explode("-", $filename); $date = $parts[1]; $map = $parts[2]; $mapparts = explode(".", $map); $map = $mapparts[0]; $year = substr($date,0,2); $month = substr($date,2,2); $day = substr($date,4,2); $hour = substr($date,6,2); $minute = substr($date,8,2); $size = filesize($filename); $ymd = $year.'-'.$month.'-'.$day; if (!in_array($ymd, $available_dates)) { if ($ymd >= date('y-m-d', time() - 504800)) { $available_dates[] = $ymd; } } $all_files[] = array( 'filename' => $filename, 'map' => $map, 'date' => $ymd, 'fulldate' => '20'.$year.'-'.$month.'-'.$day.' '.$hour.':'.$minute, 'size' => $size ); } } rsort($available_dates); $date_to_match = ''; if (empty($_GET['date'])) { if (!empty($available_dates[0])) { $date_to_match = $available_dates[0]; } } elseif ($_GET['date'] >= date('y-m-d', time() - 604800)) { $date_to_match = $_GET['date']; } $files_to_show = array(); foreach($all_files as $v) { if ($v['date'] == $date_to_match) { $files_to_show[] = $v; } } ?> <html> <head> <title>Demo files</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/JavaScript"> <!-- function jump(select_obj) { if (select_obj.value != '') { document.getElementById('form1').submit(); } } //--> </script> </head> <body> <table width="400" border=0 cellspacing=0 cellpadding=0 align="center"> <tr> <td align="left"> <form id="form1"> <select name="date" onchange="jump(this)" size="1"> <option value=""><?php echo $web_lang['hltv_chose_date'];?></option> <?php foreach ($available_dates as $v) { ?> <option <?php echo (!empty($_GET['date']) && $_GET['date'] == $v) ? 'selected="selected"' : ''; ?> value="<?php echo $v; ?>"><?php echo $v; ?></option> <?php } ?> </select> </form> </td> </tr> </table> <br> <table width="400" border=0 cellspacing=0 cellpadding=0 align="center"> <tr> <td width="150" align="left"><?php echo $web_lang['hltv_name'];?></td><td width="50"><?php echo $web_lang['hltv_size'];?></td><td width="150"><?php echo $web_lang['hltv_date'];?></td> </tr> <?php foreach ($files_to_show as $v) { ?> <tr> <td><a href="<?php echo $v['filename']; ?>"><?php echo $v['map']; ?></a></td> <td><?php echo $v['size'] ?></td> <td><?php echo $v['fulldate']; ?></td> </tr> <?php } ?> </table> </body> </html> plzz palidzeit man ja vajag varam sazinaties caur skype mans skype niks ir krisis98 Edited March 10, 2008 by HellFire Link to comment Share on other sites More sharing options...
HellFire Posted March 10, 2008 Author Report Share Posted March 10, 2008 nu tak kads man palidzes vai nepalidzes ???? Link to comment Share on other sites More sharing options...
HellFire Posted March 11, 2008 Author Report Share Posted March 11, 2008 zb jau kads var man palidzet vai nee jau otro treso dienu gaidu kad kads man palidzes Link to comment Share on other sites More sharing options...
duplets Posted March 11, 2008 Report Share Posted March 11, 2008 Nu un kā mums, tev mīļo cilvēcīņ, palīdzēt, pamācībiņā viss pareizi pats tikko notestēju, man viss iet - tev nejiet nēsi kko darijis kā pamācībiņā, ko man tev iekopēt velreiz pamācību, jo citādāk jau neviens nevar tev palīdzēt... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now