Exemplo n.º 1
0
 /**
  * Creates the Group Listing
  * 
  * @param string $code the results code string
  */
 function listGroups($code = '')
 {
     require_once ABSPATH . $this->pluginBase . DIRECTORY_SEPARATOR . 'suitex_list.php';
     $text .= "<div class=\"wrap\">";
     $text .= "<h2>User Groups</h2>";
     $text .= "<span style=\"color: #FF0000; font-weight: bold;\">{$code}</span>";
     $text .= $this->status;
     $headers["group_name"] = "Group Name";
     $headers["members"] = "# of Members";
     $headers["pages"] = "# of Pages";
     $order = "usecurex_group_name";
     $sort = "asc";
     if ($_GET["limit"]) {
         $limit = $_GET["limit"];
     } else {
         $limit = 0;
     }
     $query = "select usecurex_group_id, usecurex_group_name from " . $this->wpdb->prefix . "usecurex_group order by {$order} {$sort}";
     $count = 0;
     $result = $this->wpdb->get_results($query);
     foreach ($result as $row) {
         $count++;
         $memberCount = $this->wpdb->get_var("select count(usecurex_group_id) from " . $this->wpdb->prefix . "usecurex_link where usecurex_group_id = '" . $row->usecurex_group_id . "' and usecurex_field_name = 'user_id'");
         $pageCount = $this->wpdb->get_var("select count(usecurex_group_id) from " . $this->wpdb->prefix . "usecurex_link where usecurex_group_id = '" . $row->usecurex_group_id . "' and usecurex_field_name = 'page_id'");
         $rows[$row->usecurex_group_id] = array($row->usecurex_group_name, $memberCount, $pageCount);
     }
     $url = $this->baseURL . "&sub=form&id=";
     $list = new suitex_list();
     $list->search = false;
     $list->orderForm = false;
     $list->filters = false;
     //$list->omit         = array("cb");
     //$list->paging       = true;
     //$this->pluginPath   = $this->pluginBase;
     $list->setNum = $this->numberPerPage;
     $list->startList($headers, $url, $order, $sort, $rows, $limit, $count);
     $text .= $list->text;
     $text .= "</div>";
     $this->text = $text;
 }
Exemplo n.º 2
0
 /**
  * The administration view of the book list.
  * 
  */
 function bookx_list()
 {
     require_once BOOKX_DIR . 'suitex/suitex_list.php';
     $text .= "<div class=\"wrap\">";
     $text .= "<h2>BookX</h2>";
     $text .= $this->status;
     $headers["bx_item_name"] = "Title";
     $headers["bx_item_author"] = "Author";
     $headers["bx_item_isbn"] = "ISBN";
     $headers["bx_item_sidebar"] = "Sidebar";
     $order = "bx_item_name";
     $sort = "asc";
     if ($_GET["limit"]) {
         $limit = $_GET["limit"];
     } else {
         $limit = 0;
     }
     $query = "select count(bx_item_id) from " . $this->wpdb->prefix . "bx_item";
     $count = $this->wpdb->get_var($query);
     $query = "select ";
     $query .= "bx_item_name as item, ";
     $query .= "bx_item_author as author, ";
     $query .= "bx_item_isbn as isbn, ";
     $query .= "bx_item_sidebar as sidebar, ";
     $query .= "bx_item_id as id ";
     $query .= "from " . $this->wpdb->prefix . "bx_item ";
     $query .= "order by {$order} {$sort} limit {$limit}, " . $this->numberPerPage;
     $result = $this->wpdb->get_results($query);
     foreach ($result as $row) {
         $sidebar = $this->var->filter[$row->sidebar];
         if ($row->item) {
             $itemName = $row->item;
         } else {
             $itemName = "Import Failed";
         }
         $rows[$row->id] = array($itemName, $row->author, $row->isbn, $sidebar);
     }
     $url = $this->baseURL . "&sub=form&id=";
     $list = new suitex_list();
     $list->search = false;
     $list->orderForm = false;
     $list->filters = false;
     $list->omit = array("cb");
     $list->paging = true;
     $list->pluginPath = BOOKX_URL;
     $list->setNum = $this->numberPerPage;
     $list->startList($headers, $url, $order, $sort, $rows, $limit, $count);
     $text .= $list->text;
     $text .= "</div>";
     $this->bookx_stroke($text);
 }
Exemplo n.º 3
0
 /**
  * The administration view of the book list.
  * 
  */
 function svnx_list()
 {
     require_once SVNX_DIR . 'includes/suitex_list.php';
     $text .= "<div class=\"wrap\">";
     $text .= "<h2>SVNX</h2>";
     $text .= $this->status;
     $headers["name"] = "Name";
     $headers["url"] = "URL";
     $headers["username"] = "******";
     $headers["id"] = "ID";
     foreach (array_keys($this->options["repo"]) as $key) {
         $rows[$key] = array($this->options["repo"][$key]["name"], $this->options["repo"][$key]["url"], $this->options["repo"][$key]["username"], $key);
     }
     $url = $this->baseURL . "&sub=form&id=";
     $list = new suitex_list();
     $list->search = false;
     $list->orderForm = false;
     $list->filters = false;
     $list->omit = array("cb");
     $this->paging = true;
     $this->pluginPath = SVNX_URL;
     $list->startList($headers, $url, $order, $sort, $rows, $limit, $this->numberPerPage);
     $text .= $list->text;
     $text .= "</div>";
     $this->svnx_stroke($text);
 }
Exemplo n.º 4
0
 function monitorx_list()
 {
     print_r($this->options);
     if ($this->options["site_type"] == "client") {
         //CLIENT, do you want me to be a serveer?
     } else {
         require_once MONITORX_DIR . 'includes/suitex_list.php';
         $text .= "<div class=\"wrap\">";
         $text .= "<h2>MonitorX</h2>";
         $headers["site"] = "Site";
         $headers["status"] = "Status";
         $headers["version"] = "Wordpress Version";
         $headers["plugin"] = "Plugin Status";
         $headers["url"] = "Link";
         $order = "monitorx_site_name";
         $sort = "asc";
         $query = "select ";
         $query .= "bx_item_name as item, ";
         $query .= "bx_item_author as author, ";
         $query .= "bx_item_isbn as isbn, ";
         $query .= "bx_item_sidebar as sidebar, ";
         $query .= "bx_item_id as id ";
         $query .= "from " . $this->wpdb->prefix . "bx_item ";
         $query .= "order by {$order} {$sort} limit {$limit}, " . $this->numberPerPage;
         $result = $this->wpdb->get_results($query);
         foreach ($result as $row) {
             $sidebar = $this->filter[$row->sidebar];
             if ($row->item) {
                 $itemName = $row->item;
             } else {
                 $itemName = "Import Failed";
             }
             $rows[$row->id] = array($itemName, $row->author, $row->isbn, $sidebar);
         }
         $url = $this->baseURL . "&sub=form&id=";
         $list = new suitex_list();
         $list->search = false;
         $list->orderForm = false;
         $list->filters = false;
         $list->omit = array("cb");
         $this->paging = true;
         $this->pluginPath = BOOKX_URL;
         $list->startList($headers, $url, $order, $sort, $rows, $limit, $this->numberPerPage);
         $text .= $list->text;
         $text .= "</div>";
     }
     $this->monitorx_stroke($text);
 }