HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: /home/httpd/html/baretube.com/admin/edit_pornstar.php
<? require "header.php"; ?>
<? if($_POST) {
	$custom = mysql_real_escape_string(serialize($_POST[custom]));
	$_POST = mysql_real_escape_array($_POST); 
	mysql_query("UPDATE pornstars SET name = '$_POST[name]', aka = '$_POST[aka]', dob = '$_POST[dob]', height = '$_POST[height]', weight = '$_POST[weight]', measurements = '$_POST[measurements]', hair = '$_POST[hair]', eyes = '$_POST[eyes]', ethnicity = '$_POST[ethnicity]', official_site_name = '$_POST[official_site_name]', official_site_url = '$_POST[official_site_url]', biography = '$_POST[biography]', custom = '$custom', views = '$_POST[views]' WHERE record_num = '$_POST[id]'");
	$insertid = $_POST[id]; 
	if($_FILES[thumb][tmp_name]) {
		$name = 'model'.$insertid.'.jpg';
		move_uploaded_file($_FILES[thumb][tmp_name], $misc_path.'/'.$name); 
		mysql_query("UPDATE pornstars SET thumb = '$name' WHERE record_num = '$insertid'");
	}
	$success = true;
}
$result = mysql_query("SELECT * FROM pornstars WHERE record_num = '$_GET[id]'");
$row = mysql_fetch_array($result); 
$custom = unserialize($row[custom]);
?>
     <div id="right_column">
        <div id="right_top">
        	<div id="right_home"></div>
            <div id="right_right">  
            <a href="index.php">Admin Home</a>          
            <span><a href="pornstars.php">Manage Pornstars</a></span>  
            </div>
        </div>
        <div id="right_bg">  
      		<h2>Edit<strong>Pornstar</strong></h2>
            <div id="index_left" style='width: 100%;'>            
