if ($one_pos_instr == '') { $finData[] = array($z[$y] . ',' . $_POST[time3] => array($z[$y] . ',' . $_POST[time4] => '0')); } else { $s = getTimediff($data); $finData[] = $s; } } elseif ($y < count($z) - 1) { $strtTime1 = 0; $endTime1 = 1439; $data = gpspathFunAll($z[$y], $_POST[map_device_id]); $one_pos_instr = strpos($data, "[2=1]"); $zero_pos_instr = strpos($data, "[2=0]"); if ($one_pos_instr == '') { $finData[] = array($z[$y] . ',' . $_POST[time3] => array($z[$y] . ',' . $_POST[time4] => '0')); } else { $s = getTimediff($data); $finData[] = $s; } } } } /* for($x=0; $x<count($finData); $x++){ $splitData = $finData[$x]; foreach($splitData as $key=>$f){ echo $key.'<br>'; $j=0; foreach($f as $k=>$e){ echo $k.'<br>'; echo $e[$j]; $j++;
<?php include 'connect.inc.php'; $query = "SELECT * FROM main ORDER BY counter DESC"; $result = mysql_query($query); $num = mysql_num_rows($result); echo "<head>\n\t\t\t<style>\n\n\t\t\t\ta:active{\n\t\t\t\t\tcolor:#15c;\n\t\t\t\t}\n\t\t\t\ta:visited{\n\t\t\t\t\tcolor:#15c;\n\t\t\t\t}\n\t\t\t\ta:hover{\n\t\t\t\t\tcolor:#15c;\n\t\t\t\t}\n\t\t\t\ta:unvisited{\n\t\t\t\t\tcolor:#15c;\n\t\t\t\t}\n\t\t\t\ttd{\n\t\t\t\t\tbackground:white;\n\t\t\t\t\tbox-shadow:0px 0px 1px grey;\n\t\t\t\t}\n\t\t\t\t#logo{\n\t\t\t\t\twidth:960px;\n\t\t\t\t\tmargin:20px auto;\n\t\t\t\t\tbackground:#eeeeee;\n\t\t\t\t\tbox-shadow:0px 0px 2px black;\n\t\t\t\t}\n\t\t\t\t#one{\n\t\t\t\t\tfont: italic 75px chiller;\n\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\tcolor: #a64b00;\n\t\t\t\t}\n\t\t\t\t#two{\n\t\t\t\t\tfont:bold 30px jokerman;\n\t\t\t\t\tcolor: black;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\ttop: -10px;\n\t\t\t\t\tleft:5px;\n\t\t\t\t}\n\t\t\t\t#goback{\n\t\t\t\t\tmargin-left:460px;\n\t\t\t\t\tposition:relative;\n\t\t\t\t\ttop:-10px;\n\t\t\t\t\tpadding:6px;\n\t\t\t\t\tbackground:#07B3D3;\n\t\t\t\t}\n\t\t\t\t#goback a:active{\n\t\t\t\t\tcolor:white;\n\t\t\t\t}\n\t\t\t\t#goback a:visited{\n\t\t\t\t\tcolor:white;\n\t\t\t\t}\n\t\t\t\t#goback a:hover{\n\t\t\t\t\tcolor:white;\n\t\t\t\t}\n\t\t\t\t#goback a:unvisited{\n\t\t\t\t\tcolor:white;\n\t\t\t\t}\n\t\t\t\t#footer{\n\t\t\t\t\ttext-align: center;\n\t\t\t\t\twidth: 940px;\n\t\t\t\t\tmin-width: 400px;\n\t\t\t\t\tmargin: 80px auto;\n\t\t\t\t\tmargin-bottom:30px;\n\t\t\t\t\tborder-top: 1px solid grey;\n\t\t\t\t\tpadding:10px;\n\t\t\t\t}\n\t\t\t\t#social{\n\t\t\t\t\tmargin-left: 460px;\n\t\t\t\t}\n\n\t\t\t</style>\n\t\t </head>"; echo "<div id='logo'>\n\t\t\t\t<p>\n\t\t\t\t\t<span id='one'>URL</span>\n\t\t\t\t\t<span id='two'>short.en.er</span>\n\t\t\t\t\t<span id='goback'><a href='index.php'>Click here to go back to home</a></span>\n\t\t\t\t</p>\n\t\t\t</div>"; echo "<table cellpadding='10' style='width:960px;margin:40px auto;text-align:left;font-family:arial,sans-serif;font-size:13px;''>"; echo "<tr>\n\t\t\t<th>LONG URL</th>\n\t\t\t<th>CREATED</th>\n\t\t\t<th>SHORT URL</th>\n\t\t\t<th>CLICKS</th>\n\t\t </tr>"; for ($i = 0; $i < $num; $i++) { $row = mysql_fetch_row($result); $timediff = getTimediff($row[3]); echo "<tr>\n\t\t\t\t<td><a href='{$row['1']}'>{$row['1']}</a></td>\n\t\t\t\t<td>{$timediff}</td>\n\t\t\t\t<td><a href='http://foo.bl.ee/{$row['2']}'>http://foo.bl.ee/{$row['2']}</a></td>\n\t\t\t\t<td>{$row['4']}</td>\n\t\t\t </tr>"; } ?>