Файловый менеджер - Редактировать - /home/umudio/public_html/OLD/uploadnewslet.php
Назад
<?php if (isset($_POST["addnewsletter"])) { $input_name="uploader"; $path="newslet/temp"; $final="newslet"; $photo=""; $newfilename=1; $handle=@opendir($final); if(!empty($handle)){ while(false!==($file=readdir($handle))){ if(is_file($final . "/" . $file)){ $newfilename++; } } } //closedir($handle); //global $_FILES; if(isset($_FILES)){ if(is_uploaded_file($_FILES[$input_name]["tmp_name"])){ $file_name=$_FILES[$input_name]["name"]; //$ext=(substr($file_name,(strlen($file_name)-3))); $ext_wit_dot = strrchr($file_name,"."); $ext=substr($ext_wit_dot,1); $new=$path . "/g" . $newfilename . "." . $ext; if ($ext!="exe" || $ext!="dmg"){ move_uploaded_file($_FILES[$input_name]["tmp_name"],$path . "/" . $file_name); rename ($path . "/" . $file_name, $new); copy ($new, $final . "/g" . $newfilename . "." . $ext); unlink ($new); $doc="newslet/g" . $newfilename . "." . $ext; if($_POST['titler']!='' && $doc!=""){ $titler=$_POST['titler']; $new_string=urlencode ($titler); $new_string=ereg_replace("%0D", "<br>", $new_string); $new_string=ereg_replace("%22", """, $new_string); $new_string=ereg_replace("%27", "'", $new_string); $titler=urldecode ($new_string); $dater=date('Y-m-d'); $archived="No"; $sql="insert into newsletters (titler, specs, archived, dater) VALUES ('$titler', '$doc', '$archived', '$dater')"; if (mysql_query($sql)){ $bb="<p>Newsletter Successfully added</p>"; } else { $bb="<p>Unable to create your record: " . mysql_error() . "</p>"; } } } } } } if(isset($_POST['editnewsletter'])){ $titler=$_POST['titler']; $new_string=urlencode ($titler); $new_string=ereg_replace("%0D", "<br>", $new_string); $new_string=ereg_replace("%22", """, $new_string); $new_string=ereg_replace("%27", "'", $new_string); $titler=urldecode ($new_string); $id=$_POST['sn']; $sql="update newsletters set titler='$titler' where sn=$id"; if (mysql_query($sql)){ $bb="<p>Record Successfully Edited</p>"; } else { $bb="<p>Unable to edit your record: " . mysql_error() . "</p>"; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 5.6.40 | Генерация страницы: 0.02 |
proxy
|
phpinfo
|
Настройка