Example #1
0
require_once "../includes/function2.php";
$headerInclude = "companies";
include "includes/header.php";
$userid = isset($_REQUEST['userid']) ? quote_smart($_REQUEST['userid']) : "";
$li_user_view = isset($_REQUEST['li_user_view']) ? quote_smart($_REQUEST['li_user_view']) : "";
$level = 'full';
if ($adminInfo['li_level'] != 'full') {
    dieLog("No Access");
}
beginTable();
?>

<select name="userid" size="5" id="userid">
  <option value="">Select a User</option>
  <?php 
func_fill_combo_conditionally("select userid,username from `cs_login` ORDER BY `username` DESC ", $userid, $cnn_cs);
?>
</select>
<BR>
<input name="etel_disable_cache" value="1" type="hidden">
<input name="ViewUser" type="submit" value="Edit Admin User">
<?php 
$userSelect = ob_get_contents();
ob_end_clean();
doTable($userSelect, "Available Admin Users", "userManage.php");
if ($userid) {
    $sql = "select * from cs_login where userid='{$userid}'";
    $result = mysql_query($sql, $cnn_cs) or dieLog(mysql_errno() . ": " . mysql_error() . "<BR>Cannot execute query {$sql}");
    $adminInfo = mysql_fetch_assoc($result);
    $adminConfig = @unserialize(gzuncompress($adminInfo['li_config']));
    if ($adminInfo) {
            $mi_company_info = $companyInfo;
            $msg = "Projected Balance Estimate";
            $forcomp = $msg . " " . $forcomp;
            $msg .= " for {$date}";
        } else {
            $forcomp = "Information " . $forcomp;
        }
    }
}
// List Reports
ob_start();
?>
<select name="mi_ID" size="5" id="mi_ID">
  <option value="">Select an Invoice</option>
  <?php 
func_fill_combo_conditionally("select mi_ID, mi_title from `cs_merchant_invoice` where mi_company_id = '{$companyId}' ORDER BY `mi_date` DESC ", $mi_ID, $cnn_cs);
?>
</select>
<BR>
<input type="hidden" name="focus" value="invoice">
<input name="Submit" type="submit" value="View Invoice">
<?php 
$invoiceHistory = ob_get_contents();
ob_end_clean();
doTable($invoiceHistory, "Invoice History", "");
//$mi_pay_info = calcReal();
?>
  <style type="text/css">
<!--
.style1 {font-size: 10px}
.style4 {font-size: 12px; font-weight: bold; }
        $bi_bank_info = mysql_fetch_assoc($bank_details);
        $bankId = $bi_bank_info['bank_id'];
        $msg = "Estimated Profit for " . date("l - F j, Y", $bi_date);
    } else {
        $msg = "Invalid Invoice";
    }
}
// List Reports
if ($adminInfo['li_level'] == 'full') {
    beginTable();
    ?>

	<select name="bi_ID" size="5" id="bi_ID">
	  <option value="">Select an Invoice</option>
	  <?php 
    func_fill_combo_conditionally("select bi_ID, bi_title from `cs_bank_invoice` where bi_bank_id = '{$bankId}' ORDER BY `bi_date` ASC ", $bi_ID, $cnn_cs);
    ?>
	</select>
	<BR>
	<input name="Submit" type="submit" value="View Invoice">
	<?php 
    endTable("Invoice History", "viewBankInvoice.php");
    $bi_pay_info['BankCreditReserveFees'] += $bi_pay_info['BankCreditDiscountFees'];
}
?>
  <style type="text/css">
