<?php

$headerInclude = 'subgatewayusers';
include "includes/header.php";
include "../includes/companySubView.php";
$Transtype = isset($HTTP_GET_VARS['trans_type']) ? quote_smart($HTTP_GET_VARS['trans_type']) : "";
$companytype = isset($HTTP_GET_VARS['companymode']) ? $HTTP_GET_VARS['companymode'] : "A";
$companytrans_type = isset($HTTP_GET_VARS['companytrans_type']) ? quote_smart($HTTP_GET_VARS['companytrans_type']) : "A";
$sessionAdmin = isset($HTTP_SESSION_VARS["sessionAdmin"]) ? $HTTP_SESSION_VARS["sessionAdmin"] : "";
$level = 'minimal';
$bank_sql_limit = " and cd_subgateway_id = '" . $resellerInfo['reseller_id'] . "'";
if ($resellerInfo['isMasterMerchant']) {
    beginTable();
    echo genCompanyViewTable('editCompanyInfo.php', 'editCompanyInfo.php', $level);
    endTable("Company Payment");
}
include "includes/footer.php";
Beispiel #2
0
                            <td width="8%"><font face="verdana" size="1">
                              <input name="display_test_transactions" type="checkbox" id="display_test_transactions" value="1">
                              </font>
                                <!--   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set to bill date&nbsp; 
                          <input type="radio" name="daterange" value="B"> -->
                            </td>
                            <td width="47%"><font face="verdana" size="1"> Recurring Transactions </font></td>
                            <td><input name="recur_transaction" type="checkbox" id="recur_transaction" value="1">
                            </td>
                          </tr>
                      </table></td>
                    </tr>
                  </table> 
				    <?php 
beginTable();
echo genCompanyViewTable('reportbottom1.php', 'reportbottom1.php', $adminInfo['li_level']);
endTable("Company Payment");
?>
                  </td>
                  <td height="274" valign="top"><table width="100%">
				<tr height="25"><td><font face="verdana" size="1">First Name</font></td><td><input type="text" maxlength="100" name="firstname" style="font-family:arial;font-size:10px;width:150px"></input></td></tr>
						<tr height="25"><td><font face="verdana" size="1">Last Name</font></td><td><input type="text" maxlength="100" name="lastname" style="font-family:arial;font-size:10px;width:150px"></input></td></tr>
						<tr height="25"><td><font face="verdana" size="1">Telephone 
                    Number</font></td><td><input type="text" maxlength="10" name="telephone" style="font-family:arial;font-size:10px;width:150px"></input></td></tr>
					<tr height="25"><td><font face="verdana" size="1">Email Address</font></td><td><input type="text" maxlength="100" name="email" style="font-family:arial;font-size:10px;width:150px"></input></td></tr>					
					<tr height="25"><td><font face="verdana" size="1">Reference Number
                    </font></td><td><input type="text" maxlength="100" name="transactionId" style="font-family:arial;font-size:10px;width:150px"></input></td></tr>
					<tr height="25">
                        <td><font face="verdana" size="1">Credit Card Number</font></td>
						<td><input type="text" maxlength="16" name="credit_number" style="font-family:arial;font-size:10px;width:150px" onKeyDown="Javascript:clearCheckCardNumber('card')">
						</input></td>
Beispiel #3
0
echo $str_wire_fee_status == "A" ? "selected" : "";
?>
>All</option>
				<option value="R" <?php 
echo $str_wire_fee_status == "R" ? "selected" : "";
?>
>Ready</option>
				<option value="N" <?php 
echo $str_wire_fee_status == "N" ? "selected" : "";
?>
>Not Ready</option>
					</select></td>
				</tr> -->
				<tr>
				<td height="60" colspan="2"><?php 
echo genCompanyViewTable('massmail1.php', 'massmail1.php', 'full');
genResellerViewTable('', 'massmail1.php', 'massmail1.php', $adminInfo['li_level'], NULL, false);
?>
</td>
				 </tr>
			  <tr><td align="right" valign="center" height="30"><font face="verdana" size="1">Subject :</font></td><td align="left" height="30" width="350">&nbsp;<input type="text" maxlength="230" name="subject" style="font-family:arial;font-size:10px;width:280px" value="<?php 
