Esempio n. 1
0
 function page_hits()
 {
     global $go;
     // default/validate $_GET
     $go['page'] = getURI('page', 0, 'digit', 5);
     $this->template->location = $this->lang->word('main');
     // sub-locations
     $this->template->sub_location[] = array($this->lang->word('referrers'), "?a={$go['a']}&q=refer");
     $this->template->sub_location[] = array($this->lang->word('main'), "?a={$go['a']}");
     load_module_helper('files', $go['a']);
     $today = convertToStamp(getNow());
     $day = substr($today, 6, 2);
     $mn = substr($today, 4, 2);
     $yr = substr($today, 0, 4);
     $thirtydays = date('Y-m-d', mktime('00', '00', '00', $mn - 1, $day, $yr));
     $rs = $this->db->fetchArray("SELECT hit_page, \n            COUNT(hit_page) AS 'total' \n            FROM " . PX . "stats \n            GROUP by hit_page \n            ORDER BY total DESC");
     // ++++++++++++++++++++++++++++++++++++++++++++++++++++
     // table for all our results
     $body = "<table cellpadding='0' cellspacing='0' border='0'>\n";
     $body .= "<tr class='top'>\n";
     $body .= "<th width='90%' class='toptext'><strong>" . $this->lang->word('page') . "</strong></th>\n";
     $body .= "<th width='10%' class='toptext'><strong>" . $this->lang->word('visits') . "</strong></th>\n";
     $body .= "</tr>\n";
     $body .= "</table>\n";
     // dynamic output for table
     $body .= "<table cellpadding='0' cellspacing='0' border='0'>\n";
     if (!$rs) {
         $body .= tr(td('No hits yet', "colspan='2'"));
     } else {
         foreach ($rs as $ar) {
             $body .= tr(td($ar['hit_page'], "width='90%' class='cell-doc'") . td($ar['total'], "width='10%' class='cell-mid'"), row_color(" class='color'"));
         }
     }
     // end dynamic rows output
     $body .= "</table>\n";
     $this->template->body = $body;
     return;
 }
Esempio n. 2
0
 function sbmt_upd_jxdelimg()
 {
     global $go;
     load_module_helper('files', $go['a']);
     // id here really is the name of the file
     $clean['media_id'] = $_POST['id'];
     $this->db->deleteArray('media', "media_file='{$clean[media_id]}'");
     deleteImage($clean['media_id']);
     // image
     deleteImage($clean['media_id'], 'th');
     // thumbnail
     deleteImage($clean['media_id'], 'sys');
     // system thumbnail
     header('Content-type: text/html; charset=utf-8');
     echo "<span class='notify'>" . $this->lang->word('updating') . "</span>";
     exit;
 }