KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/abtechsci/mmc15/ezupload/cp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/abtechsci/mmc15/ezupload/cp/frs.php
<?php

require("header.php");

$sty=$_POST["sty"];
$form_name=$_POST["form_name"];
$thank_you=stripslashes($_POST['thank_you']);
$success_action = $_POST['success_action'];
$redirecturl = $_POST["redirecturl"];
$footer = stripslashes($_POST['footer']);
$header = stripslashes($_POST['header']);
$location=$_POST["location"];
$progress=$_POST["progress"];
$notification=$_POST["notification"];
$weather=$_POST["weather"];
$uformprotect=$_POST["uformprotect"];
$notify_uploader = $_POST["notify_uploader"];
$uploademail = $_POST["uploademail"];
$subject=$_POST["subject"];
$message=$_POST["message"];
$public_reg = $_POST["public_reg"];
$submit=$_POST["submit"];

//echo $sty . "----------->" . $form_name .  "----------->" . $location .  "----------->" . $progress .  "----------->" . $weather .  "----------->" . $uformprotect ; 


if($submit != "" )
{
	//Validation
	if($success_action=="redirect"){
		if(empty($redirecturl)){
			$error[]="Please enter redirection url.\\n";
		}
	}else
	{
		if(empty($thank_you)){
			$error[]="Please enter confirmation message.\\n";			
		}
	}
	
	if($notify_uploader==1){
		if(empty($uploademail)){
			$error[]="Please select email field.\\n";
		}
		if(empty($subject)){
			$error[]="Please enter confirmation subject.\\n";
		}	
		if(empty($message)){
			$error[]="Please enter confirmation message.\\n";
		}						
	}
	
	if($success_action == "redirect"){
		$thank_you = "";
	}
	else{
		$redirecturl ="";
	}
	//end of validation
	//if everything is okay, update database
	if(count($error)<=0){
		$form_setting=new form_setting();
		$form_setting->update( $sty, $form_name,$location, $progress, $weather, $uformprotect,$header,$footer,$thank_you,$notification,$redirecturl,$uploademail,$notify_uploader,$subject,$message,$public_reg);	
	}
}
else
{
	$form_setting=new form_setting();
	$temp=$form_setting->get();
	
	$sty=$temp[0]->sty;
	$form_name=$temp[0]->form_name;
	$location=$temp[0]->location;
	$progress=$temp[0]->progress;
	$weather=$temp[0]->weather;
	$uformprotect=$temp[0]->uformprotect;
	$header=$temp[0]->header;
	$footer=$temp[0]->footer;
	$thank_you=$temp[0]->thankyoumsg;
	$notification = $temp[0]->notification;
	$redirecturl = $temp[0]->redirecturl;
	$notify_uploader =  $temp[0]->sendconfirmation;
	$uploademail = $temp[0]->uploademail;
	$subject = $temp[0]->confirmtitle;
	$message = $temp[0]->confirmmsg;
	$public_reg = $temp[0]->public_reg;
	
	if($redirecturl ==""){
		$success_action = "message";
	}
	else{
		$success_action = "redirect";
	}
}


//this function gets styles name from the syles folder
function print_styles_names()

{
	global $sty;
	
	$d = dir("styles");
	$i=0;

	while (false != ($entry = $d->read())) {
		if($entry!="."  & $entry!="..")
		{
			$formatted_css_name = substr( $entry,0,strlen($entry)-4) ;
			if($i==0 &&empty($style_name))
			{
				$style_name  = $formatted_css_name;
			}

			if($sty == $formatted_css_name)
	   				echo "<option selected>" . $formatted_css_name. "</option>";			
			else	
	   				echo "<option>" . $formatted_css_name. "</option>";

			$i++;
		}
	}
	$d->close();
}

function progIsSelected($n)
{
	global $_POST,$progress;
	if(isset($_POST["progress"]))
	{
		if($_POST["progress"] == $n)
		{
			echo "CHECKED";
		}
	}
	else
	{
		if($progress == $n)
		{
			echo "CHECKED";
		}		
	}
}

