예제 #1
0
function nyxInVerifyPassword($gallery_id, $password)
{
    global $nyxIn;
    if ($gallery_id == 0) {
        return true;
    } else {
        $nyxIn_Query_SelectMetadataFrom_gallery = $nyxIn['db']->query("SELECT * FROM " . $nyxIn['db_prefix'] . "galleries WHERE id=" . $gallery_id . " AND deleted_status='0'") or die($nyxIn['db']->error);
        $nyxIn_Obj_gallery = $nyxIn_Query_SelectMetadataFrom_gallery->fetch_object();
        $nyxIn_Var_gallery_id = $nyxIn_Obj_gallery->id;
        $nyxIn_Var_gallery_parent_id = $nyxIn_Obj_gallery->parent_id;
        $nyxIn_Var_gallery_locked_status = $nyxIn_Obj_gallery->locked_status;
        $nyxIn_Var_gallery_password = $nyxIn_Obj_gallery->password;
        if ($nyxIn_Var_gallery_locked_status == 0) {
            nyxInVerifyPassword($nyxIn_Var_gallery_parent_id, $password);
        } else {
            if ($password == $nyxIn_Var_gallery_password) {
                return true;
            } else {
                return false;
            }
        }
    }
}
예제 #2
0
파일: i.php 프로젝트: nine7ySix/nyxIn
$nyxIn_Var_images_upload_timestamp = $nyxIn_Obj_images->upload_timestamp;
$nyxIn_Var_images_views = $nyxIn_Obj_images->views;
$nyxIn_Var_images_safename = $nyxIn_Obj_images->safename . "." . $nyxIn_Obj_images->fileextension;
$nyxIn_Var_images_filename = $nyxIn_Obj_images->filesize;
$nyxIn_Var_images_name = $nyxIn_Obj_images->name;
$nyxIn_Var_images_description = $nyxIn_Obj_images->description;
$nyxIn_Query_SelectMetadataFrom_galleries = $nyxIn['db']->query("SELECT * FROM " . $nyxIn['db_prefix'] . "galleries WHERE id=" . $nyxIn_Var_images_gallery_id . " AND deleted_status='0'") or die($nyxIn['db']->error);
$nyxIn_Obj_galleries = $nyxIn_Query_SelectMetadataFrom_galleries->fetch_object();
$nyxIn_Var_galleries_locked_status = $nyxIn_Obj_galleries->locked_status;
if ($nyxIn_Var_galleries_locked_status == 1) {
    if (isset($_POST['password'])) {
        $nyxIn_Frm_gallery_password = $_POST['password'];
    } else {
        $nyxIn_Frm_gallery_password = 0;
    }
    if (nyxInVerifyPassword($nyxIn_Var_images_gallery_id, $nyxIn_Frm_gallery_password) == true) {
        $nyxIn_Var_has_access_to_gallery = 1;
    } else {
        $nyxIn_Var_has_access_to_gallery = 0;
    }
} else {
    $nyxIn_Var_has_access_to_gallery = 1;
}
if ($nyxIn_Var_has_access_to_gallery == 1) {
    ?>
		<p>Quick Navigate: <?php 
    nyxInGetGalleriesSelectBox("nyxIn-gallery_quickswitch", 0, 0, 1, $nyxIn_Var_images_gallery_id, 0);
    ?>
</p>
		<?php 
    nyxInFormatTitle($nyxIn_Var_images_gallery_id, 1);