function writeAccessForm($access)
{
    global $etel_completion_array;
    $row = 2;
    $header = 0;
    $columns = 1;
    if ($access['Headers'] > 1) {
        $columns = 2;
    }
    $table_start = "<table border=1 class='report'  width='%100'>";
    echo $table_start;
    if ($access['HeaderMessage']) {
        echo "<tr><td valign='top' align='center' colspan = '{$columns}'>" . $access['HeaderMessage'] . "</td></tr>";
    }
    echo "<tr><td valign='top'>";
    echo $table_start;
    foreach ($access['Data'] as $key => $data) {
        if ($data['Name'] == 'access_header') {
            if ($header == intval($access['Headers'] / 2)) {
                echo "</table></td><td valign='top'>{$table_start}";
            }
            $header++;
            echo "<tr class='header'><td colspan='2'>";
            echo $data['Value'] . "";
            echo "</td></tr>\n";
        } else {
            $input = "";
            $display_row = true;
            $size = $data['Length'] / 1.5;
            if ($size > 100 && !$data['Input']) {
                $data['Input'] = 'textarea';
            }
            if ($size < 5) {
                $size = 5;
            }
            if ($size > 15) {
                $size = 15;
            }
            $size -= $size % 5;
            $disabled = $data['disable'] ? "disabled" : "";
            switch ($data['Input']) {
                case 'custom':
                    break;
                case 'hidden':
                    $input = "<input type='hidden' name='" . $data['Name'] . "' id='" . $data['Name'] . "' value='" . $data['Value'] . "'>";
                    $display_row = false;
                    break;
                case 'selectcustom':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' src='" . $data['src'] . "' {$disabled}>\n\t\t\t\t\t" . get_fill_combo_conditionally($data['Input_Custom'], $data['Value']) . "\n\t\t\t\t\t</select>";
                    break;
                case 'selectvolume':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>\n\t\t\t\t\t" . func_get_merchant_volume($data['Value']) . "\n\t\t\t\t\t</select>";
                    break;
                case 'selectbank':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>\n\t\t\t\t\t" . func_get_bank_select($data['Value']) . "\n\t\t\t\t\t</select>";
                    break;
                case 'selectcc':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>" . get_fill_combo_conditionally("select bank_id, concat(bank_name,concat(' H-',concat(bk_fee_high_risk,concat('/L-',concat(bk_fee_low_risk,concat('/A-',bk_fee_approve)))))) as name from cs_bank where 1 and bk_cc_support=1 ORDER BY `bank_name` ASC ", $data['Value'], 1) . "</select>";
                    break;
                case 'selectcheckbank':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>" . get_fill_combo_conditionally("select bank_id,bank_name from cs_bank where 1 and bk_ch_support=1 ORDER BY `bank_name` ASC ", $data['Value'], 1) . "</select>";
                    break;
                case 'selectetelbank':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>" . get_fill_combo_conditionally("select bank_id,bank_name from cs_bank where 1 and bk_w9_support=1 ORDER BY `bank_name` ASC ", $data['Value'], 1) . "</select>";
                    break;
                case 'selectreseller':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>" . "<option value=\"-1\">" . $_SESSION['gw_title'] . "</option>" . get_fill_combo_conditionally("select reseller_id,reseller_companyname from cs_resellerdetails where 1 order by reseller_companyname", $data['Value'], 1) . "</select>";
                    break;
                case 'selectgateway':
                    $gateways = merchant_getGateways();
                    $input = "";
                    if (!is_array($gateways)) {
                        break;
                    }
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>";
                    foreach ($gateways as $key => $gw) {
                        $input .= "<option value='{$key}' " . ($data['Value'] == $key ? "selected" : "") . ">{$gw}</option>";
                    }
                    $input .= "</select>";
                    break;
                case 'selectcompletion':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>";
                    foreach ($etel_completion_array as $key => $value) {
                        $input .= "<option value='{$key}' " . ($data['Value'] == $key ? "selected" : "") . ">" . $value['txt'] . "</option>";
                    }
                    $input .= "</select>";
                    break;
                case 'selectenum':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>\n\t\t\t\t\t" . func_get_enum_values($data['Table'], $data['Name'], $data['Value']) . "\n\t\t\t\t\t</select>";
                    break;
                case 'selectpayperiod':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>";
                    $input .= "<option value=\"7\"" . ($data['Value'] == 7 ? "Selected" : "") . ">1 Week</option>";
                    $input .= "<option value=\"14\"" . ($data['Value'] == 14 ? "Selected" : "") . ">2 Weeks</option>";
                    $input .= "<option value=\"21\"" . ($data['Value'] == 21 ? "Selected" : "") . ">3 Weeks</option>";
                    $input .= "<option value=\"28\"" . ($data['Value'] == 28 ? "Selected" : "") . ">4 Weeks</option>";
                    $input .= "</select>";
                    break;
                case 'selectpaydelay':
                    $input = "<select name='" . $data['Name'] . "' id='" . $data['Name'] . "' title='" . $data['src'] . "' {$disabled}>";
                    $input .= "<option value=\"7\"" . ($data['Value'] == 7 ? "Selected" : "") . ">1 Week</option>";
                    $input .= "<option value=\"14\"" . ($data['Value'] == 14 ? "Selected" : "") . ">2 Weeks</option>";
                    $input .= "<option value=\"21\"" . ($data['Value'] == 21 ? "Selected" : "") . ">3 Weeks</option>";
                    $input .= "<option value=\"28\"" . ($data['Value'] == 28 ? "Selected" : "") . ">4 Weeks</option>";
                    $input .= "<option value=\"35\"" . ($data['Value'] == 28 ? "Selected" : "") . ">5 Weeks</option>";
                    $input .= "<option value=\"42\"" . ($data['Value'] == 28 ? "Selected" : "") . ">6 Weeks</option>";
                    $input .= "<option value=\"10\"" . ($data['Value'] == 28 ? "Selected" : "") . ">10 Days</option>";
                    $input .= "</select>";
                    break;
                case 'textarea':
                    $input = "<textarea name='" . $data['Name'] . "' id='" . $data['Name'] . "' src='" . $data['src'] . "' cols='{$size}' rows='4' {$disabled}>" . $data['Value'] . "</textarea>";
                    break;
                default:
                    $input = "<input type='textfield' name='" . $data['Name'] . "' id='" . $data['Name'] . "' value='" . $data['Value'] . "' maxlength='" . $data['Length'] . "' src='" . $data['src'] . "' size='{$size}' {$disabled}>";
                    if ($data['disable']) {
                        $input = $data['Value'];
                    }
                    break;
            }
            if ($display_row) {
                echo "<tr class='row" . ($row = 3 - $row) . "'>\n";
                echo "<td align='right'><strong>";
                echo $data['DisplayName'] . " :";
                echo "</strong></td>\n";
                echo "<td>";
                echo $input . "&nbsp;";
                echo "</td>\n";
                echo "</tr>\n";
            } else {
                echo $input;
            }
        }
    }
    echo "<tr class='row" . ($row = 3 - $row) . "'><td colspan='2' align='center'>";
    echo "</td></tr>\n";
    echo "</table>";
    echo "</td></tr>\n";
    echo "<tr><td colspan='{$columns}' align='center'>\n";
    echo "<input type='submit' name='submit_access' value='Submit'>";
    echo "</td></tr>\n";
    echo "</table>";
}
Example #2
0
			</table>
			<input type="hidden" name="username" value="<?php 
        echo $username;
        ?>