echo $subject;
?>
"></input></td></tr>
		   <tr><td align="center" valign="center" height="30" colspan="2">
		   

		   <textarea  wrap="virtual" name="txtBody" id="txtBody" cols="3" rows="10"><?php 
echo $txtBody;
?>
</textarea>
Beispiel #4
0
        if ($_POST['updateUser']) {
            $adminInfo['li_user_view'] = $li_user_view;
            $adminConfig['vList'] = explode("|", $_POST['userIdList']);
            $sql = "update  `cs_login` set `li_config` = '" . addslashes(gzcompress(serialize($adminConfig))) . "', li_user_view='" . $adminInfo['li_user_view'] . "' WHERE `userid` = " . $adminInfo['userid'];
            mysql_query($sql) or dieLog(mysql_error());
        }
        $_REQUEST['tobatchfield'] = implode(", ", $adminConfig['vList']);
        beginTable();
        ?>
		<input type="hidden" name="userid" id="userid" value="<?php 
        echo $userid;
        ?>
">
		<input type="hidden" name="updateUser" id="updateUser" value="1">
		
		
		<?php 
        echo func_get_enum_radio('cs_login', 'li_user_view', 'li_user_view', $adminInfo['li_user_view']);
        beginTable();
        echo genCompanyViewTable('userManage.php', 'userManage.php', $level);
        endTable("Company Payment");
        ?>
		
		<?php 
        $userSelect = ob_get_contents();
        ob_end_clean();
        doTable($userSelect, "User May View", "userManage.php", false, false, false, 'frmSelComp');
    }
    $adminConfig = NULL;
}
include "includes/footer.php";
Beispiel #5
0
//                                                                  //
//******************************************************************//
// Package:         Zerone-consulting
// Description:     Online Payment Gateway
// Files:           index.php,home.php,cheque.php,creditcard.php,report.php,reportBottom.php, reportBottomSummary.php,companyEdit.php
//    				config.php,useraccount.php,viewCompany.php,topheader.php,ViewreportPage.php,addcheque.php,blank.php,administration_blank.php,virtualterminal.php,creditcardfb.php,negativedatabase.php
//					viewreportpage_negative.php,batchuploads.php,voicesystem.php,voicesystemreport.php,voicesystemdetails.php,companyAdd.php,companies_blank.php
//					modifycompany.php,companyuser.php,orderemail.php,enquires.php,report_custom.php,service_users.php,export.php,ledger.php
//					labels.php,printemailforms.php,maileditor.php,shipping.php,shippingdetails.php,logout.php
// viewcompany.php:	The admin page functions for viewing the company.
$allowBank = true;
include "includes/sessioncheck.php";
include "../includes/companySubView.php";
$headerInclude = "companies";
include "includes/header.php";
$Transtype = isset($HTTP_GET_VARS['trans_type']) ? quote_smart($HTTP_GET_VARS['trans_type']) : "";
$companytype = isset($HTTP_GET_VARS['companymode']) ? $HTTP_GET_VARS['companymode'] : "A";
$companytrans_type = isset($HTTP_GET_VARS['companytrans_type']) ? quote_smart($HTTP_GET_VARS['companytrans_type']) : "A";
$sessionAdmin = isset($HTTP_SESSION_VARS["sessionAdmin"]) ? $HTTP_SESSION_VARS["sessionAdmin"] : "";
$level = 'minimal';
if ($adminInfo['li_level'] == 'full') {
    $level = 'full';
}
if ($adminInfo['username'] == 'etel1') {
    $_GET['showall'] = 1;
    $level = 'medium';
}
beginTable();
echo genCompanyViewTable('editCompanyProfileAccess.php', 'viewCompanyNext.php', $level);
endTable("Select Company");
include "includes/footer.php";
function smart_search_elements($form_elements, $sql_pairs, $name_append = "", $sql_results = "")
{
    foreach ($form_elements as $input => $values) {
        $style = "";
        if (isset($values['style'])) {
            foreach ($values['style'] as $element => $value) {
                $style .= ($style == "" ? "" : " ") . "{$element} = \"{$value}\"";
            }
        }
        $action = "";
        if (isset($values['options']['source']['ajax'])) {
            $action = $values['options']['source']['parameters']['on_action'] . "=\"" . $values['options']['source']['parameters']['ajax_call'] . "(this.value)\"";
        }
        if (isset($values['action'])) {
            $action = $values['action'];
        }
        $this_element = "frm_" . str_replace(".", "_", $input) . ($name_append != "" ? "_" . $name_append : "");
        $display = !isset($values['display']) ? $input : ($values['display'] != "" ? $values['display'] : "");
        $pairs = NULL;
        if (isset($values['options']['source']['script'])) {
            $pairs = $values['options']['source']['script']($values['options']['source']['parameters']);
        }
        if (isset($values['options']['source']['ajax'])) {
            $pairs = $values['options']['source']['ajax']($values['options']['source']['parameters']);
        }
        if (isset($values['options']['source']['pairs'])) {
            $pairs = $sql_pairs[$values['options']['source']['pairs']];
        }
        if ($pairs != NULL) {
            foreach ($pairs as $index => $pair) {
                if (isset($pair['condition_var'])) {
                    if ($sql_results[$pair['condition_var']] != $pair['condition_val']) {
                        $pairs[$index]['disabled'] = true;
                        //unset($pairs[$index]);
                    }
                }
            }
        }
        $options = "";
        switch ($values['input_type']) {
            case "hidden":
                break;
            case "company_search":
                $frm_entity[] = array("input" => "<b>{$display}:</b>\r\n" . genCompanyViewTable('', '', 'full', false));
                break;
            case "select":
                if ($display != "") {
                    $display = "<b>{$display}:</b>\r\n";
                }
                if ($pairs != NULL) {
                    foreach ($pairs as $pair) {
                        $options .= "<option value='" . $pair['value'] . "' " . ($pair['disabled'] ? 'disabled ' : '') . (isset($_REQUEST[$this_element]) && !strcasecmp($_REQUEST[$this_element], $pair['value']) || !isset($_REQUEST[$this_element]) && isset($pair['default']) ? " selected " : "") . ">" . $pair['display'] . "</option>\r\n";
                    }
                }
                $frm_entity[] = array("name" => "{$display}&nbsp;", "input" => "<select id='{$this_element}' name='{$this_element}' {$style} {$action}>" . $options . "</select>");
                break;
            case "selectmulti":
                if ($display != "") {
                    $display = "<b>{$display}:</b>";
                }
                if ($pairs != NULL) {
                    foreach ($pairs as $pair) {
                        $options .= "<option value=\"" . $pair['value'] . "\"" . (isset($_REQUEST[$this_element]) && smart_verifyFormValue($_REQUEST[$this_element], $pair) ? " selected " : "") . ">" . $pair['display'] . "</option>\r\n";
                    }
                }
                $frm_entity[] = array("name" => "{$display}&nbsp;", "input" => "<select {$action} {$style} multiple id='{$this_element}' name='" . $this_element . "[]'>" . $options . "</select>");
                break;
            case "radio":
                if ($display != "") {
                    $display = "<b>{$display}:</b>";
                }
                if ($pairs != NULL) {
                    foreach ($pairs as $pair) {
                        $checked = "";
                        if (isset($_REQUEST[$this_element]) && !strcasecmp($_REQUEST[$this_element], $pair['value'])) {
                            $checked = "checked";
                        }
                        if (!isset($_REQUEST[$this_element]) && isset($pair['default'])) {
                            $checked = "checked";
                        }
                        $options .= "<input {$action} {$style} type='radio' id='{$this_element}' name='{$this_element}' value=\"" . $pair['value'] . "\" " . $checked . ">" . $pair['display'] . "</input>\r\n";
                    }
                }
                $frm_entity[] = array("name" => "{$display}&nbsp;", "input" => $options);
                break;
            case "checkbox":
                if ($display != "") {
                    $display = "<b>{$display}:</b>";
                }
                if ($pairs == NULL) {
                    $options .= "<input {$action} {$style} type='checkbox' id='{$this_element}' name='" . $this_element . "' value=\"" . $values['value'] . "\"" . (isset($_REQUEST[$this_element]) && !strcasecmp($_REQUEST[$this_element], $values['value']) ? " checked " : "") . ">" . $values['display'] . "</input><br>\r\n";
                } else {
                    $chkcnt = 0;
                    foreach ($pairs as $pair) {
                        $checked = "";
                        if (isset($_REQUEST[$this_element]) && smart_verifyFormValue($_REQUEST[$this_element], $pair)) {
                            $checked = "checked";
                        }
                        if (!isset($_REQUEST[$this_element]) && isset($pair['default'])) {
                            $checked = "checked";
                        }
                        $options .= (!($chkcnt++ % 4) && $chkcnt != 1 ? "<BR>" : "") . "<input {$action} {$style} type='checkbox' id='{$this_element}' name='" . $this_element . "[]' value=\"" . $pair['value'] . "\" {$checked}>" . $pair['display'] . "</input>\r\n";
                    }
                }
                if ($pairs != NULL) {
                    $frm_entity[] = array("name" => "{$display}&nbsp;", "input" => $options);
                } else {
                    $frm_entity[] = array("name" => "&nbsp;", "input" => $options);
                }
                break;
            case "between":
                if ($display != "") {
                    $displayb = "<b>{$display} To:</b>";
                } else {
                    $displayb = "";
                }
                if ($display != "") {
                    $display = "<b>{$display} From:</b>";
                }
                $frm_entity[] = array("name" => "{$display}&nbsp;", "input" => "<input {$action} {$style} type='text' id='" . $this_element . "_to' name='" . $this_element . "_from' value=\"" . (isset($_REQUEST[$this_element . "_from"]) ? $_REQUEST[$this_element . "_from"] : date("Y-m-d 00:00:00")) . "\"></input>");
                $frm_entity[] = array("name" => "{$displayb}&nbsp;", "input" => "<input {$action} {$style} type='text' id='" . $this_element . "_from' name='" . $this_element . "_to' value=\"" . (isset($_REQUEST[$this_element . "_to"]) ? $_REQUEST[$this_element . "_to"] : date("Y-m-d 23:59:59")) . "\"></input>");
                break;
            case "date_simple":
                $sel_month = isset($_REQUEST[$this_element . "_month"]) ? $_REQUEST[$this_element . "_month"] : date("n");
                $sel_year = isset($_REQUEST[$this_element . "_year"]) ? $_REQUEST[$this_element . "_year"] : date("Y");
                $months = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "\r\n\t\t\t\t\t\t\tOctober", "November", "December");
                $min_year = !isset($values['min_year']) ? date("Y") - 10 : $values['min_year'];
                $max_year = !isset($values['max_year']) ? date("Y") + 2 : $values['max_year'];
                for ($j = $min_year; $j < $max_year; $j++) {
                    $years[$j] = 1;
                }
                $month_html = "<select name='" . $this_element . "_month'>";
                foreach ($months as $index => $month) {
                    if ($index + 1 != $sel_month) {
                        $month_html .= "<option value='" . ($index + 1) . "'>{$month}</option>";
                    } else {
                        $month_html .= "<option selected value='" . ($index + 1) . "'>{$month}</option>";
                    }
                }
                $month_html .= "</select>";
                $year_html = "<select name='" . $this_element . "_year'>";
                foreach ($years as $year => $value) {
                    if ($sel_year != $year) {
                        $year_html .= "<option value='{$year}'>{$year}</option>";
                    } else {
                        $year_html .= "<option selected value='{$year}'>{$year}</option>";
                    }
                }
                $year_html .= "</select>";
                $frm_entity[] = array("name" => "<b>{$display}&nbsp;</b>", "input" => "{$month_html}&nbsp;{$year_html}");
                break;
            case "date":
                if ($display != "") {
                    $displayb = "<b>{$display} To:</b>";
                } else {
                    $displayb = "";
                }
                if ($display != "") {
                    $display = "<b>{$display} From:</b>";
                }
                if (!isset($values['default_from'])) {
                    $values['default_from'] = time();
                }
                if (!isset($values['default_to'])) {
                    $values['default_to'] = time();
                }
                $from_value = isset($_REQUEST[$this_element . "_from"]) ? $_REQUEST[$this_element . "_from"] : date("n/j/Y", $values['default_from']);
                $to_value = isset($_REQUEST[$this_element . "_to"]) ? $_REQUEST[$this_element . "_to"] : date("n/j/Y", $values['default_to']);
                if ($to_value == "" || $from_value == "") {
                    break;
                }
                $this_time = strtotime($from_value);
                $options_years = func_fill_year(isset($_REQUEST[$this_element . "_from_year"]) ? $_REQUEST[$this_element . "_from_year"] : date("Y", $this_time), true);
                $options_months = func_fill_month(isset($_REQUEST[$this_element . "_from_month"]) ? $_REQUEST[$this_element . "_from_month"] : date("n", $this_time), true);
                $options_days = func_fill_day(isset($_REQUEST[$this_element . "_from_day"]) ? $_REQUEST[$this_element . "_from_day"] : date("j", $this_time), 32, true);
                $frm_entity[] = array("name" => "{$display}&nbsp;", "input" => "\r\n\t\t\t\t\t\t<script language=\"javascript\">\r\n\t\t\t\t\t\t\tfunction func_returnselectedindex(par_selected)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar dt_new =  new Date();\r\n\t\t\t\t\t\t\t\tvar str_year = dt_new.getFullYear()\r\n\t\t\t\t\t\t\t\tfor(i=2003,j=0;i<str_year+10;i++,j++)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif (i==par_selected)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\treturn j;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfunction addvalue(dateSelected,monthSelected,yearSelected,obj_element)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif (obj_element.name == \"" . $this_element . "_from\")\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tdocument.search_form." . $this_element . "_from_day.selectedIndex = dateSelected-1 ;\r\n\t\t\t\t\t\t\t\t\tdocument.search_form." . $this_element . "_from_month.selectedIndex = monthSelected ;\r\n\t\t\t\t\t\t\t\t\tdocument.search_form." . $this_element . "_from_year.selectedIndex = func_returnselectedindex(yearSelected) ;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (obj_element.name == \"" . $this_element . "_to\")\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tdocument.search_form." . $this_element . "_to_day.selectedIndex = dateSelected-1 ;\r\n\t\t\t\t\t\t\t\t\tdocument.search_form." . $this_element . "_to_month.selectedIndex = monthSelected ;\r\n\t\t\t\t\t\t\t\t\tdocument.search_form." . $this_element . "_to_year.selectedIndex = func_returnselectedindex(yearSelected) ;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfunction func_" . $this_element . "_from()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar year = document.search_form." . $this_element . "_from_year.value;\r\n\t\t\t\t\t\t\t\tvar month = document.search_form." . $this_element . "_from_month.value;\r\n\t\t\t\t\t\t\t\tvar day = document.search_form." . $this_element . "_from_day.value;\r\n\t\t\t\t\t\t\t\tdocument.search_form." . $this_element . "_from.value = month + '/' + day + '/' + year;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</script>\r\n\t\t\t\t\t\t<select onChange=\"func_" . $this_element . "_from()\" id=\"" . $this_element . "_from_month\" name=\"" . $this_element . "_from_month\" style=\"font-size:10px\" disableOnSubmit='1' >\r\n\t\t\t\t\t\t{$options_months}\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t<select onChange=\"func_" . $this_element . "_from()\" id=\"" . $this_element . "_from_day\" name=\"" . $this_element . "_from_day\" class=\"lineborderselect\" style=\"font-size:10px\" disableOnSubmit='1'>\r\n\t\t\t\t\t\t{$options_days}\r\n\t\t\t\t\t\t</select> \r\n\t\t\t\t\t\t<select onChange=\"func_" . $this_element . "_from()\" id=\"" . $this_element . "_from_year\" name=\"" . $this_element . "_from_year\" style=\"font-size:10px\" disableOnSubmit='1'>\r\n\t\t\t\t\t\t{$options_years}\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t<input type=\"hidden\"  id='" . $this_element . "_from' name='" . $this_element . "_from' size=\"17\" value=\"" . $from_value . "\">\r\n\t\t\t\t\t\t<input style=\"font-family:verdana;font-size:10px;\" type=\"button\" value=\"...\" onclick=\"init(\$F('MousePointX'),\$F('MousePointY'),\$('" . $this_element . "_from'))\">\r\n\t\t\t\t\t\t");
                $this_time = strtotime($to_value);
                $options_years = func_fill_year(isset($_REQUEST[$this_element . "_to_year"]) ? $_REQUEST[$this_element . "_to_year"] : date("Y", $this_time), true);
                $options_months = func_fill_month(isset($_REQUEST[$this_element . "_to_month"]) ? $_REQUEST[$this_element . "_to_month"] : date("n", $this_time), true);
                $options_days = func_fill_day(isset($_REQUEST[$this_element . "_to_day"]) ? $_REQUEST[$this_element . "_to_day"] : date("j", $this_time), 32, true);
                $frm_entity[] = array("name" => "{$displayb}&nbsp;", "input" => "\r\n\t\t\t\t\t\t<script language=\"javascript\">\r\n\t\t\t\t\t\t\tfunction func_" . $this_element . "_to()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tvar year = document.search_form." . $this_element . "_to_year.value;\r\n\t\t\t\t\t\t\t\tvar month = document.search_form." . $this_element . "_to_month.value;\r\n\t\t\t\t\t\t\t\tvar day = document.search_form." . $this_element . "_to_day.value;\r\n\t\t\t\t\t\t\t\tdocument.search_form." . $this_element . "_to.value = month + '/' + day + '/' + year;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</script>\t\t\t\t\t\t\r\n\t\t\t\t\t\t<select onChange=\"func_" . $this_element . "_to()\" id=\"" . $this_element . "_to_month\" name=\"" . $this_element . "_to_month\" style=\"font-size:10px\" disableOnSubmit='1'>\r\n\t\t\t\t\t\t{$options_months}\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t<select onChange=\"func_" . $this_element . "_to()\" id=\"" . $this_element . "_to_day\" name=\"" . $this_element . "_to_day\" class=\"lineborderselect\" style=\"font-size:10px\" disableOnSubmit='1'>\r\n\t\t\t\t\t\t{$options_days}\r\n\t\t\t\t\t\t</select> \r\n\t\t\t\t\t\t<select onChange=\"func_" . $this_element . "_to()\" id=\"" . $this_element . "_to_year\" name=\"" . $this_element . "_to_year\" style=\"font-size:10px\" disableOnSubmit='1'>\r\n\t\t\t\t\t\t{$options_years}\r\n\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t<input type=\"hidden\"  id='" . $this_element . "_to' name='" . $this_element . "_to' size=\"17\" value=\"" . $to_value . "\">\r\n\t\t\t\t\t\t<input style=\"font-family:verdana;font-size:10px;\" type=\"button\" value=\"...\" onclick=\"init(\$F('MousePointX'),\$F('MousePointY'),\$('" . $this_element . "_to'))\">\r\n\t\t\t\t\t\t");
                break;
            case "textarea":
                if ($display != "") {
                    $display = "<b>{$display}:</b>";
                }
                $frm_entity[] = array("name" => "{$display}&nbsp;", "input" => "<textarea {$action} {$style} id='{$this_element}' name='{$this_element}' {$style}>" . (isset($_REQUEST[$this_element]) ? $_REQUEST[$this_element] : $values['value']) . "</textarea>");
                break;
            case "text":
            default:
                if ($display != "") {
                    $display = "<b>{$display}:</b>";
                }
                $frm_entity[] = array("name" => "{$display}&nbsp;", "input" => "<input {$action} {$style} type='text' id='{$this_element}' name='{$this_element}' value=\"" . (isset($_REQUEST[$this_element]) ? $_REQUEST[$this_element] : $values['value']) . "\"></input>");
                break;
        }
    }
    return $frm_entity;
}
            $sql = "Update `cs_uploaded_documents`  as ud left join `cs_companydetails` as cd on ud.user_id=cd.userId set `status` = 'Declined',`reject_reason` = '{$reject_reason}' where `file_id` = '{$file_id}' ";
            $result = mysql_query($sql) or dieLog(mysql_error());
            if (sizeof($recentIDs) > 9) {
                array_pop($recentIDs);
            }
            $recentIDs[] = $file_id;
            $msg .= "<span class='rejected'>{$documentFormat} has been Rejected.</span><BR>\n";
            send_email_template($letterTempate, $emailData);
        }
    }
}
$_SESSION['recentDocumentIds'] = $recentIDs;
$recentIDsql = "";
// Select Company
beginTable();
echo genCompanyViewTable('confirmUploads.php', 'confirmUploads.php', 'full');
endTable("Select Company Document");
$company_table_sql = "`cs_companydetails`";
$pendingSql = "`status` = 'Pending'";
foreach ($recentIDs as $id) {
    $recentIDsql .= " or (`file_id` = '{$id}') ";
}
if ($_REQUEST['cd_view'] == 'AL') {
    $sql_info = JSON_getCompanyInfo_build($_REQUEST);
    $company_table_sql = " (Select cd.userId,cd.companyname,cd.cd_completion from " . $sql_info['sql_from'] . " Where " . $sql_info['sql_where'] . ")";
    $recentIDsql = NULL;
    $displayAllStatus = true;
    $pendingSql = "0";
} else {
    if ($_REQUEST['userIdList']) {
        $userIdList = explode("|", $_REQUEST['userIdList']);
        }
    }
}
$_SESSION['recentWebsiteIds'] = $recentIDs;
$recentIDsql = "";
if (is_array($recentIDs)) {
    foreach ($recentIDs as $id) {
        $recentIDsql .= " or (`cs_ID` = '{$id}') ";
    }
}
if ($_REQUEST['webList']) {
    $webListsql = " or (`cs_ID` in (" . quote_smart($_REQUEST['webList']) . ")) ";
}
// Select Company
beginTable();
echo genCompanyViewTable('confirmWebsite.php', 'confirmWebsite.php', 'full');
endTable("Select Company Websites");
$company_table_sql = "`cs_companydetails`";
$pendingSql = "`cs_verified` = 'pending'";
if ($_REQUEST['cd_view'] == 'AL') {
    $sql_info = JSON_getCompanyInfo_build($_REQUEST);
    $company_table_sql = " (Select cd.userId,cd.companyname,cd.cd_completion from " . $sql_info['sql_from'] . " Where " . $sql_info['sql_where'] . ")";
    $recentIDsql = NULL;
    $displayAllStatus = true;
    $pendingSql = "0";
} else {
    if ($_REQUEST['userIdList']) {
        $userIdList = explode("|", $_REQUEST['userIdList']);
        foreach ($userIdList as $id) {
            $recentIDsql .= " or (cd.userId = '{$id}') ";
        }
	for(i=0;i<length;i++)
	{
		if(obj.options[i].selected)
		{
			info =obj.options[i].value.split("|");
			if(info[0])
				document.location.href='viewCompanyInvoice.php?mi_ID='+info[0];
			break;
		}
	}
}
</script>

<?php 
beginTable();
echo genCompanyViewTable('paymentReport.php', 'paymentReport.php', $adminInfo['li_level']);
endTable("Company Payment");
if ($userList_sql || $_REQUEST['cd_view'] == 'AL') {
    $sql = "SELECT count(`transactionId`) as key1 FROM `cs_transactiondetails` where 1 {$userList_sql} limit 500";
    $result = sql_query_read($sql) or dieLog(mysql_error());
    $key = mysql_result($result, 0, 0);
    if (beginCacheTable("MI_" . $key . "_" . getRequestHash(), time() + 60 * 6)) {
        ?>
	
	</td>
    </tr>
<tr>
    <td colspan="5" class="lgnbd"><table width="100%" border="0" cellpadding="2" align="center"  bgcolor="#EEEEEE">
        <tr align="center" valign="middle" >
          <td class="whitehd">