function print_fields($uploademail)
{
		global $uploademail;
		echo "<select name=uploademail>";		
		echo "<option> </option>";		
		$fields=new fields();
		$temp=$fields->get("");
		for( $a=0; $a < count($temp) ; $a++ )
		{
			$type=$temp[$a]->type;					
			$field_name=$temp[$a]->name;
			$field_id = $temp[$a]->fid;
			if($type!='file')
			{
				if($uploademail == $field_id)
				{
					echo "<option selected value='$field_id'>$field_name</option>";				
				}
				else
				{
					echo "<option value='$field_id'>$field_name</option>";
				}
			}
		}	
		echo "</select>";		
}

function get_errors($error){
	$alert_str  = "alert('";
	foreach($error as $key=>$val){
		$alert_str .= $val ;
	}
	$alert_str .= "')";
	
	return $alert_str;
}

?>
<HTML>
<HEAD>
<TITLE>Control Panel</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<!--For help tooltips-->
<SCRIPT language="JavaScript1.2" src="f_files/help_tips/main.js" type="text/javascript"></SCRIPT>  

<link rel="stylesheet" href="f_files/global.css" />
<script language="Javascript1.2"><!-- // load htmlarea
	_editor_url = 'textarea/';                     // URL to htmlarea files
	var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
	if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
	if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
	if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
	if (win_ie_ver >= 5.5) {
	  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
	  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
	} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
	// --></script>
<script language="javascript" type="text/javascript" src="js/main.js"></script>
</HEAD>
<BODY <?php if(count($error)>0){ echo "onLoad=\"" .get_errors($error). "\"" ; }  ?>>
<!--For help tooltips-->
<DIV id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></DIV>
<SCRIPT language="JavaScript1.2" src="f_files/help_tips/style.js" type="text/javascript"></SCRIPT> 
 
	<table width="100" align="center" cellpadding="0" cellspacing="0" class="main_table" id="table1">
	  <tr><td height="1505">
		<form name="myform" action="frs.php" method="post">