<!--
.style1 {font-size: 10px}
.style4 {font-size: 12px; font-weight: bold; }
.style5 {
	color: #FFFFFF;
        <option value="brief">Brief Report</option>
      </select>    </td>
  </tr>
  <?php 
if ($adminInfo['li_level'] == 'full') {
    ?>
  <tr class="row<?php 
    echo gen_row(1);
    ?>
">
    <td>Report on Bank </td>
    <td><span class="cl1">
      <select name="bank_Creditcard" id="bank_Creditcard" class="levels">
        <option value="">All Banks</option>
        <?php 
    func_fill_combo_conditionally("select bank_id, bank_name from `cs_bank` WHERE bk_cc_support=1 ORDER BY `bank_name` ASC ", "", $cnn_cs);
    ?>
      </select>
    </span> </td>
  </tr>
  <?php 
}
?>
  <tr class="row<?php 
echo gen_row(1);
?>
">
    <td>Period</td>
    <td><select name="rp_period" id="rp_period" class="levels">
        <?php 
echo $rp_period_options;
function genCompanyViewTable($redirectOne, $redirectAll, $mode = 'minimal', $submittable = true)
{
    global $etel_completion_array;
    global $adminInfo;
    global $adminConfig;
    global $etel_gw_list;
    global $bank_sql_limit;
    global $etel_domain_path;
    require_once "completion.php";
    if ($adminInfo['li_user_view'] == 'hide' && $adminConfig['vList']) {
        $uview_sql = " AND userId not in (" . implode(",", $adminConfig['vList']) . ")";
    }
    if ($adminInfo['li_user_view'] == 'show' && $adminConfig['vList']) {
        $uview_sql = " AND userId in (" . implode(",", $adminConfig['vList']) . ")";
    }
    $etel_completion_array[-1]['txt'] = "Old Company [No Status]";
    if (!$redirectOne) {
        $redirectOne = basename($_SERVER['PHP_SELF']);
    }
    if (!$redirectAll) {
        $redirectAll = basename($_SERVER['PHP_SELF']);
    }
    $ignore = "cd_ignore=0 ";
    if ($_GET['showall']) {
        $ignore = "1";
    }
    if (!$_REQUEST['cp']) {
        $_REQUEST['cp'] = '';
    }
    ob_start();
    ?>
<script language="JavaScript">
var company = new Array();
var cs_URL = new Array();

function selectCompany(obj)
{
	obj_element = $('companyname');
	obj_element.value = obj.value;
}

function Displaycompany(){

	$('companyname').selectedIndex = 0;
	$('activename').selectedIndex = 0;
	$('nonactivename').selectedIndex = 0;

}
function viewCompany(obj) {
	var liststr = "";
	var curval = '';
	var curUserId = 0;
	var length = $('companyname').length;
	if($('companyname').value=="") {
	 //alert("Please select the company.");
	 return 0;
	}
	for(i=0;i<length;i++)
	{
		if($('companyname').value == 'AL' || $('companyname').options[i].selected)
		{
			curUserId = $('companyname').options[i].value;
			if (curUserId == 'A') {curVal='A'; break;}
			if (!window.redirectTo)
			{
				if(curUserId!='AL')
				{
					if(!liststr) liststr=curUserId;
					else liststr += '|'+curUserId;
				}
			}
			else userId[curval] = curUserId;
			curval++;
		}
	}
	if($('companyname').value == 'A')
		curval='A';
	if($('companyname').value == 'AL')
		curval='AL';
	if (window.redirectTo) redirectTo(userId);

	if(curval==1) obj.form.action='<?php 
    echo $redirectOne;
    ?>
';
	else obj.form.action='<?php 
    echo $redirectAll;
    ?>
';

	$('cd_view').value = curval;
	$('companyname').value = '';
	$('batchfield').value = '';
	func_remove_all();
	$('userIdList').value = liststr;



	obj.form.submit();
}

function cropRemove(crop) {
	var liststr = "";
	var curval = 0;
	var curUserId = 0;
	var length = $('companyname').length;
	if($('companyname').value=="") {
	 //alert("Please select the company.");
	 return 0;
	}
	for(i=length-1;i>=0;i--)
	{
		var doCrop = false;
		doCrop = ($('companyname').options[i].selected != crop);
		if(doCrop)
		{
			$('companyname').options[i] = null;
		}
	}

}

function Displaycompanytype() {
	$('trans_type').value="Submit";
	//document.dates.action = "viewCompany.php";
	//document.dates.submit();
}



function func_fillcompanyname_response(response)
{
	$('query_time').innerHTML = "Updating List...";
	//alert(JSON);
	var data = JSON.parse(response.responseText);
	if(data['func'] != "getCompanyInfo")
	{
		$('query_time').innerHTML = "Error Querying Database. Your session may have expired. Please log in again.";
		return 0;
	}
	obj_element = $('companyname');
	cs_URL_select = $('cs_URL');
	obj_element.options.length=0;

	if(data['show_option_all'])
	{
		obj_element.options.length=obj_element.options.length+1;
		obj_element.options[obj_element.options.length-1].value="A";
		obj_element.options[obj_element.options.length-1].text="All Companies";
		obj_element.options[0].selected=true;
	}
	else
	{
		obj_element.options.length=obj_element.options.length+1;
		obj_element.options[obj_element.options.length-1].value="AL";
		obj_element.options[obj_element.options.length-1].text="All Companies In List";
		obj_element.options[0].selected=true;
	}

	var cp_ar = data['completion'];

	if(data['company_list'])
	{
		var len =data['company_list'].length;
		for (var i = 0;i<len;i++)
		{
			if(data['company_list'][i]['ui'])
			{
				obj_element.options.length=obj_element.options.length+1;
				obj_element.options[obj_element.options.length-1].value=data['company_list'][i]['ui'];
				obj_element.options[obj_element.options.length-1].text=data['company_list'][i]['cn'];
				if(cp_ar[data['company_list'][i]['cp']])
				{
					if(cp_ar[data['company_list'][i]['cp']]['txt'])
						obj_element.options[obj_element.options.length-1].title=cp_ar[data['company_list'][i]['cp']]['txt'];
					if(cp_ar[data['company_list'][i]['cp']]['style'])					
						obj_element.options[obj_element.options.length-1].style.fontWeight=(cp_ar[data['company_list'][i]['cp']]['style']?"bold":"");
	
				}
			}
		}
	}

	cs_URL_select.options.length=0;
	for (var ci in data['site_list'])
	{
		if(data['site_list'][ci]['ci'])
		{
			cs_URL_select.options.length=cs_URL_select.options.length+1;
			cs_URL_select.options[cs_URL_select.options.length-1].value=data['site_list'][ci]['cui'];
			cs_URL_select.options[cs_URL_select.options.length-1].text=data['site_list'][ci]['cn'];
		}
	}
	$('query_time').innerHTML = "("+data['num_rows']+") Results<BR> in ("+(Math.round(data['duration']*100)/100)+") seconds."
	updateList(false);
}
var refresh_timeout = null;
function func_fillcompanyname(initialDisplay)
{
	clearInterval(refresh_timeout);
	refresh_timeout = setTimeout('func_fillcompanyname_sub("'+initialDisplay+'")',500);
}

function func_fillcompanyname_sub(initialDisplay)
{
	var searchv = $F('search');
	var searchby = $F('searchby');
	var limit_to = $F('limit_to');
	var tt = $F('tt');
	var cp = $F('cp');
	var gi = $F('gi');
	var bi = $F('bi');
	var ig = ($('ig').checked==true?1:0);
	var jl = ($('jl').checked==true?24:0);

	var url = '<?php 
    echo $etel_domain_path;
    ?>
/admin/admin_JOSN.php';
	var pars = 'func=getCompanyInfo&search='+searchv+'&searchby='+searchby+'&tt='+tt+'&cp='+cp+'&bi='+bi+'&limit_to='+limit_to+'&gi='+gi+'&ig='+ig+'&jl='+jl;
	//document.location.href=url+'?'+pars;
	//alert(url+'?'+pars);
	var myAjax = new Ajax.Request( url, { method: 'post', parameters: pars, onComplete: func_fillcompanyname_response });
	$('query_time').innerHTML = "Querying Database...";

}
function func_remove_all()
{
	obj_element = $('companyname');
	obj_element.options.length=0;
	cs_URL_select = $('cs_URL');
	cs_URL_select.options.length=0;
}
function updateBatch(obj)
{
	var str = "";
	if(obj.value != 'A')
	{
		for(var i = 0; i<obj.options.length;i++)
		{
			if(obj.options[i].selected)
			{
				if(str) str+=", ";
				str += obj.options[i].value;
			}
		}
	}
	$('batchfield').value = str;
}

function updateList(alert_result)
{
	obj = $('batchfield');
	re = /[^\d]+/;
	var list = obj.value.split(re);
	var total = 0;
	var clist = $('companyname');
	if(clist.options.length<2 && 0)
		func_fillcompanyname();
	

	for(i=0;i<clist.length;i++)
	{
		clist[i].selected = false;
		for(j=0;j<list.length;j++)
		{
			if(clist[i].value==list[j])
			{
				total++;
				clist[i].selected = true;
			}
		}
	}
	if(total>1 && alert_result) alert(total+" Companys Selected.");
	if(total==0) clist[0].selected = true;
}

function togglebatch()
{
	if($('batchfieldtd').style.display == 'none')
		$('batchfieldtd').style.display = 'table-row';
	else
		$('batchfieldtd').style.display = 'none'
}
</script>

<table border="0" align="center" cellpadding="0" cellspacing="0" width="100%" height="100">
  <tr>
    <td width="50%"  valign="top"><table border="0" align="center" cellpadding="0" cellspacing="0">
        <tr >
          <td width="50%" height="25" align="right" valign="middle"><font face="verdana" size="1"> Type&nbsp;</font> </td>
          <td height="25"><select name="tt" id="tt" style="font-family:verdana;font-size:10px;width: 160px" onChange="func_fillcompanyname();">
		  	<option value="">All Merchant Types</option>
             <?php 
    echo func_fill_combo_conditionally("select `transaction_type`, CONCAT(`transaction_type`,' (',count(userId),')') as out from cs_companydetails where {$ignore} {$bank_sql_limit} {$uview_sql} GROUP BY `transaction_type`", $_REQUEST['tt'], $cnn_cs);
    ?>
            </select>          </td>
        </tr>
        <tr>
          <td height="25" align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Status </font> </td>
          <td height="25"><select name="cp" id="cp" style="font-family:verdana;font-size:10px;width: 160px" onChange="func_fillcompanyname();">
              <option value="" >Any Status</option>
              <?php 
    $sql = "select `cd_completion`, count(*) as cnt from cs_companydetails where {$ignore} {$bank_sql_limit} {$uview_sql} GROUP BY `cd_completion` ORDER BY `cd_completion` DESC";
    $result = mysql_query($sql) or dieLog(mysql_error());
    while ($cpl = mysql_fetch_assoc($result)) {
        $key = $cpl['cd_completion'];
        $data = $etel_completion_array[intval($key)];
        if (!$data) {
            $data = array('txt' => 'Invalid Status');
        }
        echo "<option value='{$key}' style='" . $data['style'] . "' " . ($_REQUEST['cp'] == $key ? "selected" : "") . ">" . $data['txt'] . " (" . $cpl['cnt'] . ")</option>\n";
    }
    ?>
            </select></td>
        </tr>
        <tr style="visibility:<?php 
    echo $mode == 'full' ? "visible" : "hidden";
    ?>
;">
          <td height="25" align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Bank </font> </td>
          <td height="25"><select name="bi" id="bi" style="font-family:verdana;font-size:10px;width: 160px" onChange="func_fillcompanyname();">
              <option value="" >Any Bank</option>
             <?php 
    if ($mode == 'full') {
        func_fill_combo_conditionally("select bank_id, bank_name from cs_bank ORDER BY `bank_id` ASC ", $_REQUEST['bi'], $cnn_cs);
    }
    ?>
            </select></td>
        </tr>
        <tr align="left" style="visibility:<?php 
    echo $mode == 'full' ? "visible" : "hidden";
    ?>
;">
          <td height="25" align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Gateway </font> </td>
		  <td height="25">
		  <select name='gi' id='gi' style="font-family:verdana;font-size:10px;width: 160px" onChange="func_fillcompanyname();">
		  <option value="">Any Gateway</option>
             <?php 
    if ($mode == 'full') {
        func_fill_combo_conditionally("select gateway_id, concat(gw_title,' - (',count(*),')') from cs_companydetails left join etel_gateways on gw_id = gateway_id where {$ignore} {$bank_sql_limit} {$uview_sql} and gw_database = '" . $_SESSION['gw_database'] . "' GROUP BY `gateway_id` ", $_REQUEST['gi'], $cnn_cs);
    }
    ?>
		</select>		</td>
        </tr>
        <tr align="left">
          <td height="25" align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
            <input id="ig" name="ig" type="checkbox" value="1" <?php 
    echo $_REQUEST['ig'] ? "checked" : "";
    ?>
 onChange="func_fillcompanyname();">
          </font></td>
          <td height="25"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> Show Ignored Companys</font></td>
        </tr>
        <tr align="left" style="visibility:<?php 
    echo $mode == 'full' ? "visible" : "hidden";
    ?>
;">
          <td height="25" align="right"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
            <input id="jl" name="jl" type="checkbox" value="1" <?php 
    echo $_REQUEST['jl'] ? "checked" : "";
    ?>
 onChange="func_fillcompanyname();" <?php 
    echo $_REQUEST['jl'] ? "checked" : "";
    ?>
>
            </font> </td>
          <td height="25"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Company Joined in  last 24 hours. </font></td>
        </tr>
        <tr align="left" style="visibility:<?php 
    echo $mode == 'full' ? "visible" : "hidden";
    ?>
;">
          <td height="25" align="right">&nbsp;</td>
          <td height="25"><font face="verdana" size="1"><a href="javascript:togglebatch()" >Show Batch Companys</a></font></td>
        </tr>
        
      </table>
    <font face="verdana" size="1"><a href="javascript:togglebatch()" ></a></font>	</td>
    <td width="50%" valign="top"><table border="0" align="center" cellpadding="0" cellspacing="0" width="100%" height="204">
        <tr>
          <td valign="middle" align="right" width="40%"><font face="verdana" size="1">Search With:&nbsp;</font> </td>
          <td width="60%"><input value="<?php 
    echo $_REQUEST['search'];
    ?>
" type="text" name="search" id="search" size="10" style="font-family:verdana;font-size:10px;width: 160px" onKeyUp="func_fillcompanyname();" >          </td>
        </tr>
        <tr>
          <td height="41" valign="middle" align="right" width="40%"><font face="verdana" size="1">Search By:&nbsp;</font> </td>
          <td width="60%"><select name="searchby" id="searchby" style="font-family:verdana;font-size:10px;width: 160px" onChange="func_fillcompanyname();">
			<option value="ca">Any Field</option>
            <optgroup label="Company Data" >
			<option value="cn">Merchant Name</option>
            <option value="ri">Reference ID</option>
            <option value="id">Merchant ID (CSV List)</option>
            <option value="mn">Merchant Notes </option>
            <option value="un">Login UserName</option>
            <option value="em">Contact Email</option>
            <option value="bn">Beneficiary Name</option>
            <option value="an">Account Number</option>
            <option value="st">Active Status (Yes or No)</option>
            <option value="ps">Payable Status (Yes or No)</option>
            <option value="lp">Processed in Last # Days</option>
			</optgroup>
			<optgroup label="Website Data">
            <option value="wn">Website Name</option>
            <option value="wr">Website Reference ID</option>
            <option value="ws">Website Status</option>
			</optgroup>
            </select>
			<script>
				$('searchby').value = '<?php 
    echo $_REQUEST['searchby'] ? $_REQUEST['searchby'] : 'ca';
    ?>
';
			</script>			</td>
        </tr>
        <tr>
          <td valign="middle" align="right" width="40%"><font face="verdana" size="1">Website:&nbsp;</font> </td>
          <td width="60%"><select name="cs_URL" id="cs_URL" style="font-family:verdana;font-size:10px;width: 160px" onChange="selectCompany(this)" onBlur="selectCompany(this)" onFocus="selectCompany(this)">

            </select>          </td>
        </tr>
        <tr>
          <td height="30"  valign="top" align="right"><p><font face="verdana" size="1">Select Company:&nbsp;</font></p>
          <p>
            <input name="" type="button" id="Crop" value="Crop to Selected" style="font-family:verdana;font-size:10px;" onClick="cropRemove(true);"> <br>
            <input name="" type="button" id="Crop" value="Remove Selected" style="font-family:verdana;font-size:10px;" onClick="cropRemove(false);">
			<br>
			<font face="verdana" size="1">Limit Result:</font><input name="limit_to" type="text" id="limit_to" style="font-family:verdana;font-size:10px;" value="300" size="6" maxlength="4" onKeyUp="func_fillcompanyname();">
			<br />
			<font face="verdana" size="1"><label id="query_time"></label> </font>          </p></td>
          <td><select name="companyname[]" size="10" multiple id="companyname" style="font-family:verdana;font-size:10px;width: 160px" onChange="updateBatch(this)">
            <option value="A" selected>All Companys</option>

            </select>          </td>
        </tr>
      </table></td>
  </tr>
  <tr id="batchfieldtd" style="display:none">
    <td align="left" colspan="2"><textarea name="batchfield" rows="1" wrap="virtual" id="batchfield" style="font-family:verdana;font-size:8px;WIDTH: 550px" onmouseover="this.rows=this.value.length/145+1" onmouseout="this.rows=1" onchange="updateList(true)"><?php 
    echo quote_smart($_REQUEST['batchfield']);
    ?>
</textarea>
  </tr>
  <?php 
    if ($submittable) {
        ?>
  <tr>
    <td align="center" colspan="2">&nbsp;&nbsp;&nbsp;
      <input type="button" id="viewcompany" src="../images/view.jpg" value="View" onClick="viewCompany(this)">
  </tr>
  <?php 
    }
    ?>
</table>
      <input type="hidden" value="" id="cd_view" name="cd_view">
  <input type="hidden" value="" id="userIdList" name="userIdList">  
<script language="javascript">
<!--
func_fillcompanyname(1);

-->
</script>
<?php 
    $form_html = ob_get_clean();
    return $form_html;
}
        }
        ?>
			</form>

  <?php 
    }
    ?>

          </table></td>
        </tr>
     
    </table></td>