">
            <table border="0" cellpadding="0"  height="100" width="100%">
			  <tr><td align="center" valign="center" height="30" colspan="2" bgcolor="#CCCCCC" class="whitehd">Bank Processing Information</td>
			  </tr>
				<tr><td align="center" valign="center" height="30" colspan="2"><font face="verdana" size="1" color="#FF0000"><strong>"Banking information used to wire reseller commissions."</strong></font></td>
			  </tr>
			  <tr><td align="left" valign="center" height="30" width="50%" bgcolor="#F8FAFC"><font face="verdana" size="1">	
				 &nbsp; With which bank do you hold a company account?</font></td>
				<td align="left" valign="middle" height="30" width="50%" bgcolor="#F8FAFC">
				<select name="currentBank" style="font-family:arial;font-size:10px;width:270px" >
					<?php 
        echo func_get_bank_select($show_select_value[26]);
        ?>
					<option value="other">other</option>
				</select> 
				</td></tr>
				<tr><td align="left" valign="center" height="30" width="50%" bgcolor="#F8FAFC"><font face="verdana" size="1">	
                 &nbsp;If 'Other', please specify:&nbsp;&nbsp;</font></td>
                 <td align="left" height="30" width="50%" bgcolor="#F8FAFC"><input type="text" name="bank_other" style="font-family:arial;font-size:10px;width:150px" value="<?php 
        echo $show_select_value[27];
        ?>
