Guestbook Admin Interface



", $datain); $outCount = count($out) - 1; $j = $outCount-1; if ($order == "desc") { for ($i=0; $i<=$outCount; $i++) { $lines[$j] = unserialize($out[$i]); $j = $j - 1; } } else { for ($i=0; $i<=$outCount; $i++) { $lines[$i] = unserialize($out[$i]); } } // Counting the total number of entries (lines) in the data text file ---------------- $result = count($lines); $count = $result-1; //echo $count."
"; // Caclulate how many pages there are ---------------------------------------- if ($count == 0) { $totalpages = 0; } else { $totalpages = intval(($count - 1) / $perpage) + 1; } $page = $totalpages - ($page - 1); $end = $count - (($totalpages - $page) * $perpage); $start = $end - ($perpage - 1); if ($start < 1) { $start = 1; } //$end = ($perpage * $page) - 1; //$start = $end - $perpage; if ($start < 0) { $start = 0; } //for ($i = $end; $i>=($start-1); $i--) //for ($i = 0; $i<$outCount; $i++) //for ($i=$start-1; $i<$end; $i++) for ($i=$end-1; $i>$start-2; $i--) { echo "Delete
"; echo "
"; echo "$listDatetxt: "; $lines[$i]->showDate(); echo "
$listnametxt: "; $lines[$i]->showFrom(); echo "
$listemailtxt: showEmail(); echo "\">"; $lines[$i]->showEmail(); echo "

$listMessagetxt: "; $lines[$i]->showMessage(); echo "

"; } echo "
"; // Creating the Forward and Backward links ------------------------------------- if ($fwd > 0 && $rwd > 0 && $rwd<$totalpages+1) { echo "
<<"; echo ">>
"; } else if ($fwd == 0) { echo ">>
"; } else if ($rwd == 0) { echo "
<<"; } else if ($rwd == $totalpages+1) { echo "<<
"; } for ($i = 1; $i<=$totalpages; $i++) { echo " [$i] "; } echo "
"; }// end of mpg //include("footer.inc"); ?>

 

Admin Main - Logout