<?php 
}
endCacheTable(array('messageHeader' => "Reseller Payment", 'redir' => '', 'showTable' => true));
// List Reports
ob_start();
?>
<select name="ri_ID" size="5" id="ri_ID" class="invoice">
  <option value="">Select an Invoice</option>
  <?php 
func_fill_combo_conditionally("select ri_ID, ri_title, ri_status as class from `cs_reseller_invoice` ORDER BY `ri_status`='WireSuccess' ASC,`ri_date` DESC ", $_POST['rp_ID'], $cnn_cs);
?>
</select>
<BR>
<input name="Submit" type="submit" value="View Invoice">
<?php 
$invoiceHistory = ob_get_contents();
ob_end_clean();
doTable($invoiceHistory, "Invoice History", "viewResellerInvoice.php");
include "includes/footer.php";
			<td align="left" height="30" class='cl1'>
			&nbsp;<select name="cboCheckBank" style="font-family:arial;font-size:10px;width:120px">
				<option value="">Select Bank</option>
				<?php 
        func_fill_combo_conditionally("select bank_id,bank_name from cs_bank", $showval[118], $cnn_cs);
        ?>
			</select>
			</td>
		  </tr>
		  <tr> 
			<td align="left" valign="center" height="30" class='cl1'><strong><font face="verdana" size="1">&nbsp;Credit Card Bank&nbsp;</font></strong></td>
			<td align="left" height="30" class='cl1'>
			&nbsp;<select name="cboCrditBank" style="font-family:arial;font-size:10px;width:120px">
				<option value="">Select Bank</option>
				<?php 
        func_fill_combo_conditionally("select bank_id,bank_name from cs_bank", $showval[117], $cnn_cs);
        ?>
			</select>
			</td>
		  </tr>
		  <tr> 
			<td align="left" valign="center" height="30" class='cl1'><strong><font face="verdana" size="1">&nbsp;Bank Shop Id&nbsp;</font></strong></td>
			<td align="left" height="30" class='cl1'>
			&nbsp;<input type="text" name="txtShopeId" style="font-family:arial;font-size:10px;width:130px" value="<?php 
        echo $showval[114];
        ?>