<form method='post' action='' enctype='multipart/form-data'>
<input type='hidden' name='id' value='<? echo $_GET[id]; ?>' />
<? if($success) { ?><p align='center'>Save Successful. <a href='pornstars.php'>Click here to go back</a>.</p>
<? } ?>
<table width="750" border="0" align="center" cellpadding="3" cellspacing="0" class='pagetable'>
  <thead>
    <tr >
      <th colspan="2" align='left' >Edit Pornstar - <? echo $row[name]; ?></th>
    </tr>
  </thead>
  <tr>
    <td width="130" height="25" class="style4">Name</td>
    <td width="608" height="25" align="left" class="style4"><input name="name" type="text" class="style4" id="name" size="35" maxlength="255"  value="<? echo $row[name]; ?>" /></td>
  </tr>
  <tr>
    <td height="25" class="style4">AKA</td>
    <td height="25" align="left" class="style4"><input name="aka" type="text" class="style4" id="url" size="35" maxlength="255" value="<? echo $row[aka]; ?>" /></td>
  </tr>
  <tr>
    <td height="25" class="style4">Date Of Birth</td>
    <td height="25" align="left" class="style4"><input name="dob" type="text" class="style4" id="url2" size="35" maxlength="255" value="<? echo $row[dob]; ?>"  /></td>
  </tr>
  <tr>
    <td height="25" class="style4">Height</td>
    <td height="25" align="left" class="style4"><input name="height" type="text" class="style4" id="url3" size="35" maxlength="255" value="<? echo $row[height]; ?>" /></td>
  </tr>
  <tr>
    <td height="25" class="style4">Weight</td>
    <td height="25" align="left" class="style4"><input name="weight" type="text" class="style4" id="url4" size="35" maxlength="255" value="<? echo $row[weight]; ?>" /></td>
  </tr>
  <tr>
    <td height="25" class="style4">Measurements</td>
    <td height="25" align="left" class="style4"><input name="measurements" type="text" class="style4" id="url5" size="35" maxlength="255"  value="<? echo $row[measurements]; ?>" /></td>
  </tr>
  <tr>
    <td height="25" class="style4">Hair Color</td>
    <td height="25" align="left" class="style4"><select name="hair" id="select">
      <option value=''>-Select-</option>
      <option <? if($row[hair] == 'Blonde') { echo 'selected'; } ?>>Blonde</option>
      <option <? if($row[hair] == 'Red') { echo 'selected'; } ?>>Red</option>
      <option <? if($row[hair] == 'Brown') { echo 'selected'; } ?>>Brown</option>
      <option <? if($row[hair] == 'Black') { echo 'selected'; } ?>>Black</option>
      <option <? if($row[hair] == 'Grey') { echo 'selected'; } ?>>Grey</option>
      <option <? if($row[hair] == 'White') { echo 'selected'; } ?>>White</option>
      <option <? if($row[hair] == 'Auburn') { echo 'selected'; } ?>>Auburn</option>
    </select>
    </td>
  </tr>
  <tr>
    <td height="25" class="style4">Eye Color</td>
    <td height="25" align="left" class="style4"><select name="eyes" id="select2">
      <option value=''>-Select-</option>
      <option  <? if($row[eyes] == 'Amber') { echo 'selected'; } ?>>Amber</option>
      <option <? if($row[eyes] == 'Black') { echo 'selected'; } ?>>Black</option>
      <option <? if($row[eyes] == 'Blue') { echo 'selected'; } ?>>Blue</option>
      <option <? if($row[eyes] == 'Brown') { echo 'selected'; } ?>>Brown</option>
      <option <? if($row[eyes] == 'Grey') { echo 'selected'; } ?>>Grey</option>
      <option <? if($row[eyes] == 'Green') { echo 'selected'; } ?>>Green</option>
      <option <? if($row[eyes] == 'Hazel') { echo 'selected'; } ?>>Hazel</option>
      <option <? if($row[eyes] == 'Violet') { echo 'selected'; } ?>>Violet</option>
    </select></td>
  </tr>
  <tr>
    <td height="25" class="style4">Ethnicity</td>
    <td height="25" align="left" class="style4"><select name="ethnicity" id="select3">
      <option value=''>-Select-</option>
      <option <? if($row[ethnicity] == 'White') { echo 'selected'; } ?>>White</option>
      <option <? if($row[ethnicity] == 'Black') { echo 'selected'; } ?>>Black</option>
      <option <? if($row[ethnicity] == 'Asian') { echo 'selected'; } ?>>Asian</option>
      <option <? if($row[ethnicity] == 'Latino') { echo 'selected'; } ?>>Latino</option>
      <option <? if($row[ethnicity] == 'East-Indian') { echo 'selected'; } ?>>East-Indian</option>
      <option <? if($row[ethnicity] == 'Native') { echo 'selected'; } ?>>Native</option>
      <option <? if($row[ethnicity] == 'Islander') { echo 'selected'; } ?>>Islander</option>
      <option <? if($row[ethnicity] == 'Other') { echo 'selected'; } ?>>Other</option>
    </select></td>
  </tr>
  <tr>
    <td height="25" class="style4">Official Site Name</td>
    <td height="25" align="left" class="style4"><input name="official_site_name" type="text" class="style4" id="url6" size="35" maxlength="255" value="<? echo $row[official_site_name]; ?>" /></td>
  </tr>
  <tr>
    <td height="25" class="style4">Official Site URL</td>
    <td height="25" align="left" class="style4"><input name="official_site_url" type="text" class="style4" id="url7" size="35" maxlength="255" value="<? echo $row[official_site_url]; ?>"  /></td>
  </tr>
  <tr>
    <td height="25" class="style4">Biography</td>
    <td height="25" align="left" class="style4"><textarea name="biography" cols="60" rows="5"><? echo $row[biography]; ?></textarea></td>
  </tr>
  <tr>
    <td height="25" class="style4">Views</td>
    <td height="25" align="left" class="style4"><input name="views" type="text" class="style4" id="url8" size="35" maxlength="255" value="<? echo $row[views]; ?>"  /></td>
  </tr>
  <?
foreach($custom_pornstar_fields as $k=>$v) {
?>
<tr>
      <td><? echo $k; ?></td>
      <td>
      <? if(is_array($v)) { ?>
      <select name="custom[<? echo $k; ?>]">
      		<? foreach($v as $i) { 
				if($custom[$k] == $i) { $selected = 'selected'; } else { $selected = ''; }
			?>
            <option <? echo $selected; ?>><? echo $i; ?></option>
            <? } ?>
      </select>
      <? } else { ?>
      <input type="text" name="custom[<? echo $k; ?>]" id="textfield" value='<? echo htmlentities($custom[$k]); ?>' />
      <? } ?>
      </td>
    </tr>
<? } ?>
  <tr>
    <td height="25" class="style4">Thumb</td>
    <td height="25" align="left" class="style4"><input type="file" name="thumb" id="fileField" /></td>
  </tr>
  <tr>
    <td height="25" colspan="2" align="center" class="style4"><input type="submit" name="Submit2" value="Save" /></td>
  </tr>
</table>
</form>
            </div>
        </div>
        <div id="right_bottom"></div>
        </div>
    </div>
</div>


      
     
        
<? require "footer.php"; ?>