Server IP : 127.0.0.2 / Your IP : 13.58.215.45 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/admin/ |
Upload File : |
<?php ob_start(); session_start(); require_once('session-check.php'); require_once('include/db-config.php'); $title=mysqli_real_escape_string($conn,stripslashes($_POST['title'])); $articletype = $_POST['articletype']; $searchkey=$_POST['searchkey']; $summary=mysqli_real_escape_string($conn,$_POST['summary']); $content = ""; $fileorurl = ""; if($articletype == "url") { $fileorurl=$_POST['fileorurl']; } elseif($articletype == "docs") { $target_path = "../news-articles/"; $target_path = $target_path . basename($_FILES["file1"]['name']); $fileorurl = ""; if(move_uploaded_file($_FILES["file1"]['tmp_name'], $target_path)) { $fileorurl = $_FILES["file1"]['name']; } } elseif($articletype == "html") { $content = mysqli_real_escape_string($conn,stripslashes($_POST['content'])); $fileorurl = ""; } $embed=$_POST['embed']; $targetpage=$_POST['targetpage']; $sortorder=$_POST['sortorder']; $status=$_POST['status']; $CreatedDate=date("Y-m-d "); $EditedDate=date("Y-m-d "); if($fileorurl != "" || $articletype == "html") { $sql="update maintrainer_articles set embed_is_checked='".$embed."', ArticleTitle = '".$title."', ArticleType = '".$articletype."', FileOrUrl = '".$fileorurl."', HTMLContent = '".$content."', TargetPage = '".$targetpage."', SortOrder = ".$sortorder.", Status = ".$status.", SearchKeyword = '".$searchkey."', executive_summary = '".$summary."', EditedDate = '".$EditedDate."' where ID = ".$_POST['id']; } else { $sql="update maintrainer_articles set embed_is_checked='".$embed."', ArticleTitle = '".$title."', ArticleType = '".$articletype."', HTMLContent = '".$content."', TargetPage = '".$targetpage."', SortOrder = ".$sortorder.", Status = ".$status.",SearchKeyword = '".$searchkey."' , executive_summary = '".$summary."', EditedDate = '".$EditedDate."' where ID = ".$_POST['id']; } $result=mysqli_query($conn,$sql); $articleID = $_POST['id']; $del_qry="delete from maintrainer_articles_category_relation where article_id= ".$articleID; $del_res=mysqli_query($conn,$del_qry); if($_POST['catg'] != "") { foreach($_POST['catg'] as $key => $val) { $sql1="insert into maintrainer_articles_category_relation(art_cat_id,article_id,created_edited_date) values (".$val.",".$articleID.",'".$CreatedDate."')"; $result1=mysqli_query($conn,$sql1); } } $del_qry="delete from maintrainer_articles_site_relation where article_id= ".$articleID; $del_res=mysqli_query($conn,$del_qry); if($_POST['catgsite'] != "") { foreach($_POST['catgsite'] as $key => $val) { $sql1="insert into maintrainer_articles_site_relation(art_cat_id,article_id,created_edited_date) values (".$val.",".$articleID.",'".$CreatedDate."')"; $result1=mysqli_query($conn,$sql1); } } $url = "Location: article-convert2html.php?r=2&articleid=".$articleID; //$url = "Location: article-mgt.php?r=2"; header($url); ?>