예제 #1
0
function sfpg_url_decode($string)
{
    $get = explode('*', sfpg_base64url_decode($string));
    if (md5($get[0] . '*' . $get[1] . '*' . SECURITY_PHRASE) === $get[2] and strpos($get[0] . $get[1], '/../') === FALSE) {
        return array($get[0], $get[1]);
    } else {
        return FALSE;
    }
}
예제 #2
0
파일: gallerya.php 프로젝트: jukatax/upc
            echo "fileThumb[" . $item . "] = '';\n";
        }
        echo "fileName[" . $item . "] = '" . str_to_script(sfpg_display_name($val, SHOW_FILE_EXT)) . "';\n";
        if (!file_exists(DATA_ROOT . "info/" . GALLERY . $val . ".sfpg")) {
            $fp = fopen(DATA_ROOT . "info/" . GALLERY . $val . ".sfpg", "w");
            fwrite($fp, date(DATE_FORMAT, filemtime(GALLERY_ROOT . GALLERY . $val)) . "|" . sfpg_file_size(filesize(GALLERY_ROOT . GALLERY . $val)));
            fclose($fp);
        }
        echo "fileInfo[" . $item . "] = '" . str_to_script(@file_get_contents(DATA_ROOT . "info/" . GALLERY . $val . ".sfpg") . "|" . @file_get_contents(GALLERY_ROOT . GALLERY . $val . DESC_EXT)) . "';\n\n";
        $item++;
    }
    echo "\r\n\t\t//-->\r\n\t\t</script>";
}
$get_set = FALSE;
if (isset($_GET["sfpg"])) {
    $get = explode("*", sfpg_base64url_decode($_GET["sfpg"]));
    if (md5($get[0] . "*" . $get[1] . "*" . SECURITY_PHRASE) === $get[2] and strpos($get[0] . $get[1], "..") === FALSE) {
        define("GALLERY", $get[0]);
        define("IMAGE", $get[1]);
        $get_set = TRUE;
    }
}
if (!$get_set) {
    define("GALLERY", "");
    define("IMAGE", "");
}
if (isset($_GET["cmd"])) {
    if ($_GET["cmd"] == "css") {
        header("Content-type: text/css");
        echo "\r\n\r\n\t\t\timg\r\n\t\t\t{\r\n\t\t\t\t-ms-interpolation-mode : bicubic;\r\n\t\t\t}\r\n\r\n\t\t\tbody.sfpg\r\n\t\t\t{\r\n\t\t\t\tbackground : {$color_body_back};\r\n\t\t\t\tcolor: {$color_body_text};\r\n\t\t\t\tfont-family: Arial, Helvetica, sans-serif;\r\n\t\t\t\tfont-size: " . FONT_SIZE . "px;\r\n\t\t\t\tfont-weight: normal;\r\n\t\t\t\tmargin:0px;\r\n\t\t\t\tpadding:0px;\r\n\t\t\t\toverflow:hidden;\r\n\t\t\t}\r\n\r\n\t\t\tbody.sfpg a:active, body.sfpg a:link, body.sfpg a:visited, body.sfpg a:focus\r\n\t\t\t{\r\n\t\t\t\tcolor : {$color_body_link};\r\n\t\t\t\ttext-decoration : none;\r\n\t\t\t}\r\n\r\n\t\t\tbody.sfpg a:hover\r\n\t\t\t{\r\n\t\t\t\tcolor : {$color_body_hover};\r\n\t\t\t\ttext-decoration : none;\r\n\t\t\t}\r\n\r\n\t\t\ttable\r\n\t\t\t{\r\n\t\t\t\tfont-size: " . FONT_SIZE . "px;\r\n\t\t\t\theight:100%;\r\n\t\t\t\twidth:100%;\r\n\t\t\t}\r\n\r\n\t\t\ttable.info td\r\n\t\t\t{\r\n\t\t\t\tpadding : 10px;\r\n\t\t\t\tvertical-align : top;\r\n\t\t\t}\r\n\r\n\t\t\ttable.sfpg_disp\r\n\t\t\t{\r\n\t\t\t\ttext-align : center;\r\n\t\t\t\tpadding : 0px;\r\n\t\t\t}\r\n\r\n\t\t\ttable.sfpg_disp td.menu\r\n\t\t\t{\r\n\t\t\t\tbackground : #000000;\r\n\t\t\t\tborder-top : 1px solid #303030;\r\n\t\t\t\tvertical-align : middle;\r\n\t\t\t\twhite-space: nowrap;\r\n\t\t\t}\r\n\r\n\t\t\ttable.sfpg_disp td.navi\r\n\t\t\t{\r\n\t\t\t\theight: " . NAV_BAR_HEIGHT . "px;\r\n\t\t\t\tbackground : #202020;\r\n\t\t\t\tborder-top : 1px solid #303030;\r\n\t\t\t\tvertical-align : middle;\r\n\t\t\t\twhite-space: nowrap;\r\n\t\t\t}\r\n\r\n\t\t\ttable.sfpg_disp td.mid\r\n\t\t\t{\r\n\t\t\t\tvertical-align : middle;\r\n\t\t\t}\r\n\r\n\t\t\t.sfpg_info_text, .loading\r\n\t\t\t{\r\n\t\t\t\tbackground : #000000;\r\n\t\t\t\tborder : 1px solid #606060;\r\n\t\t\t\tcolor : #aaaaaa;\r\n\t\t\t\tpadding : 1px 4px 1px 4px;\r\n\t\t\t\twidth : 200px;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.loading\r\n\t\t\t{\r\n\t\t\t\tpadding : 20px 20px 20px 20px;\r\n\t\t\t\tmargin-right: auto;\r\n\t\t\t\tmargin-left: auto;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.sfpg_button, .sfpg_button_hover, .sfpg_button_on, .sfpg_button_nav, .sfpg_button_disabled\r\n\t\t\t{\r\n\t\t\t\tcursor : pointer;\r\n\t\t\t\tbackground : {$color_button_back};\r\n\t\t\t\tborder : 1px solid {$color_button_border};\r\n\t\t\t\tcolor : {$color_button_text};\r\n\t\t\t\tpadding : 0px 5px 0px 5px;\r\n\t\t\t\tmargin : 0px 5px 0px 5px;\r\n\t\t\t\twhite-space: nowrap;\r\n\t\t\t}\r\n\r\n\t\t\t.sfpg_button_hover\r\n\t\t\t{\r\n\t\t\t\tbackground : {$color_button_hover};\r\n\t\t\t\tcolor : {$color_button_hover_text};\r\n\t\t\t}\r\n\r\n\t\t\t.sfpg_button_on\r\n\t\t\t{\r\n\t\t\t\tbackground : {$color_button_on};\r\n\t\t\t\tcolor : {$color_button_text_on};\r\n\t\t\t}\r\n\r\n\t\t\t.sfpg_button_disabled\r\n\t\t\t{\r\n\t\t\t\tcursor : default;\r\n\t\t\t\tborder : 1px solid {$color_button_border_off};\r\n\t\t\t\tbackground : {$color_button_back_off};\r\n\t\t\t\tcolor : {$color_button_text_off};\r\n\t\t\t}\r\n\r\n\t\t\t.sfpg_button_nav\r\n\t\t\t{\r\n\t\t\t\tborder : 1px solid #404040;\r\n\t\t\t\tbackground:#101010;\r\n\t\t\t\tcolor:#808080;\r\n\t\t\t}\r\n\r\n\t\t\t.thumbbox\r\n\t\t\t{\r\n\t\t\t\tvertical-align : top;\r\n\t\t\t\tdisplay:-moz-inline-stack;\r\n\t\t\t\tdisplay:inline-block;\r\n\t\t\t\tzoom:1;\r\n\t\t\t\t*display:inline;\r\n\t\t\t\twidth: " . (2 * (THUMB_BORDER_WIDTH + THUMB_MARGIN + THUMB_BOX_MARGIN) + THUMB_MAX_WIDTH + 2) . "px;\r\n\t\t\t\theight: " . (2 * (THUMB_BORDER_WIDTH + THUMB_MARGIN + THUMB_BOX_MARGIN) + THUMB_MAX_HEIGHT + 2 + THUMB_BOX_EXTRA_HEIGHT) . "px;\r\n\t\t\t\tmargin: 0px;\r\n\t\t\t\tpadding: 0px;\r\n\t\t\t}\r\n\r\n\t\t\t.thumbimgbox\r\n\t\t\t{\r\n\t\t\t\twidth: " . (2 * (THUMB_BORDER_WIDTH + THUMB_MARGIN) + THUMB_MAX_WIDTH) . "px;\r\n\t\t\t\theight: " . (THUMB_BORDER_WIDTH * 2 + THUMB_MARGIN + THUMB_MAX_HEIGHT + 6) . "px;\r\n\t\t\t\tmargin: 0px; \r\n\t\t\t\tpadding: 0px;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t.innerboxdir, .innerboximg, .innerboxfile, .innerboxdir_hover, .innerboximg_hover, .innerboxfile_hover\r\n\t\t\t{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tmargin: " . THUMB_BOX_MARGIN . "px;\r\n\t\t\t\tpadding: 0px;\r\n\t\t\t\twidth: " . (2 * (THUMB_BORDER_WIDTH + THUMB_MARGIN) + THUMB_MAX_WIDTH + 2) . "px;\r\n\t\t\t\theight: " . (2 * (THUMB_BORDER_WIDTH + THUMB_MARGIN) + THUMB_MAX_HEIGHT + 2 + THUMB_BOX_EXTRA_HEIGHT) . "px;\r\n\t\t\t}\r\n\r\n\t\t\t.innerboxdir, .innerboxdir_hover\r\n\t\t\t{\r\n\t\t\t\tborder: 1px solid {$color_dir_box_border};\r\n\t\t\t\tbackground : {$color_dir_box_back};\r\n\t\t\t\tcolor : {$color_dir_box_text};\r\n\t\t\t}\r\n\r\n\t\t\t.innerboximg, .innerboximg_hover\r\n\t\t\t{\r\n\t\t\t\tborder: 1px solid {$color_img_box_border};\r\n\t\t\t\tbackground : {$color_img_box_back};\r\n\t\t\t\tcolor : {$color_img_box_text};\r\n\t\t\t}\r\n\r\n\t\t\t.innerboxfile, .innerboxfile_hover\r\n\t\t\t{\r\n\t\t\t\tborder: 1px solid {$color_file_box_border};\r\n\t\t\t\tbackground : {$color_file_box_back};\r\n\t\t\t\tcolor : {$color_file_box_text};\r\n\t\t\t}\r\n\r\n\t\t\t.innerboxdir_hover\r\n\t\t\t{\r\n\t\t\t\tbackground : {$color_dir_hover};\r\n\t\t\t\tcolor : {$color_dir_hover_text};\r\n\t\t\t}\r\n\r\n\t\t\t.innerboximg_hover\r\n\t\t\t{\r\n\t\t\t\tbackground : {$color_img_hover};\r\n\t\t\t\tcolor : {$color_img_hover_text};\r\n\t\t\t}\r\n\r\n\t\t\t.innerboxfile_hover\r\n\t\t\t{\r\n\t\t\t\tbackground : {$color_file_hover};\r\n\t\t\t\tcolor : {$color_file_hover_text};\r\n\t\t\t}\r\n\r\n\t\t\t.full_image\r\n\t\t\t{\r\n\t\t\t\tcursor:pointer;\r\n\t\t\t\tborder : " . FULLIMG_BORDER_WIDTH . "px solid {$color_fullimg_border};\r\n\t\t\t}\r\n\r\n\t\t\t.thumb\r\n\t\t\t{\r\n\t\t\t\tmargin: " . THUMB_MARGIN . "px " . THUMB_MARGIN . "px 5px " . THUMB_MARGIN . "px;\r\n\t\t\t\tborder : " . THUMB_BORDER_WIDTH . "px solid {$color_thumb_border};\r\n\t\t\t}\r\n\r\n\t\t\t.box_image\r\n\t\t\t{\r\n\t\t\t\tposition:absolute;\r\n\t\t\t\tbottom:" . MENU_BOX_HEIGHT . "px;\r\n\t\t\t\tright:0;\r\n\t\t\t\tz-index:1020;\r\n\t\t\t\toverflow:auto;\r\n\t\t\t\tvisibility:hidden;\r\n\t\t\t\ttext-align : center;\r\n\t\t\t}\r\n\r\n\t\t\t.box_wait\r\n\t\t\t{\r\n\t\t\t\tposition:absolute;\r\n\t\t\t\tbottom:" . MENU_BOX_HEIGHT . "px;\r\n\t\t\t\tright:0;\r\n\t\t\t\tz-index:1015;\r\n\t\t\t\toverflow:auto;\r\n\t\t\t\tvisibility:hidden;\r\n\t\t\t\ttext-align : center;\r\n\t\t\t}\r\n\r\n\t\t\t.box_navi\r\n\t\t\t{\r\n\t\t\t\tposition:absolute;\r\n\t\t\t\tbottom:0;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:" . MENU_BOX_HEIGHT . "px;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\tz-index:1120;\r\n\t\t\t\toverflow:hidden;\r\n\t\t\t\ttext-align : center;\r\n\t\t\t}\r\n\r\n\t\t\t.box_info\r\n\t\t\t{\r\n\t\t\t\tposition:absolute;\r\n\t\t\t\ttop:10px;\r\n\t\t\t\tleft:10px;\r\n\t\t\t\twidth:" . INFO_BOX_WIDTH . "px;\r\n\t\t\t\tz-index:1040;\r\n\t\t\t\tvisibility:hidden;\r\n\t\t\t\toverflow:auto;\r\n\t\t\t\tborder : 1px solid #404040;\r\n\t\t\t\tbackground: #101010;\r\n\t\t\t}\r\n\r\n\t\t\t.box_overlay\r\n\t\t\t{\r\n\t\t\t\tposition:absolute;\r\n\t\t\t\tbottom:" . MENU_BOX_HEIGHT . "px;\r\n\t\t\t\tleft:0;\r\n\t\t\t\theight:100%;\r\n\t\t\t\twidth:100%;\r\n\t\t\t\tz-index:1010;\r\n\t\t\t\toverflow:hidden;\r\n\t\t\t\tvisibility:hidden;\r\n\t\t\t\tbackground:{$color_overlay};\r\n\t\t\t}\r\n\r\n\t\t\t.box_gallery\r\n\t\t\t{\r\n\t\t\t\ttext-align:center;\r\n\t\t\t\tposition:absolute;\r\n\t\t\t\ttop:0;\r\n\t\t\t\tright:0;\r\n\t\t\t\tz-index:1000;\r\n\t\t\t\toverflow:auto;\r\n\t\t\t}\r\n\t\t\t";
        exit;