| Server IP : 27.254.152.13 / Your IP : 216.73.217.38 Web Server : Apache/2 System : Linux ns1-252017.dragonhispeed.com 5.2.0 #1 SMP Fri Mar 29 22:50:14 MSK 2024 x86_64 User : coloflew ( 1072) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/coloflew/domains/tessabalpatiu.go.th/private_html/administrator/modules/content/ |
Upload File : |
<?PHP
$res = 0;
$linkurl = "index.php?name=content";
if(@$_GET['act']=="add"){
$arrData = array();
$lang = $db->getAll("language","*","","","");
if($lang){
foreach($lang as $key => $value ){
$arrData['content_id'] = "0";
$arrData['content_title'] = @$_POST['content_title'];
$arrData['content_keywords'] = @$_POST['content_keywords'];
$arrData['content_description'] = @$_POST['content_description'];
$arrData['lang_code'] = @$value['lang_code'];
foreach($arrData as $k => $v ){
$arrData[$k] = str_replace("'", "\'", $v);
}
$db->insertData("content",$arrData,"");
}
}
$msg = $lang_set['txtSaveComplete'];
$res = 1;
}elseif(@$_GET['act']=="editdata"){
$arrData = array();
$arrData['content_title'] = @$_POST['content_title'];
$arrData['content_keywords'] = @$_POST['content_keywords'];
$arrData['content_description'] = @$_POST['content_description'];
foreach($arrData as $k => $v ){
$arrData[$k] = str_replace("'", "\'", $v);
}
$db->updateData("content",$arrData,"content_id = 0 and lang_code='".$lang_code."'");
$msg = $lang_set['txtEditComplete'];
$res = 1;
}
$arrRes = $db->getOne("content","*","content_id = 0 and lang_code='".$lang_code."'");
?>
<div class="content-box"><!-- Start Content Box -->
<div class="content-box-header">
<h3><?php echo $lang_set['content_titlemenu']; ?></h3>
<div class="clear"></div>
</div> <!-- End .content-box-header -->
<div class="content-box-content">
<div class="tab-content <?php echo ($_GET['act']!="edit" ? "default-tab" : "" );?>" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
<?php if($res==1){?>
<div class="notification success png_bg">
<a href="#" class="close"><img src="images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
<div>
<?php echo $msg;?>
</div>
</div>
<meta http-equiv="refresh" content="0;URL=<?php echo $linkurl;?>">
<?php }?>
<form action="<?php echo $linkurl;?>&act=<?PHP echo (isset($arrRes)) ? "editdata": "add"?>" method="post">
<p>
<label><?php echo $lang_set['content_title']; ?>:</label>
<input type="text" class="text-input medium-input" name="content_title" id="content_title" value="<?php echo @$arrRes['content_title'];?>"></input>
</p>
<p>
<label><?php echo $lang_set['content_keywords']; ?>:</label>
<textarea type="text" class="text-input large-input" name="content_keywords" id="content_keywords"><?php echo @$arrRes['content_keywords'];?></textarea>
</p>
<p>
<label><?php echo $lang_set['content_description']; ?>:</label>
<textarea type="text" class="text-input large-input" name="content_description" id="content_description"><?php echo @$arrRes['content_description'];?></textarea>
</p>
<hr />
<p>
<input type="submit" class="button" value="<?php echo $lang_set['submit']; ?>" />
</p>
</form>
</div> <!-- End #tab1 -->
</div> <!-- End .content-box-content -->
</div>