Exemple #1
0
function Del_Albumtype($moduleid)
{
    $album_result = Query_Album($moduleid);
    $album_num = Query_AlbumNum($album_result);
    for ($i1 = 0; $i1 < $album_num; $i1++) {
        $album_array = Query_AlbumArray($album_result);
        $album_array_id = $album_array['ids'];
        $photo_result = getPhotoResultByAlbumID($album_array_id);
        $photo_num = getPhotoNumByAlbumID($photo_result);
        for ($i2 = 0; $i2 < $photo_num; $i2++) {
            $photo_array = getPhotoArrayByAlbumID($photo_result);
            $photo_pathnew = "../" . $photo_array['photo_path'];
            $photo_thumbnailnew = "../" . $photo_array['photo_thumbnail'];
            $photoid = $photo_array['ids'];
            if (delPhoto($photoid) == true) {
                delFileo($photo_thumbnailnew);
                delFileo($photo_pathnew);
            }
        }
        delAlbumByAlbumID($album_array_id);
    }
    if (delAlbumTypeByID($moduleid) == true) {
        $info = "相册分类删除成功";
    } else {
        $info = "由于网络原因,操作失败,请稍后重试...";
    }
    return $info;
}
Exemple #2
0
        $login_style_ised = str_replace(" ", "", $_POST['login_style_ised']);
        $bgids = addloginstyletodb($login_style, $paths, $login_style_ised);
        if ($bgids == 0) {
            $info = "设置失败,请稍后重试...";
        } else {
            $info = "设置成功";
        }
    }
    echo "<html>\n\t\t<head>\n\t\t<script charset='utf-8' src='../../js/jquery-1.6.min.js'></script>\n\t\t<script src='../../plugins/layer/lib.js'></script>\n\t\t<script src='../../plugins/layer/layer.min.js'></script>\n\t\t<script src='../../plugins/layer/laycode.min.js'></script>\n\t\t<script src='../../js/gl_user/gl_user.js'></script>\n\t\t</head>\n\t\t<body>";
    echo "<meta http-equiv='content-type' content='application/xhtml;charset=gb2312' />\n\t\t\t<script>\n\t\t\tvar ii1 = layer.load('" . $info . "');\n    \t\tsetTimeout(function(){\n        \t\tlocation.href='" . $url . ".php';\n    \t\t}, 1000);\n\t\t\t</script>";
    echo "</body></html>";
} else {
    if ($types == "delloginstyle") {
        if (delloginstyle($loginstyleid) == true) {
            $style_path1 = "../../" . $style_path;
            delFileo($style_path1);
            $info = "登陆界面样式删除成功";
        } else {
            $info = "由于网络原因,登陆样式删除失败,请稍后重试...";
        }
        echo "<html>\n\t\t<head>\n\t\t<script charset='utf-8' src='../../js/jquery-1.6.min.js'></script>\n\t\t<script src='../../plugins/layer/lib.js'></script>\n\t\t<script src='../../plugins/layer/layer.min.js'></script>\n\t\t<script src='../../plugins/layer/laycode.min.js'></script>\n\t\t<script src='../../js/gl_user/gl_user.js'></script>\n\t\t</head>\n\t\t<body>";
        echo "<meta http-equiv='content-type' content='application/xhtml;charset=gb2312' />\n\t\t\t<script>\n\t\t\tvar ii1 = layer.load('" . $info . "');\n    \t\tsetTimeout(function(){\n        \t\tlocation.href='" . $url . ".php';\n    \t\t}, 1000);\n\t\t\t</script>";
        echo "</body></html>";
    } else {
        if ($types == "setdefaultloginstyle") {
            if (setdefaultloginstyle($loginstyleid) == true) {
                $info = "登陆界面默认样式设置成功";
            } else {
                $info = "由于网络原因,登陆默认样式设置失败,请稍后重试...";
            }
            echo "<html>\n\t\t<head>\n\t\t<script charset='utf-8' src='../../js/jquery-1.6.min.js'></script>\n\t\t<script src='../../plugins/layer/lib.js'></script>\n\t\t<script src='../../plugins/layer/layer.min.js'></script>\n\t\t<script src='../../plugins/layer/laycode.min.js'></script>\n\t\t<script src='../../js/gl_user/gl_user.js'></script>\n\t\t</head>\n\t\t<body>";
Exemple #3
0
        $paths = substr($path, 6) . "/" . $filename;
        $bgids = addloginbgtodb($filename, $paths);
        if ($bgids == 0) {
            $info = "上传失败,请稍后重试...";
        } else {
            $info = "上传成功";
        }
    }
    echo "<html>\n\t\t<head>\n\t\t<script charset='utf-8' src='../../js/jquery-1.6.min.js'></script>\n\t\t<script src='../../plugins/layer/lib.js'></script>\n\t\t<script src='../../plugins/layer/layer.min.js'></script>\n\t\t<script src='../../plugins/layer/laycode.min.js'></script>\n\t\t<script src='../../js/gl_user/gl_user.js'></script>\n\t\t</head>\n\t\t<body>";
    echo "<meta http-equiv='content-type' content='application/xhtml;charset=gb2312' />\n\t\t\t<script>\n\t\t\tvar ii1 = layer.load('" . $info . "');\n    \t\tsetTimeout(function(){\n        \t\tlocation.href='" . $url . ".php';\n    \t\t}, 1000);\n\t\t\t</script>";
    echo "</body></html>";
} else {
    if ($types == "delloginbg") {
        if (delloginbg($loginbgid) == true) {
            $bg_path1 = "../../" . $bg_path;
            delFileo($bg_path1);
            $info = "墙纸删除成功";
        } else {
            $info = "由于网络原因,墙纸删除失败,请稍后重试...";
        }
        echo "<html>\n\t\t<head>\n\t\t<script charset='utf-8' src='../../js/jquery-1.6.min.js'></script>\n\t\t<script src='../../plugins/layer/lib.js'></script>\n\t\t<script src='../../plugins/layer/layer.min.js'></script>\n\t\t<script src='../../plugins/layer/laycode.min.js'></script>\n\t\t<script src='../../js/gl_user/gl_user.js'></script>\n\t\t</head>\n\t\t<body>";
        echo "<meta http-equiv='content-type' content='application/xhtml;charset=gb2312' />\n\t\t\t<script>\n\t\t\tvar ii1 = layer.load('" . $info . "');\n    \t\tsetTimeout(function(){\n        \t\tlocation.href='" . $url . ".php';\n    \t\t}, 1000);\n\t\t\t</script>";
        echo "</body></html>";
    }
}
//echo substr("../../images/bg", 6);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
Exemple #4
0
    $photo_thumbnail = "../plugins/upload/server/php/files/thumbnail/" . $photo_name[$i];
    $date = date("Ymdhis", time());
    $newvar = $date . $blog_userid;
    $unique = getUniqidNamec();
    $ext1 = getExtc($photo_path);
    $ext2 = getExtc($photo_thumbnail);
    $newname1 = $newvar . "_" . $unique . "." . $ext1;
    $newname2 = $newvar . "_" . $unique . "." . $ext2;
    $photo_pathtoc = "../plugins/upload/server/php/files/" . $newvar . "_" . $unique . "." . $ext1;
    $photo_thumbnailtoc = "../plugins/upload/server/php/files/thumbnail/" . $newvar . "_" . $unique . "." . $ext2;
    $rename1 = renameFileo($photo_path, $newname1);
    $rename2 = renameFileo($photo_thumbnail, $newname2);
    copyFileo($photo_pathtoc, "upload");
    copyFileo($photo_thumbnailtoc, "upload/thumbnail");
    delFileo($photo_pathtoc);
    delFileo($photo_thumbnailtoc);
    $photo_pathnew = "upload/" . $newname1;
    $photo_thumbnailnew = "upload/thumbnail/" . $newname2;
    $sql = "insert into blog_photo(photo_name,photo_createdate,photo_path,photo_author,photo_album,photo_thumbnail) \n\t\t\tvalues('{$photo_name[$i]}','{$photo_createdate}','{$photo_pathnew}','{$blog_userid}','{$photo_album}','{$photo_thumbnailnew}')";
    $insert_photo = $public_function->getresult($sql);
}
//$info="";
echo "<html>\n\t<head>\n\t<script charset='utf-8' src='../js/jquery-1.6.min.js'></script>\n\t<script src='../plugins/layer/lib.js'></script>\n\t<script src='../plugins/layer/layer.min.js'></script>\n\t<script src='../plugins/layer/laycode.min.js'></script>\n\t<script src='../js/gl_user/gl_user.js'></script>\n\t</head>\n\t<body>";
if ($insert_photo > 0) {
    //$info="usuccess";
    echo "<meta http-equiv='content-type' content='application/xhtml;charset=gb2312' />\n\t\t\t<script>\n\t\t\tvar ii1 = layer.load('上传成功');\n    \t\tsetTimeout(function(){\n        \t\tparent.location.href='" . $url . ".php?albumid=" . $photo_album . "&page=" . $page . "';\n    \t\t}, 500);\n\t\t\t</script>";
} else {
    //$info="ufail";
    echo "<meta http-equiv='content-type' content='application/xhtml;charset=gb2312' />\n\t\t\t<script>\n\t\t\tvar ii1 = layer.load('上传失败,请稍后重试...');\n    \t\tsetTimeout(function(){\n        \t\tparent.location.href='" . $url . ".php?albumid=" . $photo_album . "&page=" . $page . "';\n    \t\t}, 500);\n\t\t\t</script>";
}
echo "</body></html>";
Exemple #5
0
$album_name = "默认相册";
//获取当前用户的默认相册
$sql = "select ids,album_name,album_author from blog_album where album_author='{$blog_userid}' and album_name='{$album_name}'";
$moren_array = $public_function->getarray($public_function->getresult($sql));
$moren_albumid = $moren_array['ids'];
for ($i = 0; $i < count($albumids1); $i++) {
    $photo_result = getPhotoResultByAlbumID($albumids1[$i]);
    $photo_num = getPhotoNumByAlbumID($photo_result);
    for ($i2 = 0; $i2 < $photo_num; $i2++) {
        $photo_array = getPhotoArrayByAlbumID($photo_result);
        $photo_pathnew = "../" . $photo_array['photo_path'];
        $photo_thumbnailnew = "../" . $photo_array['photo_thumbnail'];
        $photoid = $photo_array['ids'];
        if (delPhoto($photoid) == true) {
            delFileo($photo_thumbnailnew);
            delFileo($photo_pathnew);
        }
    }
    $boolean = delAlbumByAlbumID($albumids1[$i]);
}
$info = "";
if ($boolean == true) {
    $info = "相册删除成功";
} else {
    $info = "相册删除失败";
}
returnpage($page, $info, $cnt, $albumids1, $yeshu, $url);
function returnpage($page, $info, $cnt, $albumids1, $yeshu, $url)
{
    echo "<html>\n\t\t<head>\n\t\t<script charset='utf-8' src='../../js/jquery-1.6.min.js'></script>\n\t\t<script src='../../plugins/layer/lib.js'></script>\n\t\t<script src='../../plugins/layer/layer.min.js'></script>\n\t\t<script src='../../plugins/layer/laycode.min.js'></script>\n\t\t<script src='../../js/gl_user/gl_user.js'></script>\n\t\t</head>\n\t\t<body>";
    if ($page == 1) {
Exemple #6
0
$photoids = $_GET['photoids'];
$photoids = explode(",", $photoids);
$url = str_replace(" ", "", $_GET['url']);
$page = str_replace(" ", "", $_GET['page']);
$countp = 0;
for ($i = 0; $i < count($photoids); $i++) {
    $countp++;
    $sql = "select ids,photo_path,photo_thumbnail from blog_photo where ids='{$photoids[$i]}'";
    $result = $public_function->getresult($sql);
    $array = $public_function->getarray($result);
    $photo_pathnew = "../" . $array['photo_path'];
    $photo_thumbnailnew = "../" . $array['photo_thumbnail'];
    $del_sql = "delete from blog_photo where ids='{$photoids[$i]}'";
    $del_result = $public_function->getresult($del_sql);
    delFileo($photo_pathnew);
    delFileo($photo_thumbnailnew);
}
$info = "";
if ($del_result > 0) {
    $info = "³É¹¦É¾³ý" . $countp . "ÕÅͼƬ";
} else {
    $info = "ͼƬɾ³ýʧ°Ü";
}
returnpage($page, $info, $cnt, $photoids, $yeshu, $albumid, $url);
function returnpage($page, $info, $cnt, $photoids, $yeshu, $albumid, $url)
{
    echo "<html>\n\t\t<head>\n\t\t<script charset='utf-8' src='../../js/jquery-1.6.min.js'></script>\n\t\t<script src='../../plugins/layer/lib.js'></script>\n\t\t<script src='../../plugins/layer/layer.min.js'></script>\n\t\t<script src='../../plugins/layer/laycode.min.js'></script>\n\t\t<script src='../../js/gl_user/gl_user.js'></script>\n\t\t</head>\n\t\t<body>";
    if ($page == 1) {
        echo "<meta http-equiv='content-type' content='application/xhtml;charset=gb2312' />\n\t\t\t<script>\n\t\t\tvar ii1 = layer.load('" . $info . "');\n    \t\tsetTimeout(function(){\n        \t\tlocation.href='../" . $url . ".php?page=1&albumid=" . $albumid . "';\n    \t\t}, 1000);\n\t\t\t</script>";
    } else {
        if ($page != 1 && $page == $yeshu) {