Exemplo n.º 1
0
 public function edit()
 {
     global $LANG;
     $show = openForm(iSELF . '?object=domain&action=edit2');
     $show .= beginTable("{$LANG['Details']} {$LANG['Domain']}: {$this->id} , {$this->name}");
     $show .= HiddenField('DomainID', $this->id);
     $show .= TextField($LANG['Title'], 'name', $this->name);
     $show .= ArrayDropBox($lClient_type, 'Owner', $acct_row['Owner'], array('person', 'person', 'company', 'company', 'businessman', 'businessman'));
     $show .= LargeTextField($LANG['Content'], 'content', $this->content);
     $show .= Submitter('edit_domain', $LANG['Edit']);
     $show .= endTable();
     return $show;
 }
Exemplo n.º 2
0
 public function ShowDomains()
 {
     global $LANG, $DB;
     $objs = Domain::load_domains('*', "`username`='{$this->username}' AND `ServerID`='{$this->ServerID}'");
     $count = count($objs);
     $show = openForm(iSELF, 'get');
     $show .= HiddenField('object', 'testdomain');
     $show .= beginTable("{$count} {$LANG['Domain']}", '100%');
     $show .= makeTH($LANG['Domain'], $LANG['DateClosed']);
     foreach ($objs as $obj) {
         $show .= makeTD("<input type='radio' name='url' value='{$obj->name}' />{$obj->name}", '');
     }
     $show .= ArrayDropBox('проверить', 'action', 'whois', array('http', 'HTTP', 'whois', 'WHOIS'));
     $show .= Submitter('go', 'check');
     $show .= endTable();
     $show .= closeForm();
     return $show;
 }
Exemplo n.º 3
0
 public function add_form($AccountID, $OrderID = null)
 {
     global $LANG, $lInfo, $PAYMETHOD, $PAYTARGET, $DomainPrice;
     $show = openForm(iSELF);
     $show .= HiddenField('object', 'payment');
     $show .= HiddenField('action', 'add2');
     $show .= HiddenField('AccountID', $AccountID);
     $show .= HiddenField('OrderID', $OrderID);
     $show .= beginTable($LANG['Payment']);
     if (!empty($OrderID)) {
         $order = new Order($OrderID);
         $show .= StaticField($LANG['OrderID'], $order->id);
         if ($order->service == 'hosting') {
             // Calculate hosting price
             //$serv = new Service_hosting(array('opentime'=>date('Y-m-d H:i:s', iNOW_UNIX - $order->count*iMON), 'closetime'=>iNOW_TEXT, 'mod'=>$order->package->id));
             $hosting_price = $order->count * $order->package->price;
             $show .= '<tr><td class="nob">' . HiddenField('item', 'hosting') . '</td></tr>';
             $pack_array = array();
             foreach ($PAYMETHOD as $index => $val) {
                 $pack_array[] = $index;
                 $pack_array[] = $val;
             }
             $show .= ArrayDropBox($LANG['Paymethod'], 'method', $order->paymethod, $pack_array);
             $show .= TextField($LANG['Amount'] . ', руб.', 'amount', round($hosting_price, 2));
             if ($order->domaininfo['action'] == 'reg') {
                 $domain_price = $DomainPrice[zone($order->domain)][0];
                 if ($DomainPrice[zone($order->domain)][3]) {
                     foreach ($order->package->bonusdomain as $time => $bonus) {
                         if ($order->count >= $time) {
                             $domain_price = 0.0;
                         }
                     }
                 }
                 $show .= CheckBox($lInfo['reg'] . ' ' . $order->domain, 'domain', true);
                 $show .= TextField($LANG['Domain'] . ' ' . $LANG['Amount'] . ', руб.', 'domain_amount', round($domain_price, 2));
             }
         } elseif ($order->service == 'domain' || $order->service == 'domain_cont') {
             $amount = $order->amount;
             $show .= StaticField('Назаначение', "<input type='radio' name='item' value='{$order->service}' checked='checked' />" . $PAYTARGET[$order->service]['name'] . '<br />(регистрация/продление домена и добавление услуги)<br />' . "<input type='radio' name='item' value='hosting' />" . $PAYTARGET['hosting']['name'] . '<br />(продление хостинга)');
             $pack_array = array();
             foreach ($PAYMETHOD as $index => $val) {
                 $pack_array[] = $index;
                 $pack_array[] = $val;
             }
             $show .= ArrayDropBox($LANG['Paymethod'], 'method', $order->paymethod, $pack_array);
             $show .= TextField($LANG['Amount'], 'amount', round($amount, 2));
         } else {
             $amount = $order->amount;
             $pack_array = array();
             foreach ($PAYTARGET as $index => $val) {
                 $pack_array[] = $index;
                 $pack_array[] = $val['name'];
             }
             $show .= ArrayDropBox($LANG['Service'], 'item', $order->service, $pack_array);
             $pack_array = array();
             foreach ($PAYMETHOD as $index => $val) {
                 $pack_array[] = $index;
                 $pack_array[] = $val;
             }
             $show .= ArrayDropBox($LANG['Paymethod'], 'method', $order->paymethod, $pack_array);
             $show .= TextField($LANG['Amount'], 'amount', round($amount, 2));
         }
     } else {
         $amount = 0.0;
         $Service = 'hosting_cont';
         $PayMethod = '';
         $show .= TextField($LANG['OrderID'], 'OrderID', '');
         $pack_array = array();
         foreach ($PAYTARGET as $index => $val) {
             $pack_array[] = $index;
             $pack_array[] = $val['name'];
         }
         $show .= ArrayDropBox($LANG['Service'], 'item', $Service, $pack_array);
         $pack_array = array();
         foreach ($PAYMETHOD as $index => $val) {
             $pack_array[] = $index;
             $pack_array[] = $val;
         }
         $show .= ArrayDropBox($LANG['Paymethod'], 'method', $PayMethod, $pack_array);
         $show .= TextField($LANG['Amount'], 'amount', round($amount, 2));
     }
     if (!empty($OrderID) && ($order->service == 'hosting' || $order->service == 'hosting_cont')) {
         $show .= CheckBox('Отправить уведомление', 'Note', true);
     } else {
         $show .= CheckBox('Отправить уведомление', 'Note', false);
     }
     $show .= Submitter('new_pay', $LANG['Add']);
     $show .= endTable();
     $show .= closeForm();
     return $show;
 }
Exemplo n.º 4
0
 public function add()
 {
     global $LANG;
     $show = openForm(iSELF);
     $show .= HiddenField('object', 'note');
     $show .= HiddenField('action', 'add2');
     $show .= HiddenField('opentime', '');
     $show .= beginTable("{$LANG['Add']} {$LANG['Note']}");
     $show .= TextField($LANG['Title'], 'title', '');
     $show .= TextField('Автор', 'autor', '');
     $show .= ArrayDropBox('Категория', 'category', 'admin', array('user', 'для пользователей', 'reseller', 'для диллеров', 'admin', 'для персонала'));
     $show .= LargeTextField($LANG['Content'], 'content', '');
     $show .= Submitter("add_note", $LANG['Add']);
     $show .= endTable();
     return $show;
 }