function adminDataBase($dbAr)
{
    $z = extract($dbAr);
    //echo "<p>Database= $database</p>\n";
    $gofor = $_REQUEST['gofor'] ? $_REQUEST['gofor'] : '';
    if (!$gofor) {
        openFormA('', '', $pageref, 'POST', '', '', '');
        echo "<p><strong>Table: ";
        radioInput('admintab', 'bldinfo');
        echo "Variable information ";
        radioInput('admintab', 'persons');
        echo "Authorized users ";
        echo "</p>\n";
        closeForm('Administrator', '', '');
    } else {
        $table = $_REQUEST['admintab'] ? $_REQUEST['admintab'] : $table;
        if ($table == 'bldinfo') {
            $indx = 'vid';
            $display = "ctrlname||'_'||var AS row";
        } elseif ($table == 'persons') {
            $indx = 'pid';
            $display = 'wsuid';
        } else {
            $indx = '';
        }
        $tabl = new Listing6($database, $table, $indx, $display, array(), true);
        $tabl->updateBuildInfo('ctrlname', 99, '', 'Mode', 0, "values=manage\tsubmit");
        $tabl->updateBuildInfo('var', 12, '', 'Variable name', 0, '');
        $tabl->manageListing($pageref, array('admintab' => $table));
    }
    return 2;
}
Пример #2
0
	    <?php 
    echo "<td><a href='list_personal.php'>show List</a></td>";
    ?>
	   </tr>
	   <tr>
	    <td><hr color='black'></td>
	   </tr>
	   <?php 
    endPrettyTable();
    ?>
	  </td>
	  <td valign=top align=center width='65%'>
	     <?php 
    openForm("enter Personal", $PHP_SELF);
    beginPrettyTable("2", "enter Personal");
    makeHiddenField("emp_id3", $edit["EMP_ID3"]);
    makeTextField("emp_name", $edit["EMP_NAME"], "Employer Name");
    makeDropBox("desig_id", $desig_array, "Designation", $edit["DESIG_ID"]);
    makeDropBox("status", array("Y" => "Y", "N" => "N", "UNKNOWN" => ""), "Status", $edit["STATUS"]);
    makeTextField("ac_no", $edit["AC_NO"], "Account Number");
    makeTextField("conf_dt", $edit["CONF_DT"], "Conf_Date");
    makeTextField("join_dt", $edit["JOIN_DT"], "Join Date");
    makeSubmitter();
    endPrettyTable();
    closeForm();
    ?>
	</td>
	  </table>
	  <?php 
}
endDocument();
Пример #3
0
 public function edit()
 {
     global $LANG;
     $show = openForm(iSELF . "?object=letter&amp;action=edit2");
     $show .= HiddenField('LetterID', $this->id);
     $show .= beginTable("{$LANG['Details']} {$LANG['Letter']}: {$this->id} , {$this->title}");
     $show .= TextField($LANG['ID'], 'name', $this->name);
     $show .= TextField($LANG['ResellerID'], 'ResellerID', $this->ResellerID);
     $show .= TextField($LANG['Title'], 'title', $this->title);
     $show .= TextField('From', 'from', $this->from);
     $show .= TextField('Subject', 'subject', $this->subject);
     $show .= '<tr><td valign="top"><b>Body:</b></td><td><textarea name="body" cols="120" rows="40" wrap="physical">' . html_entity_decode($this->body, ENT_QUOTES, 'UTF-8') . '</textarea></td></tr>';
     $show .= Submitter('edit_letter', $LANG['Edit']);
     $show .= endTable();
     $show .= closeForm();
     return $show;
 }
Пример #4
0
function searchBar()
{
    global $lSearch, $lLast, $lAddress, $lEmail;
    openForm("searcher", "search.php");
    beginPrettyTable("2");
    echo "<tr><td>\n";
    echo "<b>{$lSearch}</b>: <input name='tosearch' type='text'>\n";
    echo "</td><td valign='center'>\n";
    echo "<select name='searcher' type='text'>\n";
    echo " <option value='last'>{$lLast}\n";
    echo " <option value='address'>{$lAddress}\n";
    echo " <option value='email'>{$lEmail}\n";
    echo "</select>\n";
    echo "<input type='image' align='center' src='images/go.gif' value='submit' border=0>\n";
    echo "</td></tr>\n";
    endPrettyTable();
    closeForm();
}
Пример #5
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;
 }
Пример #6
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;
 }
Пример #7
0
 function exportListing($thisFileName, $idAr, $varOrder)
 {
     //echo "<p>Coming soon...</p>\n";
     $qVars = array_intersect_key($this->getItemInfo(), jt_fill_new($this->colNames, 1));
     if ($_REQUEST['gofor'] == 'Export') {
         $this->createExportQuery(array_keys($qVars), $thisFileName);
     }
     echo "<hr />\n";
     $this->cmsForm('', $this->formid, $thisFileName, 'POST', '', '', '');
     $one = $this->extendedBrowseAlt();
     echo "<p>";
     //checkboxInput('allvars','ALL','');
     echo "<input type=\"checkbox\" name=\"allvars\" value=\"ALL\" checked=\"checked\" ", "onClick=\"manageCheckBoxes('z_allvars',allCheckBoxes,'z_allvars');\" ", "id=\"z_allvars\">\n";
     echo "<strong>All variables</strong></p>\n";
     echo "<table border=\"0\">\n<tr valign=\"top\"><td><strong>\n";
     $colInfo = $this->getItemInfo();
     $qz = sizeof($qVars);
     $half = (int) $qz / 2;
     $boxAr = array();
     foreach ($qVars as $k => $du) {
         //checkboxInput('FLD'.$i,$k,'');
         $fld = 'FLD' . $i;
         echo "<input type=\"checkbox\" name=\"{$fld}\" value=\"{$k}\" ", "onClick=\"manageCheckBoxes('z_{$fld}',allCheckBoxes,'z_allvars');\" ", "id=\"z_{$fld}\">\n";
         $boxAr[] = 'z_' . $fld;
         $v = $colInfo["{$k}"];
         echo $v->getLabel(), "<br />\n";
         $i++;
         if ($i > $half) {
             echo "</strong></td><td><strong>";
             $half = $qz;
         }
     }
     echo "</strong></td></tr></table>\n";
     echo "<script>", createJSarray('allCheckBoxes', $boxAr), "</script>\n";
     closeForm('Export', '', '');
     return 1;
 }