mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-18 04:20:05 +02:00
Add jqplot for graphing
This commit is contained in:
35
phpgwapi/js/jquery/jqplot/examples/nav.inc
Normal file
35
phpgwapi/js/jquery/jqplot/examples/nav.inc
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="nav">
|
||||
<?php
|
||||
$dh = opendir('./');
|
||||
while (false !== ($filename = readdir($dh))) {
|
||||
if (preg_match('/^[a-z0-9]+\.html$/i', $filename)) {
|
||||
$files[] = $filename;
|
||||
}
|
||||
}
|
||||
$fcount = count($files);
|
||||
$parts = explode("/", $_SERVER['SCRIPT_NAME']);
|
||||
$curfile = end($parts);
|
||||
$prevfile = '';
|
||||
$nextfile = '';
|
||||
// echo $fcount, $curfile;
|
||||
// print_r($files);
|
||||
|
||||
for ($i=0; $i<$fcount; $i++) {
|
||||
if ($curfile == $files[$i]) {
|
||||
$prevfile = $files[$i-1];
|
||||
$nextfile = $files[$i+1];
|
||||
if ($i == 0) {
|
||||
$prevfile = $files[$fcount-1];
|
||||
$nextfile = $files[1];
|
||||
}
|
||||
elseif ($i == $fcount-1) {
|
||||
$prevfile = $files[$i-1];
|
||||
$nextfile = $files[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '<a href="'.$prevfile.'">Previous</a> <a href="./">Examples</a> <a href="'.$nextfile.'">Next</a>';
|
||||
|
||||
?>
|
||||
</div>
|
Reference in New Issue
Block a user