All pastes #126640 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-08-11 17:40 UTC
rendered paste body
<?
include("system/config.inc.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Welcome To Coin Trader</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="css/style.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0" class="pageborder">
  <tr>
    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center"><?php include(INC."top.inc.php"); ?></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>
		<?
			if(!loginadmincheck())
			{
				header("location:login.php");
				die();
			}
			else
			{				
				if(actionfrmcheck("action","4"))
				{
					
					$sql="UPDATE `tblsettings` SET 
					`varContactEmail` = '".$_REQUEST['aemail']."',
					`ttSettingUpdated` = NOW( ) ,
					varSiteTitle  ='".$_REQUEST['sitename']."',
					intMaxImagePercoin ='".$_REQUEST['maxpercoin']."',
					varSiteURL ='".$_REQUEST['siteurl']."',
					varcurrency ='".$_REQUEST['currncy']."',
					mailsender = '".$_REQUEST['chkemail']."',					
					thumbh = '".$_REQUEST['thumh']."',
					largeh = '".$_REQUEST['largh']."',
					intimgheight = '".$_REQUEST['imghieght']."',
					intwidth = '".$_REQUEST['imgwidth']."',
					varimgsize = '".$_REQUEST['imgsize']."',
					maindisplay = '".$_REQUEST['txtmaindisplay']."',							
					varSettingsUpdatedFrom   ='".$_SERVER['REMOTE_ADDR']."'";
				
					$res_update=$obj_db->edit($sql);
					if($res_update)
					{
						unset($_SESSION['config_val']);
						configvalfetch($obj_db);
						header("location:index.php?msg=upcnfg");
						die();
					}
					else
					{
						header("location:index.php?msg=upcnfgn");
						die();
					}							
					
				}
				else
				{
				
					$sql="SELECT *
					FROM `tblsettings`";
					$res_settting=$obj_db->select($sql);
					if($res_settting)
					{
					?>
		<form action="settings.php" method="post" name="frmconfig" id="frmconfig">
		  <table width="80%" border="0" cellspacing="0" cellpadding="0" align="center" class="inneradmintable">
            <tr class="inneradmintablehead">
              <th width="2%" scope="col">&nbsp;</th>
              <th colspan="3" class="tableheading" scope="col">Site Configuration </th>
              <th width="1%" scope="col">&nbsp;</th>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td width="38%">&nbsp;</td>
              <td width="3%">&nbsp;</td>
              <td width="56%">&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Site Name </td>
              <td>:</td>
              <td><input name="sitename" type="text" id="sitename" value="<?=$res_settting[0]['varSiteTitle'];?>"></td>
              <td>&nbsp;</td>
            </tr>
            
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Site Url </td>
              <td>&nbsp;</td>
              <td><input name="siteurl" type="text" id="siteurl" value="<?=$res_settting[0]['varSiteURL'];?>"></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Currency</td>
              <td>:</td>
              <td><input name="currncy" type="text" id="currncy" value="<?=$res_settting[0]['varcurrency'];?>"></td>
              <td>&nbsp;</td>
            </tr>
            

            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Admin/Contact Email Address </td>
              <td>:</td>
              <td><input name="aemail" type="text" id="aemail" value="<?=$res_settting[0]['varContactEmail'];?>"></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Auto Email Send to Sender </td>
              <td>&nbsp;</td>
              <td>
			  <?
			  $condvalemail="";
			  if($res_settting[0]['mailsender']=="on")
			  {
			  		$condvalemail="checked";
			  }
			  
			  ?>
			  <input name="chkemail" type="checkbox" id="chkemail" value="on" <?=$condvalemail;?> > 
              &nbsp; Checked , If u want to send email to the sender of the offer</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="tableheading">Front View </td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">No# of item display on main page </td>
              <td>:</td>
              <td><input name="txtmaindisplay" type="text" id="txtmaindisplay" value="<?=$res_settting[0]['maindisplay'];?>"></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="tableheading">&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="tableheading">Images Details </td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Maximum image per coin upload </td>
              <td>&nbsp;</td>
              <td><input name="maxpercoin" type="text" id="maxpercoin" value="<?=$res_settting[0]['intMaxImagePercoin'];?>" size="8" maxlength="5"> </td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Thumbnail Image </td>
              <td>:</td>
              <td><input name="thumh" type="text" id="thumh" value="<?=$res_settting[0]['thumbh'];?>" size="8" maxlength="5"> 
                Pixels </td>
              <td>&nbsp;</td>
            </tr>
           
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Large Image</td>
              <td>:</td>
              <td><input name="largh" type="text" id="largh" value="<?=$res_settting[0]['largeh'];?>" size="8" maxlength="5">
Pixels</td>
              <td>&nbsp;</td>
            </tr>
          
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Image Height </td>
              <td>&nbsp;</td>
              <td><input name="imghieght" type="text" id="imghieght" value="<?=$res_settting[0]['intimgheight'];?>" size="10" ></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Image Width </td>
              <td>&nbsp;</td>
              <td><input name="imgwidth" type="text" id="imgwidth" value="<?=$res_settting[0]['intwidth'];?>" size="10" ></td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td class="normaltblwrite">Image size for upload </td>
              <td>&nbsp;</td>
              <td><input name="imgsize" type="text" id="imgsize" value="<?=$res_settting[0]['varimgsize'];?>" size="10" ></td>
              <td>&nbsp;</td>
            </tr>
            
            
            
            <tr>
              <th scope="row">&nbsp;</th>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td colspan="3" align="center"><input name="Submit2" type="reset" class="boxGey" value="Reset">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input name="Button" type="button" class="boxGey" value="Update" onClick="return frmsettingvalidate(this.form);">
                <input name="action" type="hidden" id="action" value="4">                </td>
              <td>&nbsp;</td>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
              <td>&nbsp;</td>
            </tr>
          </table>
            </form>
		<?
					}
				}
							
				
			}
		
		?></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>


<script language="javascript">
function frmsettingvalidate(frm)
{
	var cond=true;
	if(!isemtpyandlength(frm.sitename,0,"Site Name cannot be Null") && cond==true )
	{
		cond=false;
	}
	if(!isemtpyandlength(frm.siteurl,7,"Site Url  must be proper") && cond==true )
	{
		cond=false;
	}
	if(!isemtpyandlength(frm.currncy,0,"Currency cannot be Null") && cond==true )
	{
		cond=false;
	}
	else if(!checkMail(frm.aemail,"Enter Valid Email Address")  && cond==true)
	{
		cond=false;
	}
	else if(!IsNumeric(frm.txtmaindisplay,"Enter the Value display coin on main page" )  && cond==true)
	{
		cond=false;
	}
	else if(!IsNumeric(frm.maxpercoin,"Enter the Value for maximun coins image upload" )  && cond==true)
	{
		cond=false;
	}
	else if( (parseInt(frm.txtmaindisplay.value) >  20)   && cond==true)
	{
	
		alert("Please Enter the value less than 20 ");
		cond=false;
	}
	else if(!IsNumeric(frm.thumh,"Enter the Value thumb nail image" )  && cond==true)
	{
		cond=false;
	}
	else if(!IsNumeric(frm.largh,"Enter the Value Large image" )  && cond==true)
	{
		cond=false;
	}
	
	
	
	if(cond==true)
	{
		frm.submit();
	}
	else
	{
		return false;
	}

}
</script>