<TABLE width="300" height="405" align="center" cellPadding=0 cellSpacing=0 bgcolor="#FFFFFF" id="table2">
<?php require("cp_header.php")?>
	<tr>
    <TD height=228 bgcolor="#FFFFFF">
				<table border="0" cellpadding="0" cellspacing="0" id="table3" height="208">
					
						<tr>
						<td width="768" height="187">
						  <div align="center"><a href="" onMouseOver="stm(frs[0],Style);" onClick="return false;" onMouseOut="htm()"><img src="f_files/help_icon_small.jpg" alt="" width="40" height="40" border="0"></a><br>
						    <table width="60%" height="467" align="center" cellpadding="0" cellspacing="0" class="main_table">
                              <tr>
                                <td height="465"><table width="640" height="465" border="0" align="center" cellpadding="0" cellspacing="0">
                                    <tr>
                                      <td width="619" class="t_header"><div class="div_1">Uploading Form Design </div></td>
                                    </tr>
                                    <tr>
                                      <td height="447"><table width="100%" height="433" border="0" cellpadding="0" cellspacing="0">
                                          <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                            <td class="td_1" align="left" width="18%"><div class="div_1">Style</div></td>
                                            <td align="left" class="td_2"><div class="div_2">
                                                <select size="1" name="sty">
                                                  <?php print_styles_names(); ?>
                                                </select>
                                            </div></td>
                                          </tr>
                                          <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                            <td class="td_1" align="left" width="18%"><div class="div_1">Form Title </div></td>
                                            <td align="left" class="td_2"><input name="form_name" type="text" id="form_name" value="<?php echo $form_name; ?>" size="40" ></td>
                                          </tr>
                                          <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                            <td width="18%" height="153" align="left" class="td_1"><div class="div_1">Header</div></td>
                                            <td align="left" class="td_2"><div class="div_2">
                                                <textarea cols="60" rows="10" name="header" style="float: left"><?php echo $header ; ?></textarea>
                                            </div></td>
                                            <script language="JavaScript1.2" defer>
													var config = new Object(); // create new config object
													config.width = '99%';
													config.height = '200px';
													config.bodyStyle = 'background-color: #ffffff; font-family: "Verdana"; font-size: x-small;';
													config.debug = 0;
													
													editor_generate('header');	
													</script>
                                          </tr>
                                          <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                            <td height="151" align="left" class="td_1"><div class="div_1">Footer</div></td>
                                            <td align="left" class="td_2"><div class="div_2">
                                                <textarea cols="60" rows="10" name="footer" style="float: left"><?php echo $footer ; ?></textarea>
                                            </div></td>
                                            <script language="JavaScript1.2" defer>
													var config = new Object(); // create new config object
													config.width = '99%';
													config.height = '200px';
													config.bodyStyle = 'background-color: #ffffff; font-family: "Verdana"; font-size: x-small;';
													config.debug = 0;
													
													editor_generate('footer');	
													</script>
                                          </tr>
                                          <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                            <td height="119" align="left" class="td_1"><div class="div_1">Progress Bar Style</div></td>
                                            <td class="td_2" align="left"><div class="div_2">
                                                <table>
                                                  <tr>
                                                    <td class="normal_td"><input type="radio" name="progress" value="1" <?php progIsSelected(1)?>></td>
                                                    <td class="normal_td"><img src="f_files/progressBar1.gif" border="0"></td>
                                                    <td class="normal_td"><input type="radio" name="progress" value="2" <?php progIsSelected(2)?>></td>
                                                    <td class="normal_td"><img src="f_files/progressBar2.gif" border="0" ></td>
                                                  </tr>
                                                  <tr>
                                                    <td class="normal_td"><input type="radio" name="progress" value="3" <?php progIsSelected(3)?>></td>
                                                    <td class="normal_td"><img src="f_files/progressBar3.gif" border="0" ></td>
                                                    <td class="normal_td" ><input type="radio" name="progress" value="4" <?php progIsSelected(4)?>></td>
                                                    <td class="normal_td"><img src="f_files/progressBar4.gif" border="0"></td>
                                                  </tr>
                                                  <tr>
                                                    <td class="normal_td"><input type="radio" name="progress" value="0" <?php progIsSelected(0)?>></td>
                                                    <td class="normal_td">None</td>
                                                  </tr>
                                                </table>
                                            </div></td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                </table></td>
                              </tr>
                            </table>
						    <br>
						    <table width="640" height="274" border="0" align="center" cellpadding="0" cellspacing="0" class="main_table">
                              <tr>
                                <td width="619" class="t_header"><div class="div_1">Successful Upload Action </div></td>
                              </tr>
                              <tr>
                                <td height="246"><table width="105%" height="256" border="0" cellpadding="0" cellspacing="0">
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td class="td_1" align="left" width="18%">&nbsp;</td>
                                      <td colspan="2" align="left" class="td_2"><div class="div_2">
                                        <label>
                                        <input name="success_action" type="radio" value="redirect" <?php if($success_action=="redirect") echo "checked"; ?>>
                                        </label>
Redirect To Another Page </div></td>
                                    </tr>
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td class="td_1" align="left" width="18%"><div class="div_1">Redirect URL </div></td>
                                      <td align="left" class="td_2"><input name="redirecturl" type="text" id="redirecturl" value="<?php echo $redirecturl; ?>" size="40" onFocus="myform.success_action[0].checked=true;"> 
                                      &nbsp;
                                      <div class="div_note">e.g. http://www.mysite.com/thanks.html</div></td>
                                      <td align="left" class="td_2">&nbsp;</td>
                                    </tr>
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td class="td_1" align="left">&nbsp;</td>
                                      <td colspan="2" align="left" class="td_2"><label>
                                        <input name="success_action" type="radio" value="message"
										<?php if($success_action=="message") echo "checked"; ?>>
                                      </label>
