function files()
 {
     global $HTTP_GET_VARS, $HTTP_POST_VARS;
     $this->chid = $HTTP_GET_VARS["chid"];
     $this->name = $HTTP_GET_VARS["name"];
     $this->names = $HTTP_GET_VARS["names"];
     $this->from = $HTTP_GET_VARS["from"];
     $this->to = $HTTP_POST_VARS["to"];
     $this->dir = preg_replace("'(\\/\\.\\.)+|(\\.\\.\\/)+|(\\.\\.)+|/\$'is", "", urldecode($HTTP_GET_VARS["dir"]));
     $this->global_dir = admin::getDocumentRoot() . $this->root . $this->dir;
 }
Exemple #2
0
function print_copy_link($path, $name)
{
    global $server_path, $HTTP_SERVER_VARS;
    $imgsize = GetImageSize(urldecode($path));
    $width = $imgsize[0];
    $height = $imgsize[1];
    $path = ereg_replace("/+", "/", $path);
    $path = ereg_replace(admin::getDocumentRoot(), "", $path);
    //$name=ereg_replace("\....$","",$name); // remove the extension in the name
    //$name=ucfirst(ereg_replace("_"," ",$name)); // replace underscores by spaces and capitalize
    $str .= "<a href=\"#\" onClick=\"top.document.frmLinkPick.LinkUrl.value='{$path}'; return false;\">{$name}</a>";
    return $str;
}
Exemple #3
0
function print_copy_link($path, $name)
{
    global $server_path, $HTTP_SERVER_VARS;
    $imgsize = GetImageSize(urldecode($path));
    $width = $imgsize[0];
    $height = $imgsize[1];
    $path = ereg_replace("/+", "/", $path);
    $path = ereg_replace(admin::getDocumentRoot(), "http://" . $HTTP_SERVER_VARS["HTTP_HOST"] . "", $path);
    //$name=ereg_replace("\....$","",$name); // remove the extension in the name
    //$name=ucfirst(ereg_replace("_"," ",$name)); // replace underscores by spaces and capitalize
    $str .= "<a href=\"#\" onClick=\"top.document.forms[0].elements['ImgUrl'].value='{$path}';";
    $str .= "top.document.forms[0].elements['ImgWidth'].value={$width};";
    $str .= "top.document.forms[0].elements['ImgHeight'].value={$height};";
    $str .= "top.document.PREVIEWPIC.src='{$path}'; return false;\">{$name}</a>";
    return $str;
}
 function template($name, &$ref)
 {
     $file = admin::getDocumentRoot() . "/adm/templates/" . trim($name) . ".php";
     if (file_exists($file)) {
         ob_start();
         include $file;
         $template = ob_get_contents();
         ob_end_clean();
     } else {
         $template = $admin_config["show_warnings"] ? addslashes(page::showWarnings("<b>" . trim($name) . ".php</b> - Template is missing!")) : "";
     }
     return $template;
 }