">
			</td>
		  </tr>
		  <tr> 
			<td align="left" valign="center" height="30" class='cl1'><strong><font face="verdana" size="1">&nbsp;Bank Username&nbsp;</font></strong><font face="verdana" size="1">(For Volpay)</font></td>
				<option value="nonactive_reseller" >Non Active Resellers</option>
					</select>
					<script>
					document.FrmMerchant.companymode.value='<?php 
echo $companytype;
?>
';
					</script></td>
				</tr>
			  <tr>
				        <td align="right" valign="center" height="60" width="150"><font face="verdana" size="1">All 
                          Resellers &nbsp;</font></td>
				        <td align="left" height="60" width="250">&nbsp; 
                          <select id="all" name="reseller_id[]" style="font-family:arial;font-size:10px;width:210px" multiple>
<?php 
func_fill_combo_conditionally($qrt_select_allreseller);
?>
						
				</select>
				</td>
			  </tr>
			  <tr>
				<td align="center" valign="center" height="30" colspan="2"> 
				  <input type="image" name="add" id="view" SRC="<?php 
echo $tmpl_dir;
?>
/images/view.jpg"></td>
			  </tr>
			</table>
	  </td></tr>
	  </table>
Example #9
0
			</tr>
			<tr>
			<td class="lgnbd" colspan="5">
			  <table width="100%" cellspacing="1" cellpadding="1" border="0" align="center"  class="lgnbd">

				<tr>
				  <td colspan="6"><font size="1" face="Verdana" ><strong>Total Records :
					<?php 
            echo $i_count;
            ?>
