0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
admin
/
configuration
/
[
Home
]
File: payment_methode.php
<? if($_POST['Submit']=="Change") { for($i=1;$i<=4;$i++) { if(isset($_POST['checkbox'.$i])) { if($checkbox_value=="") { $checkbox_value=$_POST['checkbox'.$i]."<br>"; } else { $checkbox_value=$checkbox_value.$_POST['checkbox'.$i]."<br>"; } } } $q_change="update configuration set configuration_value='".$checkbox_value."' where configuration_id='5'"; $r_change=mysql_query($q_change); if($r_change) { echo "Shipping process changed"; } } $q_conf="select * from configuration where configuration_id='5'"; $r_conf=mysql_query($q_conf); $row_conf=mysql_fetch_array($r_conf); ?> <link href="../css/admin-style.css" rel="stylesheet" type="text/css"> <table width="500" border="0" cellpadding="2" cellspacing="0" class="table-all-thin-border"> <tr> <td align="left" valign="top"><form name="form1" method="post" action=""> <table width="500" border="0" cellspacing="0" cellpadding="2"> <tr class="create-catalog-header"> <td height="32" colspan="2" align="left" valign="middle">Store Payment Configuration</td> </tr> <tr> <td width="150" height="25" align="left" valign="top" class="left-links">Current Payment method</td> <? if($row_conf['configuration_value']=="") { $value="<font color='#ff0000'>Store shipping process not seted yet</font>"; } else { $value=$row_conf['configuration_value']; } ?> <td align="left" valign="top" class="left-links"> <font color="#006600"> <?=$value?> </font></td> </tr> <tr> <td height="25" align="left" valign="top" class="left-links">Change Payment method</td> <? $p_check="Unchecked"; $w_check="Unchecked"; $a_check="Unchecked"; $m_check="Unchecked"; $a=$row_conf['configuration_value']; if(stristr($a, "Paypal") == TRUE) { $p_check="checked"; } if(stristr($a, "WorldPay") == TRUE) { $w_check="checked"; } if(stristr($a, "AlertPay") == TRUE) { $a_check="checked"; } if(stristr($a, "Moneybooker") == TRUE) { $m_check="checked"; } ?> <td align="left" valign="top"> <p class="left-links"> 1. <input name="checkbox1" type="checkbox" id="checkbox1" value="Paypal" <?=$p_check?>> Paypal<br> 2. <input type="checkbox" name="checkbox2" value="WorldPay" <?=$w_check?>> WorldPay<br> 3. <input type="checkbox" name="checkbox3" value="AlertPay" <?=$a_check?>> AlertPay<br> 4. <input name="checkbox4" type="checkbox" value="Moneybooker" <?=$m_check?>> Moneybooker</p></td> </tr> <tr> <td height="25" align="left" valign="middle" class="left-links"> </td> <td align="left" valign="middle" class="left-links"><font color="#990000">Select your payment process</font></td> </tr> <tr> <td height="25" align="left" valign="middle" class="left-links"> </td> <td align="left" valign="middle"><input type="submit" name="Submit" value="Change"></td> </tr> </table> </form></td> </tr> </table>