Display Confirmation Message </td>
                                    </tr>
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)" onClick="myform.success_action[1].checked=true;">
                                      <td width="18%" height="172" align="left" class="td_1"><div class="div_1">Confirmation Message </div></td>
                                      <td colspan="2" align="left" class="td_2"><div class="div_2">
                                        <textarea cols="60" rows="10" name='thank_you' style="float: left" ><?php echo $thank_you; ?></textarea>
                                      </div></td>
                                            <script language="JavaScript1.2" defer>
													var config = new Object(); // create new config object
													config.width = '99%';
													config.height = '200px';
													config.bodyStyle = 'background-color: #ffffff; font-family: "Verdana"; font-size: x-small;';
													config.debug = 0;
													editor_generate('thank_you');	
											</script>									  
                                  </tr>
                                    
                                    
                                </table></td>
                              </tr>
                            </table>
						    <br>
						    <table width="640" border="0" align="center" cellpadding="0" cellspacing="0" class="main_table">
                              <tr>
                                <td width="619" class="t_header"><div class="div_1">Uploader Email Confirmation </div></td>
                              </tr>
                              <tr>
                                <td height="221"><table width="105%" height="221" border="0" cellpadding="0" cellspacing="0">
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td class="td_1" align="left" width="18%">&nbsp;</td>
                                      <td align="left" class="td_2"><div class="div_2">
                                          <label>
                                          <input name="notify_uploader" type="checkbox" id="notify_uploader" value="1" <?php if($notify_uploader==1) echo "checked"; ?>>
                                        Enable Email Confirmation </label>
                                      </div></td>
                                    </tr>
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td class="td_1" align="left" width="18%"><div class="div_1">Email Field Name</div></td>
                                      <td align="left" class="td_2"><?php print_fields($uploademail); ?></td>
                                    </tr>
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td class="td_1" align="left" width="18%">Subject</td>
                                      <td align="left" class="td_2"><label>
                                        <input name="subject" type="text" id="subject" size="50" value='<?php echo $subject ; ?>'>
                                      </label></td>
                                    </tr>
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td width="18%" height="143" align="left" class="td_1"><div class="div_1">Message</div></td>
                                      <td align="left" class="td_2"><div class="div_2">
                                        <textarea name="message" cols="80" rows="10" id="message" style="float: left"><?php echo $message ; ?></textarea>
</div></td>
							      </tr>
                                </table></td>
                              </tr>
                            </table>
						    <br>
						    <table width="640" border="0" align="center" cellpadding="0" cellspacing="0" class="main_table">
                              <tr>
                                <td width="619" class="t_header"><div class="div_1">Misc</div></td>
                              </tr>
                              <tr>
                                <td><table width="105%" height="120" border="0" cellpadding="0" cellspacing="0">
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td width="18%" height="41" align="left" class="td_1">Send Notification To Admin </td>
                                      <td align="left" class="td_2"><div class="div_2">
                                        <label>
<input name="notification" type="checkbox" id="notification" value="1" <?php if ( $notification == "1" ){echo " CHECKED" ; } ?>>                                        
Enable </label>
</div></td>
                                    </tr>
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td width="18%" height="26" align="left" class="td_1"><div class="div_1">Private Form</div></td>
                                      <td align="left" class="td_2"><div class="div_2">
                                          <label>
                                          
                                          <input name="uformprotect" type="checkbox" id="uformprotect" value="1" <?php	if ( $uformprotect == 1 ){echo " CHECKED" ; } ?> >
                                        Enable </label>
&nbsp;&nbsp;
<div class="div_note">(Visitor must login to upload files - You have to create accounts from the users section or<br> 
  allow public registeration) </div>
                                      </div></td>
                                    </tr>
                                    <tr onMouseOver="tplTrOver(this)" onMouseOut="tplTrOut(this)">
                                      <td width="18%" height="26" align="left" class="td_1"><div class="div_1">Allow Public Registeration </div></td>
                                      <td align="left" class="td_2"><div class="div_2">
                                          <label>
                                          <input name="public_reg" type="checkbox" id="public_reg" value="1" <?php if ( $public_reg == "1" ){echo " CHECKED" ; } ?> >
                                            Enable </label>
                                      </div></td>
                                    </tr>

                                </table></td>
                              </tr>
                            </table>
						    <br>
						    <input type="submit" value="  Save   " name="submit" class="button" >
						  </div></td>
					</tr>
					<tr>
						<td>
						<p align="center">&nbsp;</p>
						<p align="center"><a href="formgenerator.php">Back </a><br>
&nbsp;</td>
					</tr>
		    </table>	</td>
    </tr>
		  </TABLE>
	</form>
 			</td>
		</tr>
		<?php include("footer.php"); ?>
</table>
</BODY></HTML>

Anon7 - 2021