</strong></font>
Show 
		  		<select name="bank_id">
                  <option value="">All Banks</option>
                  <?php 
            func_fill_combo_conditionally("Select * from cs_bank where bk_hide=0 ", $bank_id, $cnn_cs);
            ?>
                </select>
                <input type="image" id="viewcompany" SRC="<?php 
            echo $tmpl_dir;
            ?>
/images/submit.jpg" width="49" height="20">
</td>
			   </tr>
			   <?php 
            echo $str_data;
            ?>
			   <input type="hidden" name="hid_count" value="<?php 
            echo $i_count;
            ?>
">
Example #10
0
?>
';</script>
			  <select name="et_name" id="et_name" size="5" onChange="javascript:document.getElementById('selectEmail').submit()">
			<?php 
func_fill_combo_conditionally("select et_name, et_title from `cs_email_templates` where 1 {$et_catagory_sql} GROUP BY `et_name` ORDER BY `et_name` ASC ", $et_name, $cnn_cs);
?>
			</select>
              <select name="et_language" size="5" id="et_language" onChange="document.getElementById('et_custom_id').selectedIndex=-1;document.getElementById('selectEmail').submit()">
				<?php 
func_fill_combo_conditionally("select et_language as value, et_language as output from `cs_email_templates` where  et_name = '{$et_name}' and et_custom_id is null ", $et_language, $cnn_cs);
?>

              </select>
              <select name="et_custom_id" size="5" id="et_custom_id" onChange="document.getElementById('et_language').selectedIndex=-1;document.getElementById('selectEmail').submit()">
				<?php 