"> 
                  </td></tr>
				<tr><td align="left" valign="center" height="30" width="50%" bgcolor="#F8FAFC"><font face="verdana" size="1">	
                &nbsp; Beneficiary Name:&nbsp;&nbsp;</font></td>
                <td align="left" height="30" width="50%" bgcolor="#F8FAFC"><input src="req" type="text" name="beneficiary_name" style="font-family:arial;font-size:10px;width:150px" value="<?php 
        echo $show_select_value[28];
			  <td align="left" valign="center" height="30" width="50%" class="cl1">&nbsp;<input name="url3" type="text" style="font-family:arial;font-size:10px;width:215px" value="<?php 
    echo $resellerInfo[43];
    ?>
"></td>
			</tr>
			<tr> 
			  <td align="center" valign="middle" height="30" class="cl1" bgcolor="#CCCCCC"><font face="verdana" size="1" color="#FFFFFF"><strong>Bank 
				Informations</strong></font></td>
			  <td align="left" valign="center" height="30" class="cl1">&nbsp;</td>
			</tr>
			<tr> 
			  <td align="left" valign="center" height="30" class="cl1"><font face="verdana" size="1">&nbsp;With 
				which bank do you hold a &nbsp;company account?</font></td>
			  <td align="left" valign="center" height="30" class="cl1">&nbsp;<select name="currentBank" style="font-family:arial;font-size:10px;width:200px" >
								<?php 
    echo func_get_bank_select($resellerInfo[26]);
    ?>
                          </select> </td>
			</tr>
			<tr> 
			  <td align="left" valign="center" height="30" class="cl1"><font face="verdana" size="1">	
				&nbsp;If 'Other', please specify:&nbsp;&nbsp;</font></td>
			  <td align="left" valign="center" height="30" class="cl1">&nbsp;<input type="text"  name="bank_other" style="font-family:arial;font-size:10px;width:200px" value="<?php 
    echo $resellerInfo[27];
    ?>
"></td>
			</tr>
			<tr> 
			  <td align="left" valign="center" height="30" class="cl1"><font face="verdana" size="1">	
				&nbsp;Beneficiary Name:&nbsp;&nbsp;</font></td>
			  <td align="left" valign="center" height="30" class="cl1">&nbsp;<input type="text"  name="beneficiary_name" style="font-family:arial;font-size:10px;width:200px" value="<?php 
            ?>
&loginas=1">Login as
                          <?php 
            echo $companyInfo['companyname'];
            ?>
                          </a>
                          <?php 
        }
        ?>
</td>
                      </tr>
                      <tr>
                        <td align="left" valign="center" height="30" width="50%"><font face="verdana" size="1"> &nbsp; With which bank do you hold a company account?</font></td>
                <td align="left" valign="middle" height="30" width="50%"><select title="reqmenu" name="currentBank" id="currentBank" style="font-family:arial;font-size:10px;width:270px" onChange="document.getElementById('bank_other').src=(this.value!='other'?'':'req')">
					<?php 
        echo func_get_bank_select($companyInfo['company_bank']);
        ?>
					<option value="other">other</option>
                  </select>
                </td>
              </tr>
              <tr>
                <td align="left" valign="center" height="30" width="50%"><font face="verdana" size="1"> &nbsp;If 'Other', please specify:&nbsp;&nbsp;</font></td>
                <td align="left" height="30" width="50%"><input type="text" name="bank_other" id="bank_other" style="font-family:arial;font-size:10px;width:270px" value="<?php 
        echo htmlentities($companyInfo['other_company_bank']);
        ?>
">
                </td>
              </tr>
              <tr>
                <td align="left" valign="center" height="30" width="50%"><font face="verdana" size="1"> &nbsp; Beneficiary Name:&nbsp;&nbsp;</font></td>
              </tr>
            </table>
            <input type="hidden" name="username" value="<?php 
        echo $username;
        ?>
