5tarl0rd

Current Path : /home/tiporg/public_html/manage/
Upload File :
Current File : /home/tiporg/public_html/manage/update_design.php

<?php 

include("classes/access_user_class.php"); 

//include_once("texteditor/fckeditor.php");

//include_once("thumbnail.class.php");



$page_protect = new Access_user;

// $page_protect->login_page = "login.php"; 

$page_protect->access_page(); 



if (isset($_GET['action']) && $_GET['action'] == "log_out") {

	$page_protect->log_out(); // the method to log off

}



	if(isset($_REQUEST['Submit']))

	{

			/*$status = $_REQUEST['stat'];

			if($status == '1') 

			{

				 $status = 1;

			}

			else

			{

				 $status = 0;

			}	*/

			

			$status = 0;

			if ($_FILES["userfile"]["name"] == "")

		  	{

		  		$img = $_REQUEST['img'];

		  	}

			else

			{

				$target_path = "../products/";

				$target_path = $target_path.time()."_".$_FILES['userfile']['name']; 

				$img =  time()."_".$_FILES['userfile']['name']; 

				move_uploaded_file($_FILES['userfile']['tmp_name'], $target_path);

			}

			

		$string = "update tbl_design_options set type='logo',image='".$img."',status='".$status."' where id = '1'";

		mysql_query($string) or die(mysql_error());

		$message="Logo has been updated successfully";

	}

$que_select = "select * from tbl_design_options where id = '1'";

$rest_select = mysql_query($que_select);

$rww = mysql_fetch_array($rest_select);

/*if($rww['status'] == '1')

{

$checked = "checked='checked'";

}

else

{

$checked = "";

}*/





?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Design Options</title>

<link rel="stylesheet" type="text/css" href="js/calendar.css">

<script type="text/javascript" src="js/calendar.js?random=20060118"></script>

<script type="text/javascript" src="js/validator.js"></script>

<script language="javascript" type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>



<script language="javascript" type="text/javascript">

tinyMCE.init({

	mode : "textareas",

	theme : "advanced",

	plugins : "devkit,style,layer,table,save,advhr,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,simplebrowser",

       plugin_simplebrowser_width : '500', //default

       plugin_simplebrowser_height : '600', //default

       plugin_simplebrowser_browselinkurl : 'simplebrowser/browser.html?Connector=connectors/php/connector.php',

       plugin_simplebrowser_browseimageurl:'simplebrowser/browser.html?Type=Image&Connector=connectors/php/connector.php',

   plugin_simplebrowser_browseflashurl:'simplebrowser/browser.html?Type=Flash&Connector=connectors/php/connector.php',

	   

		//theme_advanced_buttons1_add_before : "save,newdocument,separator",

		theme_advanced_buttons1_add : "fontselect,fontsizeselect",

		theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",

		theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",

		theme_advanced_toolbar_location : "top",

		theme_advanced_toolbar_align : "left",

		theme_advanced_path_location : "bottom",

		content_css : "example_full.css",

		editor_deselector : "No_MCE_Editor" ,

	    plugin_insertdate_dateFormat : "%Y-%m-%d",

	    plugin_insertdate_timeFormat : "%H:%M:%S",

		extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",

		file_browser_callback : "TinyMCE_simplebrowser_browse",

		theme_advanced_resize_horizontal : false,

		theme_advanced_resizing : true,

		nonbreaking_force_tab : true,

		apply_source_formatting : true,

		template_replace_values : {

			username : "Jack Black",

			staffid : "991234"

		},

		relat2ive_urls : false,

		rem2ove_script_host : false

	

});



	function fileBrowserCallBack(field_name, url, type, win) 

	{

    var fileBrowserWindow = new Array();

    fileBrowserWindow['title'] = 'File Browser';

    fileBrowserWindow['file'] = "uploadimage.php" + "?type=" + type;

    fileBrowserWindow['width'] = '420';

    fileBrowserWindow['height'] = '400';

    tinyMCE.openWindow(fileBrowserWindow, { window : win, resizable : 'yes', inline : 'no' });

	win.document.forms[0].elements[field_name].value = id;

    return false;

     }

	



</script>

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

<style type="text/css">

<!--