func_fill_combo_conditionally("select et_custom_id, et_title from `cs_email_templates` where  et_name = '{$et_name}' and et_custom_id is not null order by et_title ", $et_custom_id, $cnn_cs);
?>

              </select>
              <br>
            <a href="javascript:document.getElementById('selectEmail').submit()">View/Edit</a>
            </form></td>
          </tr>
          <tr>
            <td width="1%"><img SRC="<?php 
echo $tmpl_dir;
?>
/images/menubtmleft.gif"></td>
            <td colspan="3" background="../images/menubtmcenter.gif"><img border="0" SRC="<?php 
echo $tmpl_dir;
?>
Example #11
0
      <option value="goal">Limit Point Alerts Only</option>
      </select>    </td>
  </tr>
  <?php 
if ($adminInfo['li_level'] == 'full') {
    ?>
  <tr class="row<?php 
    echo gen_row(1);
    ?>
">
    <td>Report on Bank </td>
    <td><span class="cl1">
      <select name="bank_Creditcard" id="bank_Creditcard" class="levels">
        <option value="">All Banks</option>
        <?php 
    func_fill_combo_conditionally("select bank_id, bank_name from `cs_bank` ORDER BY `bank_name` ASC ", "", $cnn_cs);
    ?>
      </select>
    </span> </td>
  </tr>
  <?php 
}
?>
  <tr class="row<?php 
echo gen_row(1);
?>
">
    <td>Report Period</td>
    <td><select name="rp_period" id="rp_period" class="levels">
      <option value="30" <?php 
echo $_POST['rp_period'] == 30 ? "selected" : "";
Example #12
0
/images/spacer.gif" width="1" height="1"></td>
      <td height="22" align="right" valign="top" background="../images/menutoprightbg.gif"  width="9%" nowrap><img border="0" SRC="<?php 
echo $tmpl_dir;
?>
/images/menuright.gif" width="10" height="22"></td>
    </tr>
    <tr>
      <td height="96" colspan="5" class="lgnbd">
	  <table width="100%" height="47" cellpadding="0" cellspacing="0">
          <tr align="left" valign="middle" height="20">
	 	    <td colspan=10>
		  		Show 
		  		<select name="bank_id">
		  		  <option value="">All Banks</option>
				<?php 
func_fill_combo_conditionally("Select * from cs_bank", $bank_id, $cnn_cs);
?>
				</select>
		  		<input type="image" id="viewcompany" SRC="<?php 
echo $tmpl_dir;
?>
/images/submit.jpg" width="49" height="20">
		 	 </td>
		  </tr>

          <?php 
for ($i = 1; $i <= $numrows; $i++) {
    $value = mysql_fetch_assoc($result);
    $transInfo = getTransactionInfo($value['transactionId']);
    //$qry_company="select companyname ,processing_currency from cs_companydetails where userId =$value[5]";
    //$company_res= mysql_query($qry_company);
Example #13
0
    $rp_ID = -1;
    $_POST = "";
}
if (!$_POST['option_id']) {
    $_POST['option_id'] = array(0);
}
if (!$_POST['rp_title']) {
    $_POST['rp_title'] = "New Report " . date("Y-m-d");
}
// List Reports
ob_start();
?>

<select name=" rp_ID" size="5">
  <?php 
func_fill_combo_conditionally("select rp_ID, rp_title from `cs_reports` ORDER BY `rp_title` ASC ", $_POST['rp_ID'], $cnn_cs);
?>
</select>
<BR>
<input name="Submit" type="submit" value="Add New Report">
<input name="Submit" type="submit" value="Edit Report">
<input name="Submit" type="submit" value="Remove Report">
<?php 
$addRemoveReports = ob_get_contents();
ob_end_clean();
doTable($addRemoveReports, "Available Reports", "addRiskReport.php");
// Add Report
ob_start();
?>
<script language="javascript">
function updateDestination(value,id)
				</tr>
				<tr>
					<td  height="30"  valign="middle" align="right" width="135">
				  <font face="verdana" size="1">Card/Check Type</font></td>
				  
			  <td align="left" width="274">&nbsp;&nbsp; 
				<select name="type" style="font-family:verdana;font-size:10px;WIDTH: 210px" disabled></select></font></td>
				</tr>
				<tr>
				 <td  height="30"  valign="middle" align="right" width="135"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Mail 
                    Template</font></td>
                  <td align="left">&nbsp;&nbsp; 
                    <select name="mailtemplate" style="font-family:verdana;font-size:10px;WIDTH: 210px">
					<?php 
