代码拉取完成,页面将自动刷新
<?php
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
if(isset($_SESSION['user_id']) && $_SESSION['user_id'] > 0){
$filename120 = "data/images_user/" . $_SESSION['user_id'] . "_120.jpg";
$filename48 = "data/images_user/" . $_SESSION['user_id'] . "_48.jpg";
$filename24 = "data/images_user/" . $_SESSION['user_id'] . "_24.jpg";
$somecontent1 = base64_decode($_POST['png1']);
$somecontent2 = base64_decode($_POST['png2']);
$somecontent3 = base64_decode($_POST['png3']);
get_oss_add_file(array($filename120, $filename48, $filename24));
$parent['user_picture'] = $filename120;
$GLOBALS['db']->autoExecute($GLOBALS['ecs']->table('users'), $parent, 'UPDATE', "user_id = '" .$_SESSION['user_id']. "'");
if ($handle = fopen($filename120, "w+")) {
if (!fwrite($handle, $somecontent1) == FALSE) {
fclose($handle);
}
}
if ($handle = fopen($filename48, "w+")) {
if (!fwrite($handle, $somecontent2) == FALSE) {
fclose($handle);
}
}
if ($handle = fopen($filename24, "w+")) {
if (!fwrite($handle, $somecontent3) == FALSE) {
fclose($handle);
}
}
echo "success=".$_LANG['upload_success'];
}else{
echo "success=".$_LANG['upload_fail'];
}
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。