">
            </input>
            <table border="0" cellpadding="0"  height="399" width="100%">
              <tr>
                <td align="center" valign="center" height="30" colspan="2" bgcolor="#CCCCCC" class="whitehd">Wire Instructions</td>
              </tr>
              <tr>
                <td align="left" valign="center" height="30" width="50%" bgcolor="#F8FAFC"><font face="verdana" size="1"> &nbsp; With which bank do you hold a company account?</font></td>
                <td align="left" valign="middle" height="30" width="50%" bgcolor="#F8FAFC"><select title="reqmenu" name="currentBank" id="currentBank" style="font-family:arial;font-size:10px;width:270px" onChange="document.getElementById('bank_other').src=(this.value!='other'?'':'req')">
					<?php 
        echo func_get_bank_select($show_select_value['company_bank']);
        ?>
                  </select>                </td>
              </tr>
              <tr>
                <td align="left" valign="center" height="30" width="50%" bgcolor="#F8FAFC"><font face="verdana" size="1"> &nbsp;If 'Other', please specify:&nbsp;&nbsp;</font></td>
                <td align="left" height="30" width="50%" bgcolor="#F8FAFC"><input type="text" name="bank_other" id="bank_other" style="font-family:arial;font-size:10px;width:270px" value="<?php 
        echo htmlentities($show_select_value['other_company_bank']);
        ?>
">                </td>
              </tr>
              <tr>
                <td align="left" valign="center" height="30" width="50%" bgcolor="#F8FAFC"><font face="verdana" size="1"> &nbsp; Beneficiary Name:&nbsp;&nbsp;</font></td>
                <td align="left" height="30" width="50%" bgcolor="#F8FAFC"><input type="text" src="req" maxlength="100" name="beneficiary_name" style="font-family:arial;font-size:10px;width:150px" value="<?php 
        echo htmlentities($show_select_value['beneficiary_name']);
        ?>
Example #6
0
                          Processing&nbsp;</font></strong></td>
                        <td align="left" height="30" class='cl1'> <input name="currpro" type="checkbox" value="Yes"> 
                        </td>
                      </tr>
                      <tr> 
                        <td height="30" align="right" valign="center" class='cl1' bgcolor="#CCCCCC"><font face="verdana" size="1" color="#FFFFFF"><strong>Bank 
                          Processing Informations </strong>&nbsp;</font></td>
                        <td height="30" class='cl1' align="left">&nbsp;</td>
                      </tr>
                      <tr> 
                        <td height="30" align="left"  class='cl1' ><strong><font face="verdana" size="1">With 
                          which bank do you hold a company account?</font></strong></td>
                        <td height="30" align="left"  class='cl1' > &nbsp;
                          <select name="currentBank" style="font-family:verdana;font-size:10px;width:270px" >
					<?php 
    echo func_get_bank_select($showval[55]);
    ?>
                          </select> 
                        </td>
                      </tr>
                      <tr> 
                        <td height="30" align="left" class='cl1' ><font face="verdana" size="1"><strong>If 
                          'Other', please specify</strong></font></td>
                        <td height="30" align="left" class='cl1' >&nbsp;
                          <input type="text" name="bank_other" style="font-family:verdana;font-size:10px;width:150px" value=""> 
                        </td>
                      </tr>
                      <tr> 
                        <td height="30" align="left"  class='cl1' ><font face="verdana" size="1"><strong>Beneficiary 
                          Name</strong></font></td>
                        <td height="30" align="left"  class='cl1' >&nbsp;
Example #7
0
                          information used to wire reseller commissions."</strong></font></td>
</tr>
			          <tr align="center" valign="middle"> 
                        <td height="30" colspan="2"><font face="verdana" size="1" ><strong><?php 
    echo $msgtodisplay;
    ?>
                          </strong></font></td>
</tr>

			  <tr>
				<td align="right" valign="center" height="30" width="150"><font face="verdana" size="1">With 
				which bank do you hold a company account? &nbsp;</font></td>
				<td align="left" height="30" width="250">
				<select name="currentBank" style="font-family:arial;font-size:10px;width:240px" >
					<?php 
    echo func_get_bank_select($show_val[4]);
    ?>
					<option value="other">other</option>
				</select> 
				</td>
			  </tr>
			  <tr>
				<td align="right" valign="center" height="30" width="150"><font face="verdana" size="1">If 'Other', please specify &nbsp;</font></td>
				<td align="left" height="30" width="250"><input type="text" name="bank_other" style="font-family:arial;font-size:10px;width:160px" value='<?php 
    echo $show_val[5];
    ?>
'></td>
			  </tr>
			  <tr>
				<td align="right" valign="center" height="30" width="150"><font face="verdana" size="1">Beneficiary Name &nbsp;</font></td>
				<td align="left" height="30" width="250"><input type="text"  name="beneficiary_name" style="font-family:arial;font-size:10px;width:160px" value='<?php