$qry = "select template_id,template_name from cs_mailtemplate where 1 ";
func_fill_combo_conditionally($qry, "", $cnn_cs);
?>
					
					</select>
					</td>
	        	</tr>
				<tr><td colspan="2">
				</td></tr>
				<tr>
				  <td  height="25"  valign="middle" align="center"  colspan='5'> 
                    <!--<a href="javascript:show()"><img SRC="<?php 
echo $tmpl_dir;
?>
/images/view.jpg" border="0"></a>-->
                    <a href="#" onClick="return func_emailprint('v');"><img SRC="<?php 
echo $tmpl_dir;
                        <td height="30" colspan="2" align="center" valign="middle" bgcolor="#CCCCCC" class="cl1"><font face="verdana" size="1" color="#FFFFFF"><strong>Reseller Name </strong></font></td>
                        <td align="left" valign="center" height="30" class="cl1">&nbsp;</td>
                      </tr>
					   <tr>
                        <td height="30" colspan="2" align="left"  class='cl1' ><font face="verdana" size="1"><strong>&nbsp;Reseller Company Name</strong></font></td>
                        <td height="30" align="left"  class='cl1' >
                          &nbsp; <select name="reseller_other"  style="font-family:verdana;font-size:10px;width:150px">

						<option value="-1"><?php 
        echo $_SESSION['gw_title'];
        ?>
</option>
<?php 
        $str_qry_resellers = "select reseller_id,reseller_companyname from cs_resellerdetails where 1 order by reseller_companyname";
        $str_selected_value = $companyInfo['reseller_id'];
        func_fill_combo_conditionally($str_qry_resellers, $str_selected_value, $cnn_cs);
        ?>
						  </select>
		                 </td>
                      </tr>
					  <?php 
    }
    ?>
                      <?php 
    //		}
    ?>
                  </table></td>
                  <td align="center" width="50%" valign="top"><table cellpadding='0' cellspacing='0' class='lefttopright' style='margin-top: 15; margin-bottom: 5' valign="top">
                      <tr>
                        <td height="30" colspan="2" align="right" valign="center" bgcolor="#CCCCCC" class='cl1'><font face="verdana" size="1" color="#FFFFFF"><strong>Manage Settings </strong>&nbsp;</font></td>
                        <td height="30" class='cl1' align="left">&nbsp;</td>
Example #16
0
echo $tmpl_dir;
?>
/images/menubtmcenter.gif" width="6" height="11"></td>
    <td width="1%" ><img src="images/menubtmright.gif"></td>
  </tr>
</table></div>
  <p>&nbsp;  </p>
<p>

<?php 
// List Reports
ob_start();
?>

<select name="ri_ID" size="5" id="ri_ID">
  <option value="">Select an Invoice</option>
  <?php 
func_fill_combo_conditionally("select ri_ID, ri_title from `cs_reseller_invoice` where ri_reseller_id = '{$reseller_id}' ORDER BY `ri_date` ASC ", $_POST['rp_ID'], $cnn_cs);
?>
</select>
<BR>
<input type="hidden" name="reseller_id" value="<?php 
echo $reseller_id;
?>
">
<input name="Submit" type="submit" value="View Invoice">
<?php 
$invoiceHistory = ob_get_contents();
ob_end_clean();
doTable($invoiceHistory, "Invoice History", "viewResellerInvoice.php");
include "includes/footer.php";
		<td height="22" align="right" valign="top" background="../images/menutoprightbg.gif"  width="1%" nowrap><img border="0" SRC="<?php 
echo $tmpl_dir;
?>
/images/menuright.gif" width="10" height="22"></td>
		</tr>
		<tr>
		<td class="lgnbd" colspan="5" width="987" >
		<form name="frmBank" action="#"  method="GET">
		<table border="0" cellpadding="3" cellspacing="3" align="center" width="90%">
			<tr>
				  <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Bank Name</font></td>
				<td>
				<select name="cboBanks" style="width:200">
				<option value="">Select Bank</option>
				<?php 
func_fill_combo_conditionally("select bank_id,bank_name from cs_bank where 1 ", "", $cnn_cs);
?>
				</select>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<a href="javascript:funcSubmit()"><img SRC="<?php 
echo $tmpl_dir;
?>
/images/submit.jpg" alt="submit" border="0"></a>
				</td>
			</tr>
			</table>
		</form>
		</td>
Example #18
0
	//document.getElementById('ch_merchant_discount_rate').value = Math.round(100*(parseFloat(document.getElementById('ch_total_discount_rate').value)+parseFloat(document.getElementById('ch_reseller_discount_rate').value)))*.01;
}
</script>
<table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="2" height="50" align="center" valign="middle"><?php 
echo $msg;
?>
</td>
    </tr>
    <tr>
      <td align="right" height="50" valign="middle"><font face="verdana" size="1">Select Merchant</font>&nbsp;</td>
      <td>&nbsp;
        <select name="userId" id="userId">
          <?php 