.style1 {

	font-size: 10pt;

	font-weight: bold;

}

.style3 {font-size: small}

-->

</style>

</head>



<body>

 



<?php include("includes/header.php");?>



<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">



  <tr>

    <td rowspan="3" align="left" background="images/white_left_bar.gif"></td>

    <td align="center"></td>

    <td width="1%" rowspan="3" align="right" background="images/white_right_bar.gif">&nbsp;</td>

  </tr>

  <tr>

    <td>&nbsp;</td>

  </tr>

  <tr>

    <td width="99%"><table width="98%" border="0" align="center" cellpadding="2" cellspacing="2">

      <tr>

        <td width="20%" valign="top"><?php require_once("includes/left_column.php");?></td>

        <td width="80%" valign="top"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="2" bordercolor="#cccccc" class="tableBorder">

          <tr>

            <td align="center"colspan="2" bgcolor="#EFEFEF" class="boldText">Change Website Logo</td>

          </tr>

          <tr>

            <td colspan="2" align="left" valign="top" background="#F6F6F6" class="errorText">			</td>

          </tr>

          <tr>

            <td colspan="2" align="left" valign="top"><form  method="post" enctype="multipart/form-data"  name="addpages" id="addpages">

						 

						<table width="100%" border="0" align="right" cellpadding="2" cellspacing="2">

                        

                          <tr>

                            <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">

                              <tr> </tr>

                              <tr>

                                <td class="message" colspan="2"><?php if(isset($message)) { echo $message; } ?></td>

                              </tr>

                              <tr>

                                <td colspan="2" align="left" valign="middle"><span style="font-size:17px; font-weight:bold; font-family:Verdana, Arial, Helvetica, sans-serif;">Instructions:</span>:<br />

                                  <span style="font-size:15px; font-family:Verdana, Arial, Helvetica, sans-serif;">Please Upload Logo with the width: 461px and Height: 148px..<br />

                                  Please upload with the extension of .png. </span></td>

                              </tr>

                              

                              <tr>

                                <td class="mainText">&nbsp;</td>

                                <td>&nbsp;</td>

                              </tr>

                              <tr>

                                <td class="mainText">&nbsp;</td>

                                <td>&nbsp;</td>

                              </tr>

                              <tr>

                                <td class="mainText">Image : </td>

                                <td><input name="userfile" type="file" id="userfile" />

                                    <input type="hidden" id="img" name="img" value="<?php echo $rww['image'];?>" />                                </td>

                              </tr>

                              <tr>

                                <td class="mainText">&nbsp;</td>

                                <td>&nbsp;</td>

                              </tr>

                              <tr>

                                <td class="mainText">&nbsp;</td>

                                <td><img id="img" name="img" src="../products/<?php echo $rww['image']; ?>" height="78" width="261" /></td>

                              </tr>

                              <tr>

                                <td class="mainText">&nbsp;</td>

                                <td>&nbsp;</td>

                              </tr>

                              <?php /*?>  <tr>

                                <td>Display : </td>

                                <td><input name="stat" type="checkbox" id="stat" value="1" <?php echo  $checked; ?> />

								<input type="hidden" name="news_id" id="news_id" value="<?php echo $rww['id']; ?>" />								</td>

                              </tr>

                              <tr>

                                <td>&nbsp;</td>

                                <td>&nbsp;</td>

                              </tr><?php */?>

                            </table></td>

                          </tr> 

				          <tr>

                            <td colspan="2" align="center" valign="top" class="mainText">                            </td>

                          </tr>

                          <tr >

                          <td colspan="2" align="center" class="label">

						  <input type="submit" name="Submit" value="Update">						  </td>

                          </tr>

                    </table>

						</form></td>

          </tr>

        </table></td>

      </tr>

    </table>    </td>

  </tr>

  <tr>

    <td ><img src="images/white_left_bottom_corner.gif" width="9" height="9" /></td>

    <td width="99%" background="images/white_bottom_bar.gif"><img src="images/white_bottom_bar.gif" width="4" height="9" /></td>

    <td width="1%"><img src="images/white_right_bottom_corner.gif" width="9" height="9" /></td>

  </tr>

</table>

</body>

</html>


5tarL0rd By 5tarl0rd Being Anonymous