当前位置: 首页>>代码示例>>PHP>>正文


PHP Classes::unarchiveClass方法代码示例

本文整理汇总了PHP中Classes::unarchiveClass方法的典型用法代码示例。如果您正苦于以下问题:PHP Classes::unarchiveClass方法的具体用法?PHP Classes::unarchiveClass怎么用?PHP Classes::unarchiveClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Classes的用法示例。


在下文中一共展示了Classes::unarchiveClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: go

 public function go()
 {
     if (isset($_GET["source"]) && $_GET["source"] == "del") {
         $id = $_GET['id'];
         Classes::deleteClass($id);
         $this->addSuccessMessage("Class has been deleted succesfully");
     } elseif (isset($_GET["source"]) && $_GET["source"] == "addclass") {
         $this->addSuccessMessage("Class has been created succesfully");
     } elseif (isset($_GET["source"]) && $_GET["source"] == "arch") {
         $id = $_GET['id'];
         Classes::archiveClass($id);
         $this->addSuccessMessage("Class has been archived succesfully");
     } elseif (isset($_GET["source"]) && $_GET["source"] == "unarch") {
         $id = $_GET['id'];
         Classes::unarchiveClass($id);
         $this->addSuccessMessage("Class has been unarchived succesfully");
     }
     if (isset($_GET['search']) && isset($_GET['category']) && $_GET['search'] != '' && $_GET['category'] != '') {
         $total_pages = Classes::getNumberOfClasses($_GET['search'], $_GET['category']);
     } else {
         $total_pages = Classes::getNumberOfClasses();
     }
     if (isset($_GET['limit']) && $_GET['limit'] != "") {
         $limit = $_GET['limit'];
     } else {
         $limit = 25;
     }
     $targetpage = SOURCE_ROOT_PATH . "admin/pages/manageclass.php";
     $stages = 3;
     $page = 0;
     if (isset($_GET['page'])) {
         $page = $_GET['page'];
     }
     if ($page) {
         $start = ($page - 1) * $limit;
     } else {
         $start = 0;
     }
     // Initial page num setup
     if ($page == 0) {
         $page = 1;
     }
     $prev = $page - 1;
     $next = $page + 1;
     $lastpage = ceil($total_pages / $limit);
     $LastPagem1 = $lastpage - 1;
     $pagination = array('lastpage' => $lastpage, 'page' => $page, 'targetpage' => $targetpage, 'prev' => $prev, 'next' => $next, 'stages' => $stages, 'last_page_m1' => $LastPagem1);
     if (isset($_GET['search']) && isset($_GET['category']) && $_GET['search'] != '' && $_GET['category'] != '') {
         $classes = Classes::getNClasses($start, $limit, $_GET['search'], $_GET['category']);
     } else {
         $classes = Classes::getNClasses($start, $limit);
     }
     if (isset($_GET['search'])) {
         $this->addToView('search_string', $_GET['search']);
     }
     $this->addToView('classes', $classes);
     $this->addToView('total_pages', $total_pages);
     $this->addToView('pagination', $pagination);
     $this->setViewTemplate('classmanager.tpl');
     $this->generateView();
 }
开发者ID:JoffreyO,项目名称:hackademic,代码行数:61,代码来源:class.ClassManagerController.php


注:本文中的Classes::unarchiveClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。