echo func_fill_combo_conditionally("select userId, companyname  from cs_companydetails as cd where cd.reseller_id='" . $resellerInfo['reseller_id'] . "' and cd.cd_reseller_rates_request=1", $cnn_cs);
?>
        </select>
		<script>
			document.getElementById('userId').value = <?php 
echo $userId;
?>
;
		</script>
      </td>
    </tr>
    <tr>
      <td colspan="2" height="50" align="center" valign="middle"><input	type="image" src="../images/submit.jpg"></td>
    </tr>
</table>
<?php 
        <td colspan="2"><input type="button" name="Submit" value="Generate" onClick="generateCode()"></td>
      </tr>
    </table>
    <?php 
endTable("Generate HTML/Purchase Buttons");
?>
	
    <?php 
beginTable();
?>
    <table width="100%"  border="1" cellspacing="2" cellpadding="2" class="websites">
      <tr>
        <td>Choose Price Point:</td>
        <td><select name="pc_subAccount" id="pc_subAccount" style="font-family:arial;font-size:10px;width:300px">
            <?php 
echo func_fill_combo_conditionally("select rd_subaccount, concat(rd_subName,' - ',rd_description) from `cs_rebillingdetails` where `rd_hide` = 0 AND `rd_en_ID` = '{$en_ID}' ORDER BY `rd_subName` ASC ", -1, $cnn_cs);
?>
          </select></td>
      </tr>
      <tr>
        <td>Password Mode :</td>
        <td><select id="pin_mode" style="font-family:arial;font-size:10px;width:300px">
          <option value="pincode">Pin Codes</option>
          <option value="userpass">Username/Pass</option>
          </select></td>
      </tr>
      <tr align="center" height="300">
        <td colspan="2"><select name="pin_codes" id="pincodes" size="16" style="width:400px;" multiple>
        </select>&nbsp;<br />
        <input type="button" name="pin_purgePincodeInfo" value="Purge Selected PinCodes" onclick="purgePinCodes()" />
        <input type="button" name="pin_purgePincodeInfo" value="Download Selected Pins" onclick="downloadPinCodes()" /></td>
Example #20
0
										</select>
									</td>
								</tr>
							</table>
						</div>
						<div id="tsruser" style="display:None">
							<table width="100%">
								<tr>
									<td width="37" align="left" valign="middle">
										<font face="Verdana, Arial, Helvetica, sans-serif" size="1">TSR Users</font>
									</td>
									<td align="left" width="157">&nbsp; 
										<select name="tsrusers[]" style="font-family:verdana;font-size:10px;WIDTH:140px" multiple>
										<option value="A" selected>All Users</option>
										<?php 
        print func_fill_combo_conditionally($str_qry_tsr, $str_selected_value, $cnn_cs);
        ?>
										</select>
									</td>
								</tr>
							</table>
						</div>
					</td>
				</tr>
<?php 
    }
    ?>
				<tr> 
					<td  height="20"  valign="middle" align="left"> <font face="verdana" size="1">Payment Type</font></td>
					<td align="left" width="230"><select name="crorcq" style="font-family:verdana;font-size:10px;WIDTH: 180px" onChange="javascript:showType()">
						<option value='A'  >All</option>
Example #21
0
}
// List Reports
$statusSql = 1;
$mi_status = quote_smart($_REQUEST['mi_status']);
if ($mi_status) {
    $statusSql = "mi_status = '{$mi_status}'";
}
$invoiceSql = "select concat(mi_ID,'|',mi_status,'|',mib_ID) as mi_info , mi_title, mi_status as class from \n`cs_merchant_invoice` \nleft join `cs_merchant_invoice_banksub` as mi on mib_mi_ID = mi_ID\nleft join `cs_companydetails` as cd on cd.userId = mi_company_id \nWhere {$statusSql} {$userList_sql} and cd_pay_status='payable' and cd_ignore=0 GROUP BY `mi_ID` ORDER BY `mi_status`='WireSuccess' ASC , `mi_status`, `mi_date` DESC ";
ob_start();
?>

<a name="InvoiceHistory"></a>
<select name="mi_ID[]" size="10" id="mi_ID" class="invoice" multiple>
  <option value="">Select an Invoice</option>
  <?php 
func_fill_combo_conditionally($invoiceSql, NULL, $cnn_cs);
?>
</select>
<BR><table width="200" border="1" class="invoice" >
  <tr>
    <td><input name="submit" type="button" class="infoSubSection" id="btn_sel" onClick="generateBatchPayout()" value="Select"></td>
    <td><input name="submit" type="button" value="View Invoice" onClick="viewInvoice()"></td>
    <td><input name="submit" type="button" class="infoSubSection" id="wirecreate2" onClick="generateWireInfo()" value="Generate Wire Info"></td>
    <td><input name="submit" type="submit" class="infoSubSection" value="Set Status"></td>
    <td><input name="submit" type="button" class="infoSubSection" onClick="generateBatchPayout()" value="SM Payout File"></td>
    <td><input name="submit" type="submit" class="infoSubSection" value="SM Payout Response"></td>
  </tr>
  <tr>
    <td><select name="mi_status" id="select2" class="invoice" onChange="changeStatus(this.value)">
      <?php 
echo func_get_enum_values('cs_merchant_invoice', 'mi_status', $mi_status, 'Any Status', '');