diff --git a/.gitignore b/.gitignore index 71e3ec1baf9d4681b33d959119899643f13990fd..9cfb7a5861ed3f2487506b4714fbcf1fba17d262 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ _darcs/* CVS/* .svn/* RCS/* +.kdev +*.kdev4 diff --git a/admin/appinfo/app.php b/admin/appinfo/app.php index 04f8caf138c5536c461d3a3a14e99b23b18a0d92..e87013bd99309377b5aa0b90acdbb6888f5441a9 100644 --- a/admin/appinfo/app.php +++ b/admin/appinfo/app.php @@ -2,10 +2,10 @@ OC_APP::register( array( "order" => 1, "id" => "admin", "name" => "Administration" )); -OC_APP::addAdminPage( array( "id" => "core_system", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" => "System setting", "icon" => OC_HELPER::imagePath( "admin", "administration.png" ))); +OC_APP::addAdminPage( array( "id" => "core_system", "order" => 1, "href" => OC_HELPER::linkTo( "admin", "system.php" ), "name" =>"System", "icon" => OC_HELPER::imagePath( "admin", "administration.png" ))); OC_APP::addAdminPage( array( "id" => "core_users", "order" => 2, "href" => OC_HELPER::linkTo( "admin", "users.php" ), "name" => "Users", "icon" => OC_HELPER::imagePath( "admin", "users.png" ))); OC_APP::addAdminPage( array( "id" => "core_apps", "order" => 3, "href" => OC_HELPER::linkTo( "admin", "apps.php" ), "name" => "Apps", "icon" => OC_HELPER::imagePath( "admin", "apps.png" ))); -OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins", "icon" => OC_HELPER::imagePath( "admin", "apps.png" ))); +OC_APP::addAdminPage( array( "id" => "core_plugins", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "plugins.php" ), "name" => "Plugins", "icon" => OC_HELPER::imagePath( "admin", "plugins.png" ))); // Add subentries for App installer OC_APP::addNavigationSubEntry( "core_apps", array( "id" => "core_apps_installed", "order" => 4, "href" => OC_HELPER::linkTo( "admin", "apps.php?add=some¶meters=here" ), "name" => "Installed apps", "icon" => OC_HELPER::imagePath( "admin", "navicon.png" ))); diff --git a/admin/img/apps.png b/admin/img/apps.png index 1e6f16651c26da368234185e515f9a189472ae15..ee3e8355e664219251542f04e6e4d5fbecc8859d 100644 Binary files a/admin/img/apps.png and b/admin/img/apps.png differ diff --git a/admin/img/plugins.png b/admin/img/plugins.png new file mode 100644 index 0000000000000000000000000000000000000000..1e6f16651c26da368234185e515f9a189472ae15 Binary files /dev/null and b/admin/img/plugins.png differ diff --git a/admin/img/users.png b/admin/img/users.png index 0d3701918b92e6a33b1a1f2fcc9a50f05c809523..ea2ed9e3335ea5be11896d705b6afaf92a691695 100644 Binary files a/admin/img/users.png and b/admin/img/users.png differ diff --git a/css/styles.css b/css/styles.css index f0832d059471ea06180b539fb8c726217e263cac..d5b5f59f70c27f756ca9a4aaa039000424fc3287 100644 --- a/css/styles.css +++ b/css/styles.css @@ -99,6 +99,9 @@ table td.download { background-image:url('../img/download.png'); } table td.upload { background-image:url('../img/upload.png'); } table td.create { background-image:url('../img/folder-new.png'); } table td.delete { background-image:url('../img/delete.png'); } +#fileList tr input[type=checkbox] { display:none; } +#fileList tr input[type=checkbox]:checked { display:inline; } +#fileList tr:hover input[type=checkbox] { display:inline; } /* NAVIGATION BAR */ p.nav { margin:1em 0 0 2em; padding:0.8em; line-height:16px; font-weight:bold; } diff --git a/files/appinfo/app.php b/files/appinfo/app.php index c542f47b24f0d5c66dab8e2d8be3b32ca323001b..bf67812cf3834417803da61b355af80f52a4ce71 100644 --- a/files/appinfo/app.php +++ b/files/appinfo/app.php @@ -2,7 +2,7 @@ OC_APP::register( array( "order" => 2, "id" => "files", "name" => "Files" )); -OC_APP::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "navicon.png" ), "name" => "Files" )); +OC_APP::addNavigationEntry( array( "id" => "files_index", "order" => 1, "href" => OC_HELPER::linkTo( "files", "index.php" ), "icon" => OC_HELPER::imagePath( "files", "home.png" ), "name" => "Files" )); OC_APP::addSettingsPage( array( "id" => "files_administration", "order" => 1, "href" => OC_HELPER::linkTo( "files", "admin.php" ), "name" => "Files", "icon" => OC_HELPER::imagePath( "files", "folder.png" ))); diff --git a/files/img/file.png b/files/img/file.png new file mode 100644 index 0000000000000000000000000000000000000000..4979044889708bf736aefaee7ade0b1f4462600e Binary files /dev/null and b/files/img/file.png differ diff --git a/files/img/folder.png b/files/img/folder.png index 3e7a3ba8cfec2e569b9bfa28ecfa43dcd68fbd44..3edbe257a34cf50b5015f427138a67ea4debb5cf 100644 Binary files a/files/img/folder.png and b/files/img/folder.png differ diff --git a/files/img/home.png b/files/img/home.png new file mode 100644 index 0000000000000000000000000000000000000000..b3fb9bbaf6fba02fa618187ba4ba03f0eeb21fc5 Binary files /dev/null and b/files/img/home.png differ diff --git a/files/img/navicon.png b/files/img/navicon.png deleted file mode 100644 index 3802c98fc465bce1296799c41db28ba37c0756ae..0000000000000000000000000000000000000000 Binary files a/files/img/navicon.png and /dev/null differ diff --git a/files/index.php b/files/index.php index 2a78e8a438e6311a6445de26b283c6541335d94f..7ac3bce6051431cd82bd15117fcffac399f4e732 100644 --- a/files/index.php +++ b/files/index.php @@ -42,6 +42,9 @@ $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; $files = array(); foreach( OC_FILES::getdirectorycontent( $dir ) as $i ){ $i["date"] = OC_UTIL::formatDate($i["mtime"] ); + if($i['directory']=='/'){ + $i['directory']=''; + } $files[] = $i; } diff --git a/files/js/files.js b/files/js/files.js index 5c11bddeb56b44ff6ac3b306ae73292370202a21..019758dc4976c241f3721cd8acd97a3353557a58 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -39,6 +39,19 @@ $(document).ready(function() { $('.browser input:checkbox').attr('checked', false); }); + // Delete current file + $('#delete_single_file').click(function() { + filename = $('#file_menu').parents('tr:first').find('.filename:first').children('a:first').text(); + $.ajax({ + url: 'ajax/delete.php', + data: "dir="+$('#dir').val()+"&file="+filename, + complete: function(data){ + boolOperationFinished(data, true, $('#file_menu').parents('tr:first')); + } + }); + return false; + }); + $('#file_upload_start').click(function() { $('#file_upload_target').load(uploadFinished); }); @@ -47,7 +60,7 @@ $(document).ready(function() { $.ajax({ url: 'ajax/newfolder.php', data: "dir="+$('#dir').val()+"&foldername="+$('#file_new_dir_name').val(), - complete: boolOpFinished + complete: function(data){boolOperationFinished(data, false);} }); }); @@ -98,14 +111,20 @@ function resetFileActionPanel() { $('#file_action_panel').attr('activeAction', false); } -function boolOpFinished(data) { +function boolOperationFinished(data, single, el) { result = eval("("+data.responseText+");"); if(result.status == 'success'){ - $.ajax({ - url: 'ajax/list.php', - data: "dir="+$('#dir').val(), - complete: refreshContents - }); + if(single) { + $('#file_menu').slideToggle(0); + $('body').append($('#file_menu')); + $(el).remove(); + } else { + $.ajax({ + url: 'ajax/list.php', + data: "dir="+$('#dir').val(), + complete: refreshContents + }); + } } else { alert(result.data.message); } @@ -117,7 +136,11 @@ function refreshContents(data) { updateBreadcrumb(result.data.breadcrumb); } updateFileList(result.data.files); - $('#file_upload_button').click(); + $('td.fileaction a').click(function() { + $(this).parent().append($('#file_menu')); + $('#file_menu').slideToggle(250); + return false; + }); resetFileActionPanel(); } diff --git a/files/templates/index.php b/files/templates/index.php index 75eef0d16e4c952f55d47cf2b5adad383c220231..d38e771c2e1e8f7ae46a1861bfd5bb78f3ad5bb4 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -40,6 +40,6 @@ name="file_upload_target" src=""></iframe></form> <ul> <li><a href="" title="">Download</a></li> <li><a href="" title="">Share</a></li> - <li><a href="" title="">Delete</a></li> + <li><a href="" title="" id="delete_single_file">Delete</a></li> </ul> </div> diff --git a/files/templates/part.breadcrumb.php b/files/templates/part.breadcrumb.php index 4d11edb984aa123a14087de8d0deeb6932dea2e2..da9544008b99137d8f46a1fe1558373c9636ef88 100644 --- a/files/templates/part.breadcrumb.php +++ b/files/templates/part.breadcrumb.php @@ -1,4 +1,4 @@ <a href="<?php echo link_to("files", "index.php?dir=/"); ?>"><img src="<?php echo image_path("", "actions/go-home.png"); ?>" alt="Root" /></a> <?php foreach($_["breadcrumb"] as $crumb): ?> - <a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo $crumb["name"]; ?></a> + <a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a> <?php endforeach; ?> \ No newline at end of file diff --git a/files/templates/part.list.php b/files/templates/part.list.php index 76d938326b66b9e37ce4963ecd3c90e36c5e0740..0d4fcc75489ba916c01eeec8b8f5003637c5e51a 100644 --- a/files/templates/part.list.php +++ b/files/templates/part.list.php @@ -1,9 +1,9 @@ <?php foreach($_["files"] as $file): ?> <tr> <td class="selection"><input type="checkbox" /></td> - <td class="filename"><a style="background-image:url(<?php if($file["type"] == "dir") echo mimetype_icon("dir"); else echo mimetype_icon($file["mime"]); ?>)" href="<?php if($file["type"] == "dir") echo link_to("files", "index.php?dir=".$file["directory"]."/".$file["name"]); else echo link_to("files", "download.php?file=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo $file["name"]; ?></a></td> + <td class="filename"><a style="background-image:url(<?php if($file["type"] == "dir") echo mimetype_icon("dir"); else echo mimetype_icon($file["mime"]); ?>)" href="<?php if($file["type"] == "dir") echo link_to("files", "index.php?dir=".$file["directory"]."/".$file["name"]); else echo link_to("files", "download.php?file=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo htmlspecialchars($file["name"]); ?></a></td> <td class="filesize"><?php echo human_file_size($file["size"]); ?></td> - <td class="date"><?php if($file["type"] != "dir") echo $file["date"]; ?></td> + <td class="date"><?php echo $file["date"]; ?></td> <td class="fileaction"><a href="" title=""><img src="images/drop-arrow.png" alt="+" /></a></td> </tr> <?php endforeach; ?> \ No newline at end of file diff --git a/help/img/help.png b/help/img/help.png index aa222ed83b3c9fce78eeb5c459766993756c6f63..487c6e6fd9241ad9f5e106b2989d16771226d937 100644 Binary files a/help/img/help.png and b/help/img/help.png differ diff --git a/img/help_about.png b/img/help_about.png deleted file mode 100644 index 792d18b1a53e050ec8e484b42712a867197380ae..0000000000000000000000000000000000000000 Binary files a/img/help_about.png and /dev/null differ diff --git a/img/mimetypes/application-octet-stream.png b/img/mimetypes/application-octet-stream.png index 0a90cf06b5f2eb8da1aedd25388183ccefaec7f4..4979044889708bf736aefaee7ade0b1f4462600e 100644 Binary files a/img/mimetypes/application-octet-stream.png and b/img/mimetypes/application-octet-stream.png differ diff --git a/img/places/folder.png b/img/places/folder.png index 3e7a3ba8cfec2e569b9bfa28ecfa43dcd68fbd44..3edbe257a34cf50b5015f427138a67ea4debb5cf 100644 Binary files a/img/places/folder.png and b/img/places/folder.png differ diff --git a/img/task-attention.png b/img/task-attention.png deleted file mode 100644 index 35a112e9d53429da221cfd0b7110a6eae0594b85..0000000000000000000000000000000000000000 Binary files a/img/task-attention.png and /dev/null differ diff --git a/lib/base.php b/lib/base.php index ec3052508091181144311a87738aac1b6c9def57..352474e1e83dde91478fb4cce4f5ea5bad63e567 100644 --- a/lib/base.php +++ b/lib/base.php @@ -242,35 +242,20 @@ class OC_UTIL { public static function showPageNavi($pagecount,$page,$url) { $pagelinkcount=8; - $txt=''; if ($pagecount>1) { - $txt.='<center><table class="pager" cellspacing="0" cellpadding="0" border="0"><tr><td width="1">'; - - if ($page>'0') { - $txt.='<span class="pagerbutton1"><a href="'.$url.($page-1).'">prev</a> </span>'; - } - $txt.='</td><td width="1">'; - $pagestart=$page-$pagelinkcount; if($pagestart<0) $pagestart=0; $pagestop=$page+$pagelinkcount; if($pagestop>$pagecount) $pagestop=$pagecount; - if ($pagestart<>0) $txt.='...'; - for ($i=$pagestart; $i < $pagestop;$i++) { - if ($i<>$page) { - $txt.='<a href="'.$url.$i.'"> '.($i+1).' </a>'; - } else { - $txt.=' <b>'.($i+1).'</b> '; - } - } - if ($pagecount>$pagestop) $txt.='...'; - $txt.='</td><td width="1">'; - if (($page+1)<$pagecount) { - $txt.='<span class="pagerbutton2"><a href="'.$url.($page+1).'">next</a></span>'; - } - $txt.='</td></tr></table></center>'; + + $tmpl = new OC_TEMPLATE( '', 'part.pagenavi', '' ); + $tmpl->assign('page',$page); + $tmpl->assign('pagecount',$pagecount); + $tmpl->assign('pagestart',$pagestart); + $tmpl->assign('pagestop',$pagestop); + $tmpl->assign('url',$url); + $tmpl->printPage(); } - echo($txt); } diff --git a/plugins/publiclink/get.php b/plugins/publiclink/get.php new file mode 100644 index 0000000000000000000000000000000000000000..cdfe42ef262150d02b29c8f84d31a2cdb9d2eea4 --- /dev/null +++ b/plugins/publiclink/get.php @@ -0,0 +1,76 @@ +<?php +$RUNTIME_NOAPPS=true; //no need to load the apps +$RUNTIME_NOSETUPFS=true; //don't setup the fs yet + +require_once '../../lib/base.php'; +require( 'template.php' ); + +require_once 'lib_public.php'; + +//get the path of the shared file +$token=$_GET['token']; +$path=OC_PublicLink::getPath($token); +$root=$path; + +if($path!==false){ + if(isset($_GET['path']) and !strstr($_GET['path'],'..')){ + $subPath=$_GET['path']; + }else{ + $subPath=''; + } + $path.=$subPath; + if(OC_FILESYSTEM::is_dir($path)){ + $files = array(); + $rootLength=strlen($root); + foreach( OC_FILES::getdirectorycontent( $path ) as $i ){ + $i['date'] = OC_UTIL::formatDate($i['mtime'] ); + $i['directory']=substr($i['directory'],$rootLength); + if($i['directory']=='/'){ + $i['directory']=''; + } + $files[] = $i; + } + + // Make breadcrumb + $breadcrumb = array(); + $pathtohere = "/"; + foreach( explode( "/", $subPath ) as $i ){ + if( $i != "" ){ + $pathtohere .= "$i/"; + $breadcrumb[] = array( "dir" => $pathtohere, "name" => $i ); + } + } + + $breadcrumbNav = new OC_TEMPLATE( "plugins/publiclink", "breadcrumb", "" ); + $breadcrumbNav->assign( "breadcrumb", $breadcrumb ); + $breadcrumbNav->assign('token',$token); + + $list = new OC_TEMPLATE( 'plugins/publiclink', 'files', '' ); + $list->assign( 'files', $files ); + $list->assign('token',$token); + + $tmpl = new OC_TEMPLATE( 'plugins/publiclink', 'index', 'user' ); + $tmpl->assign('fileList', $list->fetchPage()); + $tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() ); + $tmpl->printPage(); + }else{ + //get time mimetype and set the headers + $mimetype=OC_FILESYSTEM::getMimeType($path); + header('Content-Transfer-Encoding: binary'); + header('Content-Disposition: attachment; filename="'.basename($path).'"'); + header('Expires: 0'); + header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); + header('Pragma: public'); + header('Content-Type: ' . $mimetype); + header('Content-Length: ' . OC_FILESYSTEM::filesize($path)); + + //download the file + ob_clean(); + OC_FILESYSTEM::readfile($path); + } +}else{ + header("HTTP/1.0 404 Not Found"); + echo '404 Not Found'; + die(); +} +?> \ No newline at end of file diff --git a/plugins/publiclink/getfile.php b/plugins/publiclink/getfile.php deleted file mode 100644 index 15a568df3dc7487484f24c2314ed5f5ad4986163..0000000000000000000000000000000000000000 --- a/plugins/publiclink/getfile.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php -$RUNTIME_NOAPPS=true; //no need to load the apps -$RUNTIME_NOSETUPFS=true; //don't setup the fs yet - -require_once '../../lib/base.php'; - -require_once 'lib_public.php'; - -$token=$_GET['token']; -OC_PublicLink::downloadFile($token); -?> \ No newline at end of file diff --git a/plugins/publiclink/lib_public.php b/plugins/publiclink/lib_public.php index 7c25c938fda53384aec66bb3a7eef39edd948f21..20b538d3ac9bb819f81c7acb0266665ce6deaabd 100644 --- a/plugins/publiclink/lib_public.php +++ b/plugins/publiclink/lib_public.php @@ -6,9 +6,9 @@ class OC_PublicLink{ * @param int (optional) expiretime time the link expires, as timestamp */ public function __construct($path,$expiretime=0){ - if($path && OC_FILESYSTEM::file_exists($path)){ - $token=sha1("$path-$expiretime"); + if($path and OC_FILESYSTEM::file_exists($path) and OC_FILESYSTEM::is_readable($path)){ $user=$_SESSION['user_id']; + $token=sha1("$user-$path-$expiretime"); $query=OC_DB::prepare("INSERT INTO *PREFIX*publiclink VALUES(?,?,?,?)"); $result=$query->execute(array($token,$path,$user,$expiretime)); if( PEAR::isError($result)) { @@ -22,10 +22,9 @@ class OC_PublicLink{ } /** - * download a file shared by a public link - * @param string token + * get the path of that shared file */ - public static function downloadFile($token){ + public static function getPath($token){ //remove expired links $query=OC_DB::prepare("DELETE FROM *PREFIX*publiclink WHERE expire_time < NOW() AND expire_time!=0"); $query->execute(); @@ -41,23 +40,9 @@ class OC_PublicLink{ //prepare the filesystem OC_UTIL::setupFS($user); - //get time mimetype and set the headers - $mimetype=OC_FILESYSTEM::getMimeType($path); - // header('Content-Disposition: attachment; filename="'.basename($path).'"'); - header('Content-Transfer-Encoding: binary'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - header('Content-Type: ' . $mimetype); - header('Content-Length: ' . OC_FILESYSTEM::filesize($path)); - - //download the file - ob_clean(); - OC_FILESYSTEM::readfile($path); + return $path; }else{ - header("HTTP/1.0 404 Not Found"); - echo '404 Not Found'; - die(); + return false; } } diff --git a/plugins/publiclink/templates/breadcrumb.php b/plugins/publiclink/templates/breadcrumb.php new file mode 100644 index 0000000000000000000000000000000000000000..3f4ae863ee0935db3e02fc29f88cb88b91c3cbdc --- /dev/null +++ b/plugins/publiclink/templates/breadcrumb.php @@ -0,0 +1,4 @@ + <a href="<?php echo link_to("plugins/publiclink", "get.php?token=".$_['token']); ?>"><img src="<?php echo image_path("", "actions/go-home.png"); ?>" alt="Root" /></a> + <?php foreach($_["breadcrumb"] as $crumb): ?> + <a href="<?php echo link_to("plugins/publiclink", "get.php?token=".$_['token']."&path=".$crumb["dir"]); ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a> + <?php endforeach; ?> \ No newline at end of file diff --git a/plugins/publiclink/templates/files.php b/plugins/publiclink/templates/files.php new file mode 100644 index 0000000000000000000000000000000000000000..6473ad4c5c82b7846678a89420f33e00c4dd2932 --- /dev/null +++ b/plugins/publiclink/templates/files.php @@ -0,0 +1,9 @@ + <?php foreach($_["files"] as $file): ?> + <tr> + <td class="selection"><input type="checkbox" /></td> + <td class="filename"><a style="background-image:url(<?php if($file["type"] == "dir") echo mimetype_icon("dir"); else echo mimetype_icon($file["mime"]); ?>)" href="<?php if($file["type"] == "dir") echo link_to("plugins/publiclink", "get.php?token=".$_['token']."&path=".$file["directory"]."/".$file["name"]); else echo link_to("plugins/publiclink", "get.php?token=".$_['token']."&path=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo htmlspecialchars($file["name"]); ?></a></td> + <td class="filesize"><?php echo human_file_size($file["size"]); ?></td> + <td class="date"><?php if($file["type"] != "dir") echo $file["date"]; ?></td> + <td class="fileaction"><a href="" title=""><img src="images/drop-arrow.png" alt="+" /></a></td> + </tr> + <?php endforeach; ?> \ No newline at end of file diff --git a/plugins/publiclink/templates/index.php b/plugins/publiclink/templates/index.php new file mode 100644 index 0000000000000000000000000000000000000000..9e238452603d81d4cb125bd6d09a0554c8a8eaec --- /dev/null +++ b/plugins/publiclink/templates/index.php @@ -0,0 +1,17 @@ +<p class="nav"> + <?php echo($_['breadcrumb']); ?> +</p> +<table cellspacing="0"> + <thead> + <tr> + <th><input type="checkbox" id="select_all" /></th> + <th>Name</th> + <th>Size</th> + <th>Modified</th> + <th></th> + </tr> + </thead> + <tbody id="fileList"> + <?php echo($_['fileList']); ?> + </tbody> +</table> \ No newline at end of file diff --git a/settings/img/personal.png b/settings/img/personal.png index 95b4ca396c1686318219be80ea73a3e22aac2179..ae22c1c1dabd45002a1248832fa1583f2c3e78c3 100644 Binary files a/settings/img/personal.png and b/settings/img/personal.png differ diff --git a/templates/part.pagenavi.php b/templates/part.pagenavi.php new file mode 100644 index 0000000000000000000000000000000000000000..d48d0cada32a1aa39c901e4fe61bae62b734a808 --- /dev/null +++ b/templates/part.pagenavi.php @@ -0,0 +1,31 @@ +<center> + <table class="pager" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td width="1"> + <?php if($_['page']>0):?> + <span class="pagerbutton1"><a href="<?php echo $_['url'].($_['page']-1);?>">prev</a> </span> + <?php endif; ?> + </td> + <td> + <?php if ($_['pagestart']>0):?> + ... + <?php endif;?> + <?php for ($i=$_['pagestart']; $i < $_['pagestop'];$i++):?> + <?php if ($_['page']!=$i):?> + <a href="<?php echo $_['url'].$i;?>"><?php echo $i+1;?> </a> + <?php else:?> + <?php echo $i+1;?> + <?php endif?> + <?php endfor;?> + <?php if ($_['pagestop']<$_['pagecount']):?> + ... + <?php endif;?> + </td> + <td width="1"> + <?php if(($_['page']+1)<$_['pagecount']):?> + <span class="pagerbutton2"><a href="<?php echo $_['url'].($_['page']+1);?>">next</a></span> + <?php endif; ?> + </td> + </tr> + </table> +</center> \ No newline at end of file