Ejemplo n.º 1
0
 static function listbyaccount($AccountID, $pagenum = 1)
 {
     global $DB, $LANG;
     $page_posts = 25;
     $spos = ($pagenum - 1) * $page_posts;
     $result = $DB->query_adv("SELECT SQL_CALC_FOUND_ROWS * FROM `History` LEFT JOIN `Users` USING (`UserID`) WHERE `AccountID`={$AccountID} ORDER BY `HistoryID` DESC LIMIT {$spos},{$page_posts}");
     $FOUND_ROWS = $DB->row($DB->query_adv('SELECT FOUND_ROWS()'));
     $count = $FOUND_ROWS['FOUND_ROWS()'];
     $show = beginTable($LANG['History'] . ' ' . $count . ' записей');
     $show .= makeTH($LANG['Actions'], $LANG['Description'], $LANG['User'], 'Время', 'IP');
     while ($row = $DB->row($result)) {
         $show .= makeTD($row['action'], '<pre>' . $row['text'] . '</pre>', empty($row['username']) ? '---' : $row['username'], $row['time'], $row['ip']);
     }
     $show .= '<tr><td colspan="3" class="nob">';
     $show .= makePageNav($pagenum, $page_posts, $count, iSELF . '?object=account&amp;action=history&amp;AccountID=' . $AccountID . '&amp;');
     $show .= '</td></tr>';
     $show .= endTable();
     return $show;
 }
Ejemplo n.º 2
0
 static function listbyaccount($AccountID, $pagenum = 1)
 {
     global $DB, $LANG;
     $result = $DB->make_select('Pool', 'SQL_CALC_FOUND_ROWS *', '`AccountID`=' . $AccountID, 'PoolID', 'DESC');
     $FOUND_ROWS = $DB->row($DB->query_adv('SELECT FOUND_ROWS()'));
     $count = $FOUND_ROWS['FOUND_ROWS()'];
     $show = beginTable($LANG['History'] . ' задач ' . $count . ' записей');
     $show .= makeTH('info', 'status', 'ServerID', 'time');
     while ($data = $DB->row($result)) {
         $show .= makeTD('<a href="?object=pool&amp;action=show&amp;PoolID=' . $data['PoolID'] . '">' . $data['description'] . '</a>', $data['status'], $data['ServerID'], $data['lastrenty']);
     }
     $show .= endTable();
     return $show;
 }
Ejemplo n.º 3
0
/**
 * Used to draw a described checkbox in a table
 * takes care of everything including surrounding TR's
 * @param cginame - the input name
 * @param value - the input value to be passed back
 * @param state - boolean, if true - makes it checked
 * @param name - the Text to show next to the checkbox
 * @param description - the text to show with onhover (if supported)
 */
function makeTDCheckBox($cginame, $value = 1, $state = false, $name, $description, $color = null, $onClickWarning = null)
{
    $result = "<TD>";
    $result .= "<INPUT type='checkbox' name='{$cginame}' value='{$value}' " . ($state ? " CHECKED " : "");
    if (isset($onClickWarning)) {
        $result .= " onclick=\"if (value==checked) alert('{$onClickWarning}')\"; ";
    }
    $result .= ">";
    //$result .= "<TD><A onmouseout=\"window.status='';\" onmouseover=\"window.status='$description'; return true;\">";
    $result .= "</TD>\n";
    $result .= makeTD($name, $description, $color);
    return $result;
}
Ejemplo n.º 4
0
 public function ShowServices()
 {
     global $LANG;
     $services = Service::load_service('*', '`AccountID`=' . $this->id);
     $show = beginTable(count($services) . " {$LANG['Services']}", '100%');
     $show .= makeTH($LANG['Service'], $LANG['Price'], 'Инфо', $LANG['CreateDate'], $LANG['CloseDate'], 'Списано услугой, руб.');
     foreach ($services as $serv) {
         /*
         	if($serv->ServiceID == 'hosting') {
         		foreach($serv->mod as $mod) {
         			$show .= makeTD(
         		"<a href='?object=service&amp;action=show&amp;ServiceID=$serv->id'>$serv->name</a>",
         		round($mod['price'],2),
         		$mod['package']->id,
         		date('d.m.Y H:i',$mod['opentime']),
         		$mod['time'] == 0 ? '---------' : date('d.m.Y H:i',$mod['opentime']+$mod['time']),
         		round($mod['summ'],4)
         		);
         		}
         	}else
         */
         $show .= makeTD("<a href='?object=service&amp;action=show&amp;ServiceID={$serv->id}'>{$serv->name}</a>", round($serv->price, 2), $serv->getInfo(), date('d.m.Y H:i', strtotime($serv->opentime)), $serv->closetime == '0000-00-00 00:00:00' ? '---------' : date('d.m.Y H:i', strtotime($serv->closetime)), round($serv->getSumm(), 4));
     }
     $show .= endTable();
     return $show;
 }
Ejemplo n.º 5
0
 static function list_domain($pagenum = 1)
 {
     global $LANG, $DB;
     $page_posts = 20;
     $spos = ($pagenum - 1) * $page_posts;
     $objs = Domain::load_domains('*', '', 'DomainID', 'DESC', $page_posts, $spos);
     $count = $DB->count_objs('Domains');
     $result = beginTable("{$count} {$LANG['Domains']}", '100%');
     $result .= makeTH($LANG['ID'], $LANG['Title']);
     foreach ($objs as $obj) {
         $result .= makeTD("<a href='?object=domain&amp;action=show&amp;DomainID={$obj->id}'>{$obj->id}</a>", $obj->name);
     }
     $result .= '<tr><td colspan="10" class="nob">';
     $result .= makePageNav($pagenum, $page_posts, $count, iSELF . '?object=domain&amp;action=list&amp;');
     $result .= '</td></tr>';
     $result .= endTable();
     return $result;
 }