• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_relative_path函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_relative_path函数的典型用法代码示例。如果您正苦于以下问题:PHP get_relative_path函数的具体用法?PHP get_relative_path怎么用?PHP get_relative_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_relative_path函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: upload

 function upload()
 {
     import("ORG.Net.Image3");
     if (!empty($_FILES)) {
         //获取文件名
         $tempFile = $_FILES['Filedata']['tmp_name'];
         //保存路径
         $targetPath = APP_PATH . 'Public/Uploads/';
         //新图片名
         $new_file_name = new_name($_FILES['Filedata']['name']);
         //图片网站路径
         $targetFile = $targetPath . $new_file_name;
         //判断是否文件夹存在
         if (!is_dir($targetPath)) {
             mkdir($targetPath, 0777, true);
         }
         //防止中文文件名乱码
         move_uploaded_file($tempFile, iconv('utf-8', 'gbk', $targetFile));
         //水印
         $water = '';
         $img = new Image3();
         $img->param($targetFile)->water($targetFile, $water, 9);
         //ajax返回图片名称
         echo get_relative_path($new_file_name);
     }
 }
开发者ID:xinlechou,项目名称:app,代码行数:26,代码来源:shangModule.class.php


示例2: get_path

 /**
  * Get relative path to a directory/file
  * @param  string  $path         Path to a directory/file
  * @param  boolean $use_doc_root Use document root or relative path?
  * @return string
  */
 function get_path($path, $use_doc_root = false)
 {
     $doc_root = DOCUMENT_ROOT;
     if (!$use_doc_root) {
         $doc_root = get_relative_path();
     }
     return join_path(preg_replace('/(\\/)+$/', '', $doc_root), preg_replace('/^(\\/+)/', '', $path));
 }
开发者ID:TemplatemonsterDocumentation,项目名称:wordpress-complex,代码行数:14,代码来源:functions.php


示例3: get_Olympus_Makernote_Html

function get_Olympus_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this tag uses the Olympus tags, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Tags'] != "Olympus") {
        // Not Olympus tags - can't interpret with this function
        return FALSE;
    }
    // Check if the Decoded data is valid
    if ($Makernote_tag['Decoded Data'][0] === FALSE) {
        // Decoded data is not valid - can't interpret with this function
        return FALSE;
    }
    // Minolta Thumbnail 1
    if (array_key_exists(0x88, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Olympus") {
        // Change: as of version 1.11 - Changed to make thumbnail link portable across directories
        // Build the path of the thumbnail script and its filename parameter to put in a url
        $link_str = get_relative_path(dirname(__FILE__) . "/../get_minolta_thumb.php", getcwd());
        $link_str .= "?filename=";
        $link_str .= get_relative_path($filename, dirname(__FILE__) . "/..");
        // Add thumbnail link to html
        $Makernote_tag['Decoded Data'][0][0x88]['Text Value'] = "<a class=\"EXIF_Minolta_Thumb_Link\" href=\"{$link_str}\" ><img class=\"EXIF_Minolta_Thumb\" src=\"{$link_str}\"></a>";
        $Makernote_tag['Decoded Data'][0][0x88]['Type'] = "String";
    }
    // Minolta Thumbnail 2
    if (array_key_exists(0x81, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Olympus") {
        // Change: as of version 1.11 - Changed to make thumbnail link portable across directories
        // Build the path of the thumbnail script and its filename parameter to put in a url
        $link_str = get_relative_path(dirname(__FILE__) . " /../get_minolta_thumb.php", getcwd());
        $link_str .= "?filename=";
        $link_str .= get_relative_path($filename, dirname(__FILE__) . "/..");
        // Add thumbnail link to html
        $Makernote_tag['Decoded Data'][0][0x81]['Text Value'] = "<a class=\"EXIF_Minolta_Thumb_Link\" href=\"{$link_str}\" ><img class=\"EXIF_Minolta_Thumb\" src=\"{$link_str}\"></a>";
        $Makernote_tag['Decoded Data'][0][0x81]['Type'] = "String";
    }
    // Interpret the IFD and return the HTML
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
开发者ID:shen0834,项目名称:util,代码行数:37,代码来源:olympus.php


示例4: Copyright

?>
, Copyright (C) 2004 Evan Hunter</a></p>    <!-- Change: displayed toolkit version numbers to reference Toolkit_Version.php - as of version 1.11 -->
        <br>
        <br>

        <h1><B><U>Metadata for &quot;<?php 
echo $filename;
?>
&quot;</U></B></h1>
        <br>

        <!-- Output a link allowing user to edit the Photoshop File Info
             Change: Allow this example file to be easily relocatable - as of version 1.11
        -->
        <?php 
$relative_filename = get_relative_path($filename, $Toolkit_Dir);
?>
        <h4><a href="<?php 
echo $Toolkit_Dir . "Edit_File_Info_Example.php?jpeg_fname={$relative_filename}";
?>
" >Click here to edit the Photoshop File Info for this file</a></h4>
        <br>



        Output the information about the APP segments -->
        <?php 
echo Generate_JPEG_APP_Segment_HTML($jpeg_header_data);
?>

        <BR>
开发者ID:cyberorca,项目名称:dfp-api,代码行数:31,代码来源:Example.php


示例5: interpret_IFD

function interpret_IFD($IFD_array, $filename)
{
    // Create the output string with the table tag
    $output_str = "<table class=\"EXIF_Table\" border=1>\n";
    // Create an extra output string to receive any supplementary html
    // which cannot go inside the table
    $extra_IFD_str = "";
    // Check that the IFD array is valid
    if ($IFD_array === FALSE || $IFD_array === NULL) {
        // the IFD array is NOT valid - exit
        return "";
    }
    // Check if this is an EXIF IFD and if there is a makernote present
    if ($IFD_array['Tags Name'] === "EXIF" && !array_key_exists(37500, $IFD_array)) {
        // This is an EXIF IFD but NO makernote is present - Add a message to the output
        $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">No Makernote Present</h3>";
    }
    // Cycle through each tag in the IFD
    foreach ($IFD_array as $Tag_ID => $Exif_Tag) {
        // Ignore the non numeric elements - they aren't tags
        if (!is_numeric($Tag_ID)) {
            // Skip Tags Name
        } else {
            if ($Exif_Tag['Decoded'] == TRUE) {
                // This tag has been successfully decoded
                // Table cells won't get drawn with nothing in them -
                // Ensure that at least a non breaking space exists in them
                if (trim($Exif_Tag['Text Value']) == "") {
                    $Exif_Tag['Text Value'] = "&nbsp;";
                }
                // Check if the tag is a sub-IFD
                if ($Exif_Tag['Type'] == "SubIFD") {
                    // This is a sub-IFD tag
                    // Add a sub-heading for the sub-IFD
                    $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">" . $Exif_Tag['Tag Name'] . " contents</h3>";
                    // Cycle through each sub-IFD in the chain
                    foreach ($Exif_Tag['Data'] as $subIFD) {
                        // Interpret this sub-IFD and add the html to the secondary output
                        $extra_IFD_str .= interpret_IFD($subIFD, $filename);
                    }
                } else {
                    if ($Exif_Tag['Type'] == "Maker Note") {
                        // This is a Makernote Tag
                        // Add a sub-heading for the Makernote
                        $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Maker Note Contents</h3>";
                        // Interpret the Makernote and add the html to the secondary output
                        $extra_IFD_str .= Interpret_Makernote_to_HTML($Exif_Tag, $filename);
                    } else {
                        if ($Exif_Tag['Type'] == "IPTC") {
                            // This is a IPTC/NAA Record, interpret it and output to the secondary html
                            $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Contains IPTC/NAA Embedded in EXIF</h3>";
                            $extra_IFD_str .= Interpret_IPTC_to_HTML($Exif_Tag['Data']);
                        } else {
                            if ($Exif_Tag['Type'] == "XMP") {
                                // This is a XMP Record, interpret it and output to the secondary html
                                $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Contains XMP Embedded in EXIF</h3>";
                                $extra_IFD_str .= Interpret_XMP_to_HTML($Exif_Tag['Data']);
                            } else {
                                if ($Exif_Tag['Type'] == "IRB") {
                                    // This is a Photoshop IRB Record, interpret it and output to the secondary html
                                    $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Contains Photoshop IRB Embedded in EXIF</h3>";
                                    $extra_IFD_str .= Interpret_IRB_to_HTML($Exif_Tag['Data'], $filename);
                                } else {
                                    if ($Exif_Tag['Type'] == "Numeric") {
                                        // Numeric Tag - Output text value as is.
                                        $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\">" . $Exif_Tag['Text Value'] . "</td></tr>\n";
                                    } else {
                                        // Other tag - Output text as preformatted
                                        $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\"><pre>" . trim($Exif_Tag['Text Value']) . "</pre></td></tr>\n";
                                    }
                                }
                            }
                        }
                    }
                }
            } else {
                // Tag has NOT been decoded successfully
                // Hence it is either an unknown tag, or one which
                // requires processing at the time of html construction
                // Table cells won't get drawn with nothing in them -
                // Ensure that at least a non breaking space exists in them
                if (trim($Exif_Tag['Text Value']) == "") {
                    $Exif_Tag['Text Value'] = "&nbsp;";
                }
                // Check if this tag is the first IFD Thumbnail
                if ($IFD_array['Tags Name'] == "TIFF" && $Tag_ID == 513) {
                    // This is the first IFD thumbnail - Add html to the output
                    // Change: as of version 1.11 - Changed to make thumbnail link portable across directories
                    // Build the path of the thumbnail script and its filename parameter to put in a url
                    $link_str = get_relative_path(dirname(__FILE__) . "/get_exif_thumb.php", getcwd());
                    $link_str .= "?filename=";
                    $link_str .= get_relative_path($filename, dirname(__FILE__));
                    // Add thumbnail link to html
                    $output_str .= "<tr class=\"EXIF_Table_Row\"><td class=\"EXIF_Caption_Cell\">" . $Exif_Tag['Tag Name'] . "</td><td class=\"EXIF_Value_Cell\"><a class=\"EXIF_First_IFD_Thumb_Link\" href=\"{$link_str}\"><img class=\"EXIF_First_IFD_Thumb\" src=\"{$link_str}\"></a></td></tr>\n";
                } else {
                    if ($Exif_Tag['Type'] == "Maker Note") {
                        // This is the makernote, but has not been decoded
                        // Add a message to the secondary output
                        $extra_IFD_str .= "<h3 class=\"EXIF_Secondary_Heading\">Makernote Coding Unknown</h3>\n";
                    } else {
//.........这里部分代码省略.........
开发者ID:evanhunter,项目名称:PJMT,代码行数:101,代码来源:EXIF.php


示例6: get_Casio_Makernote_Html

function get_Casio_Makernote_Html($Makernote_tag, $filename)
{
    // Check that this tag uses the Casio tags, otherwise it can't be interpreted here
    if ($Makernote_tag['Makernote Type'] != "Casio Type 1" && $Makernote_tag['Makernote Type'] != "Casio Type 2") {
        // Not Casio tags - can't interpret with this function
        return FALSE;
    }
    // Casio Thumbnail (Tag 4)
    if (array_key_exists(4, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Casio Type 2") {
        // Change: as of version 1.11 - Changed to make thumbnail link portable across directories
        // Build the path of the thumbnail script and its filename parameter to put in a url
        $link_str = get_relative_path(dirname(__FILE__) . "/get_casio_thumb.php", getcwd());
        $link_str .= "?filename=";
        $link_str .= get_relative_path($filename, dirname(__FILE__));
        // Add thumbnail link to html
        $Makernote_tag['Decoded Data'][0][4]['Text Value'] = "<a class=\"EXIF_Casio_Thumb_Link\" href=\"{$link_str}\"><img class=\"EXIF_Casio_Thumb\" src=\"{$link_str}\"></a></td></tr>\n";
        $Makernote_tag['Decoded Data'][0][4]['Type'] = "String";
    }
    // Casio Thumbnail (Tag 8192)
    if (array_key_exists(8192, $Makernote_tag['Decoded Data'][0]) && $Makernote_tag['Makernote Tags'] == "Casio Type 2") {
        // Change: as of version 1.11 - Changed to make thumbnail link portable across directories
        // Build the path of the thumbnail script and its filename parameter to put in a url
        $link_str = get_relative_path(dirname(__FILE__) . "/.." . "/get_casio_thumb.php", getcwd());
        $link_str .= "?filename=";
        $link_str .= get_relative_path($filename, dirname(__FILE__) . "/..");
        // Add thumbnail link to html
        $Makernote_tag['Decoded Data'][0][8192]['Text Value'] = "<a class=\"EXIF_Casio_Thumb_Link\" href=\"{$link_str}\"><img class=\"EXIF_Casio_Thumb\" src=\"{$link_str}\"></a></td></tr>\n";
        $Makernote_tag['Decoded Data'][0][8192]['Type'] = "String";
    }
    // Check if there are two thumbnail offset tags
    if (array_key_exists(4, $Makernote_tag['Decoded Data'][0]) && array_key_exists(8192, $Makernote_tag['Decoded Data'][0])) {
        // There are two copies of the thumbnail offset - Remove one
        array_splice($Makernote_tag['Decoded Data'][0], 4, 1);
    }
    // Interpret the IFD and return the html
    return interpret_IFD($Makernote_tag['Decoded Data'][0], $filename);
}
开发者ID:cyberorca,项目名称:dfp-api,代码行数:37,代码来源:casio.php


示例7: array

        $header_class = 'noPrint';
    }
}
$lmt_main_navbar = array('Math Club Home' => 'Home', backstage_is_open() ? 'ARL' : 'A' => ['Backstage' => 'LMT/Backstage/Home'], '');
$result = DB::query('SELECT page_id, name FROM pages ORDER BY order_num');
foreach ($result as $row) {
    if ($row['page_id'] == '-1') {
        if (registration_is_open()) {
            $lmt_main_navbar['Registration'] = 'LMT/Registration/Home';
            $lmt_main_navbar[] = '';
        }
    } else {
        if ($row['name'] == '') {
            $lmt_main_navbar[] = '';
        } else {
            $lmt_main_navbar[$row['name']] = 'LMT/' . str_replace(' ', '_', $row['name']);
        }
    }
}
$lmt_backstage_navbar = array('ARL' => ['LMT Home' => 'LMT', 'Backstage Home' => 'LMT/Backstage/Home', 'A' => ['', 'Status' => 'LMT/Backstage/Status', 'Website' => 'LMT/Backstage/Pages/List', 'Email' => 'LMT/Backstage/Email/Home', 'Export' => 'LMT/Backstage/Export'], '', 'Check-in' => 'LMT/Backstage/Checkin/Home', 'Score Entry' => 'LMT/Backstage/Scoring/Home', 'Guts Round' => 'LMT/Backstage/Guts/Home', 'Results' => 'LMT/Backstage/Results/Full', '', 'Data' => 'LMT/Backstage/Data/Home', 'Verification' => 'LMT/Backstage/Database/Verify', 'Backup' => 'LMT/Backstage/Database/Backup']);
if (strpos(get_relative_path(), 'Backstage') === 4) {
    //position 4, because it's after 'LMT/'
    if (backstage_is_open()) {
        restrict_access('ARL');
    } else {
        restrict_access('A');
    }
    set_navbar($lmt_backstage_navbar);
} else {
    set_navbar($lmt_main_navbar);
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:31,代码来源:lmt-functions.php


示例8: pfupdate

$webdlmon_pf = 'webdlmon.pf';
pfupdate($webdlmon_pf);
$pf_change_time = "1182297600";
if (pfrequire($webdlmon_pf, $pf_change_time) < 0) {
    die("<b><u>Webdlmon Error:</u></b>\n\t\tThe parameter file {$webdlmon_pf}.pf is out of date. \n\t\tPlease upgrade to the latest version. Goodbye.");
}
$sources = pfget($webdlmon_pf, 'sources');
$dlmon_pf = $sources['dlmon_pf'];
$optional = pfget($webdlmon_pf, 'optional');
$table_caption = trim($optional['table_caption'], "'\"");
$dataloggers = pfget($webdlmon_pf, 'dataloggers');
$dlmodel = trim($dataloggers['model'], "'\"");
$customization = pfget($webdlmon_pf, 'customization');
if ($customization['customize'] == 'true') {
    $cookie_name = $customization['cookie_name'];
    $cookie_domain = get_relative_path(dirname(__FILE__));
    if (!empty($_POST['submit']) && !empty($_POST['cookie'])) {
        ksort($_POST['cookie']);
        $cookie_val = implode('|', $_POST['cookie']);
        $cookie_expire = time() + 60 * 60 * 24 * 365;
        // One year from now
        setcookie($cookie_name, $cookie_val, $cookie_expire, $cookie_domain);
    } else {
        // Make sure we delete the old cookie, browser specific
        // See http://www.php.net/setcookie
        if (eregi('MSIE', $_SERVER['HTTP_USER_AGENT'])) {
            // MS IE issue
            setcookie($cookie_name, "", time() + 3600, $cookie_domain);
        } elseif (eregi('Firefox', $_SERVER['HTTP_USER_AGENT'])) {
            setcookie($cookie_name, $COOKIE[$cookie_name], time() - 3600, $cookie_domain);
        } else {
开发者ID:vonseg,项目名称:antelope_contrib,代码行数:31,代码来源:webdlmoncustomize.php


示例9: navbar_html

function navbar_html($navbar = NULL)
{
    if (is_null($navbar)) {
        global $navbar_array;
        $navbar = $navbar_array;
    }
    $html = '';
    foreach ($navbar as $key => $nav_elem) {
        if (is_array($nav_elem)) {
            if (user_access($key)) {
                //If it's a section and it's allowed, then recursively continue flattening the array.
                $html .= navbar_html($nav_elem);
            }
        } elseif ($nav_elem === '') {
            $html .= "</div><div class='linkgroup'>";
        } elseif (is_string($key)) {
            //In this case $key is the name, $nav_elem is the path.
            if ($nav_elem === get_relative_path()) {
                //In this case it's the current page, so indicate so.
                $html .= "<span class='selected'>{$key}</span><br />";
            } else {
                $html .= "<a href='" . URL::root() . "/{$nav_elem}'>{$key}</a><br />";
            }
        } else {
            //In this case $nav_elem is both the name and the path.
            if ($nav_elem === get_relative_path()) {
                //In this case it's the current page, so indicate so.
                $html .= "<span class='selected'>{$nav_elem}</span><br />";
            } else {
                $html .= "<a href='" . URL::root() . "/{$nav_elem}'>{$nav_elem}</a><br />";
            }
        }
    }
    return $html;
}
开发者ID:lhsmath,项目名称:lhsmath.org,代码行数:35,代码来源:functions.template.php


示例10: setAlternativeAndClose

		obj.style.display='none';
		btn.style.display = '';
	}
}
<?php 
}
?>

<?php 
// When uploading a file as an alternative content, set the alternative field in the opener window
// and close "file manager" once the upload is successful
if ($a_type > 0 && isset($_GET['uploadfile']) && $_GET['uploadfile'] != '') {
    ?>
function setAlternativeAndClose() {
	setAlternative('<?php 
    echo get_relative_path($_GET['cp'], $pathext) . $_GET['uploadfile'];
    ?>
', '<?php 
    echo TR_BASE_HREF . $get_file . $pathext . urlencode($_GET['uploadfile']);
    ?>
', '<?php 
    echo $_content_id;
    ?>
', '<?php 
    echo $pid;
    ?>
', '<?php 
    echo $a_type;
    ?>
');
	window.close();
开发者ID:harriswong,项目名称:AContent,代码行数:31,代码来源:filemanager_display.inc.php


示例11: find_best_location_in_include_path

function find_best_location_in_include_path($path)
{
    $newpath = $path;
    $reltoinclude;
    if (substr($newpath, 0, 1) == "/" || substr($newpath, 0, 1) == "\\") {
        if (is_file($newpath) || is_dir($newpath)) {
            return $newpath;
        } else {
            return false;
        }
    }
    if (!is_file($newpath) && !is_dir($newpath)) {
        $found = find_file_to_include($newpath, $newpath, $reltoinclude);
        $newpath = get_relative_path(str_replace("/", "\\", realpath($newpath)), dirname(realpath($_SERVER["SCRIPT_FILENAME"])));
        if (!$found) {
            return false;
        }
    }
    return $newpath;
}
开发者ID:bmottag,项目名称:maxrico,代码行数:20,代码来源:swutil.php


示例12: find_best_location_in_include_path

function find_best_location_in_include_path($path)
{
    $newpath = $path;
    $reltoinclude;
    //if ( !is_file ( $newpath ) && !is_dir ( $newpath ) )
    //{
    $found = find_file_to_include($newpath, $newpath, $reltoinclude);
    $newpath = get_relative_path(str_replace("/", "\\", realpath($newpath)), dirname(realpath($_SERVER["SCRIPT_FILENAME"])));
    if (!$found) {
        return false;
    }
    //}
    return $newpath;
}
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:14,代码来源:swutil.php


示例13: setCheckboxCookie

}

// set a cookie
function setCheckboxCookie(obj, value1, value2, date)
{
	var today = new Date();
	var the_date = new Date(date);
	var the_cookie_date = the_date.toGMTString();
	if (obj.checked==true)
		var the_cookie = value1 + ";expires=" + the_cookie_date;
	else
		var the_cookie = value2 + ";expires=" + the_cookie_date;
	document.cookie = the_cookie;
}
<?php endif; ?>

<?php 
// When uploading a file as an alternative content, set the alternative field in the opener window 
// and close "file manager" once the upload is successful
if ($a_type > 0 && isset($_GET['uploadfile']) && $_GET['uploadfile'] <> '') { ?>
function setAlternativeAndClose() {
	setAlternative('<?php echo get_relative_path($_GET['cp'], $pathext).$_GET['uploadfile']; ?>', '<?php echo AT_BASE_HREF.$get_file.$pathext.urlencode($_GET['uploadfile']); ?>', '<?php echo $cid; ?>', '<?php echo $pid; ?>', '<?php echo $a_type; ?>');
	window.close();
}

window.onload=setAlternativeAndClose;
<?php } ?>

//-->
</script>
开发者ID:radiocontrolled,项目名称:ATutor,代码行数:30,代码来源:filemanager_display.inc.php


示例14: get_reportico_url_path

function get_reportico_url_path()
{
    $newpath = "reportico.php";
    $found = find_file_to_include($newpath, $newpath, $reltoinclude);
    $newpath = get_relative_path(str_replace("/", "\\", realpath($newpath)), dirname(realpath($_SERVER["SCRIPT_FILENAME"])));
    $above = dirname($_SERVER["SCRIPT_NAME"]);
    if ($above == "/") {
        $above = "";
    }
    $url_path = $above . "/" . session_request_item('reporticourl', dirname($newpath));
    // If reportico source files are installed in root directory or in some other
    // scenarios such as an invalid linkbaseurl parameter the dirname of the
    // the reportico files returns just a slash (backslash on windows) so
    // return a true path
    if ($url_path == "/" || $url_path == "\\") {
        $url_path = "/";
    } else {
        $url_path = $url_path . "/";
    }
    return $url_path;
}
开发者ID:junjiezou,项目名称:reportico,代码行数:21,代码来源:swutil.php


示例15: clean_old_tmp_files

            $b4plot->SetFillColor("#FBE32A");
            $b4plot->SetLegend('Lectures');
            $b5plot->SetColor("#000");
            $b5plot->SetFillColor("#000");
            $b5plot->SetLegend('Abandon');
            $graph->legend->SetColumns(5);
            $graph->legend->SetFrameWeight(2);
            $graph->legend->SetShadow();
            $graph->legend->Pos(0.5, 0.99, 'center', 'bottom');
            $graph->legend->SetLayout(LEGEND_HOR);
            $graph->Stroke($tmpfname);
            clean_old_tmp_files();
            ?>
                <article class="stats_graph">
                    <img src="<?php 
            echo get_relative_path($tmpfname);
            ?>
">
                </article>
                <?php 
            break;
        default:
        case 'ch':
            echo '<table class="tablesorter" cellspacing="0"> 
			    <thead> 
				    <tr> 
       					<th>Date</th> 
        				<th>Sujet</th> 
        				<th>Envois</th> 
        				<th>Lectures</th> 
        				<th>Ouvertures</th>
开发者ID:Arnaud69,项目名称:phpmynewsletter-2.0,代码行数:31,代码来源:tracking.php


示例16: generate_url_params

 function generate_url_params($target_format, $session_placeholder = false)
 {
     $this->apply_defaults();
     $result = "";
     $url = "";
     $url .= "title=" . $this->convert_special_chars($this->title_actual);
     $url .= "&xtitle=" . $this->convert_special_chars($this->xtitle_actual);
     $url .= "&ytitle=" . $this->convert_special_chars($this->ytitle_actual);
     if ($target_format == "PDF") {
         $url .= "&width=" . $this->width_pdf_actual;
         $url .= "&height=" . $this->height_pdf_actual;
     } else {
         $url .= "&width=" . $this->width_actual;
         $url .= "&height=" . $this->height_actual;
     }
     $url .= "&graphcolor=" . $this->graphcolor_actual;
     $url .= "&gridposition=" . $this->gridpos_actual;
     $url .= "&xgriddisplay=" . $this->xgriddisplay_actual;
     $url .= "&xgridcolor=" . $this->xgridcolor_actual;
     $url .= "&ygriddisplay=" . $this->ygriddisplay_actual;
     $url .= "&ygridcolor=" . $this->ygridcolor_actual;
     $url .= "&titlefont=" . $this->titlefont_actual;
     $url .= "&titlefontstyle=" . $this->titlefontstyle_actual;
     $url .= "&titlefontsize=" . $this->titlefontsize_actual;
     $url .= "&titlecolor=" . $this->titlecolor_actual;
     $url .= "&xaxiscolor=" . $this->xaxiscolor_actual;
     $url .= "&xaxisfont=" . $this->xaxisfont_actual;
     $url .= "&xaxisfontstyle=" . $this->xaxisfontstyle_actual;
     $url .= "&xaxisfontsize=" . $this->xaxisfontsize_actual;
     $url .= "&xaxisfontcolor=" . $this->xaxisfontcolor_actual;
     $url .= "&yaxiscolor=" . $this->yaxiscolor_actual;
     $url .= "&yaxisfont=" . $this->yaxisfont_actual;
     $url .= "&yaxisfontstyle=" . $this->yaxisfontstyle_actual;
     $url .= "&yaxisfontsize=" . $this->yaxisfontsize_actual;
     $url .= "&yaxisfontcolor=" . $this->yaxisfontcolor_actual;
     $url .= "&xtitlefont=" . $this->xtitlefont_actual;
     $url .= "&xtitlefontstyle=" . $this->xtitlefontstyle_actual;
     $url .= "&xtitlefontsize=" . $this->xtitlefontsize_actual;
     $url .= "&xtitlecolor=" . $this->xtitlecolor_actual;
     $url .= "&xtickint=" . $this->xtickinterval_actual;
     $url .= "&xticklabint=" . $this->xticklabelinterval_actual;
     $url .= "&ytitlefont=" . $this->ytitlefont_actual;
     $url .= "&ytitlefontstyle=" . $this->ytitlefontstyle_actual;
     $url .= "&ytitlefontsize=" . $this->ytitlefontsize_actual;
     $url .= "&ytitlecolor=" . $this->ytitlecolor_actual;
     $url .= "&ytickint=" . $this->ytickinterval_actual;
     $url .= "&yticklabint=" . $this->yticklabelinterval_actual;
     $url .= "&margincolor=" . $this->margincolor_actual;
     $url .= "&marginleft=" . $this->marginleft_actual;
     $url .= "&marginright=" . $this->marginright_actual;
     $url .= "&margintop=" . $this->margintop_actual;
     $url .= "&marginbottom=" . $this->marginbottom_actual;
     $url .= "&xlabels=" . implode(",", $this->xlabels);
     foreach ($this->plot as $k => $v) {
         $str = implode(",", $v["data"]);
         $url .= "&plotname{$k}=" . $v["name"];
         $url .= "&plotdata{$k}={$str}";
         $url .= "&plottype{$k}=" . $v["type"];
         $url .= "&plotlinecolor{$k}=" . $v["linecolor"];
         if ($v["legend"]) {
             $url .= "&plotlegend{$k}=" . $v["legend"];
         }
         if ($v["fillcolor"]) {
             $url .= "&plotfillcolor{$k}=" . $v["fillcolor"];
         }
     }
     if ($session_placeholder) {
         $ses = "graph_" . $session_placeholder;
         set_reportico_session_param($ses, $url);
         $url = "graphid=" . $ses . "&time=" . time();
     }
     // Select the appropriate reporting engine
     $dyngraph = "dyngraph.php";
     if (defined("SW_GRAPH_ENGINE") && SW_GRAPH_ENGINE == "PCHART") {
         $dyngraph = "dyngraph_pchart.php";
     }
     if (!is_file($dyngraph)) {
         find_file_to_include($dyngraph, $dyngraph);
         $dyngraph = get_relative_path(realpath($dyngraph), dirname($_SERVER["SCRIPT_FILENAME"]));
     }
     $dr = get_reportico_url_path();
     $result = '<img class="swRepGraph" src=\'' . $dr . $dyngraph . '?' . $url . '\'>';
     return $result;
 }
开发者ID:lihaobin0320,项目名称:yii2-reportico,代码行数:84,代码来源:swgraph_pchart3.php


示例17: Interpret_IRB_to_HTML


//.........这里部分代码省略.........
                            case 0x1:
                                $output_str .= "3 Scans\n";
                                break;
                            case 0x2:
                                $output_str .= "4 Scans\n";
                                break;
                            case 0x3:
                                $output_str .= "5 Scans\n";
                                break;
                            default:
                                $output_str .= "Unknown number of scans (" . $Qual_Info['Scans'] . ")\n";
                                break;
                        }
                    }
                    $output_str .= "</td></tr>\n";
                    break;
                case 0x409:
                    // Thumbnail Resource
                // Thumbnail Resource
                case 0x40c:
                    // Thumbnail Resource
                    $thumb_data = unpack("NFormat/NWidth/NHeight/NWidthBytes/NSize/NCompressedSize/nBitsPixel/nPlanes", $IRB_Resource['ResData']);
                    $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">{$Resource_Name}</td><td class=\"Photoshop_Value_Cell\"><pre>\n";
                    $output_str .= "Format = " . ($thumb_data['Format'] == 1 ? "JPEG RGB\n" : "Raw RGB\n");
                    $output_str .= "Width = " . $thumb_data['Width'] . "\n";
                    $output_str .= "Height = " . $thumb_data['Height'] . "\n";
                    $output_str .= "Padded Row Bytes = " . $thumb_data['WidthBytes'] . " bytes\n";
                    $output_str .= "Total Size = " . $thumb_data['Size'] . " bytes\n";
                    $output_str .= "Compressed Size = " . $thumb_data['CompressedSize'] . " bytes\n";
                    $output_str .= "Bits per Pixel = " . $thumb_data['BitsPixel'] . " bits\n";
                    $output_str .= "Number of planes = " . $thumb_data['Planes'] . " bytes\n";
                    // Change: as of version 1.11 - Changed to make thumbnail link portable across directories
                    // Build the path of the thumbnail script and its filename parameter to put in a url
                    $link_str = get_relative_path(dirname(__FILE__) . "/get_ps_thumb.php", getcwd());
                    $link_str .= "?filename=";
                    $link_str .= get_relative_path($filename, dirname(__FILE__));
                    // Add thumbnail link to html
                    $output_str .= "Thumbnail Data:</pre><a class=\"Photoshop_Thumbnail_Link\" href=\"{$link_str}\"><img class=\"Photoshop_Thumbnail_Link\" src=\"{$link_str}\"></a>\n";
                    $output_str .= "</td></tr>\n";
                    break;
                case 0x414:
                    // Document Specific ID's
                    $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">{$Resource_Name}</td><td class=\"Photoshop_Value_Cell\"><pre>" . hexdec(bin2hex($IRB_Resource['ResData'])) . "</pre></td></tr>\n";
                    break;
                case 0x41e:
                    // URL List
                    $URL_count = hexdec(bin2hex(substr($IRB_Resource['ResData'], 0, 4)));
                    $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">{$Resource_Name}</td><td class=\"Photoshop_Value_Cell\">\n";
                    $output_str .= "{$URL_count} URL's in list<br>\n";
                    $urlstr = substr($IRB_Resource['ResData'], 4);
                    // TODO: Check if URL List in Photoshop IRB works
                    for ($i = 0; $i < $URL_count; $i++) {
                        $url_data = unpack("NLong/NID/NURLSize", $urlstr);
                        $output_str .= "URL {$i} info: long = " . $url_data['Long'] . ", ";
                        $output_str .= "ID = " . $url_data['ID'] . ", ";
                        $urlstr = substr($urlstr, 12);
                        $url = substr($urlstr, 0, $url_data['URLSize']);
                        $output_str .= "URL = <a href=\"" . xml_UTF16_clean($url, TRUE) . "\">" . HTML_UTF16_Escape($url, TRUE) . "</a><br>\n";
                    }
                    $output_str .= "</td></tr>\n";
                    break;
                case 0x3f4:
                    // Grayscale and multichannel halftoning information.
                    $output_str .= "<tr class=\"Photoshop_Table_Row\"><td class=\"Photoshop_Caption_Cell\">{$Resource_Name}</td><td class=\"Photoshop_Value_Cell\"><pre>\n";
                    $output_str .= Interpret_Halftone($IRB_Resource['ResData']);
                    $output_str .= "</pre></td></tr>\n";
开发者ID:evanhunter,项目名称:PJMT,代码行数:67,代码来源:Photoshop_IRB.php


示例18: Interpret_JFXX_to_HTML

function Interpret_JFXX_to_HTML($JFXX_array, $filename)
{
    $output = "";
    if ($JFXX_array !== FALSE) {
        $output .= "<H2 class=\"JFXX_Main_Heading\">Contains JPEG File Interchange Extension Format  (JFXX) Thumbnail</H2>\n";
        switch ($JFXX_array['Extension_Code']) {
            case 0x10:
                $output .= "<p class=\"JFXX_Text\">JFXX Thumbnail is JPEG Encoded</p>\n";
                // Change: as of version 1.11 - Changed to make thumbnail link portable across directories
                // Build the path of the thumbnail script and its filename parameter to put in a url
                $link_str = get_relative_path(dirname(__FILE__) . "/get_JFXX_thumb.php", getcwd());
                $link_str .= "?filename=";
                $link_str .= get_relative_path($filename, dirname(__FILE__));
                // Add thumbnail link to html
                $output .= "<a class=\"JFXX_Thumbnail_Link\" href=\"{$link_str}\"><img  class=\"JFXX_Thumbnail\" src=\"{$link_str}\"></a>\n";
                break;
            case 0x11:
                $output .= "<p class=\"JFXX_Text\">JFXX Thumbnail is Encoded 1 byte/pixel</p>\n";
                $output .= "<p class=\"JFXX_Text\">Thumbnail Display Not Implemented Yet</p>\n";
                break;
            case 0x13:
                $output .= "<p class=\"JFXX_Text\">JFXX Thumbnail is Encoded 3 bytes/pixel</p>\n";
                $output .= "<p class=\"JFXX_Text\">Thumbnail Display Not Implemented Yet</p>\n";
                break;
            default:
                $output .= "<p class=\"JFXX_Text\">JFXX Thumbnail is Encoded with Unknown format</p>\n";
                break;
                // TODO: Implement JFXX one and three bytes per pixel thumbnail decoding
        }
    }
    return $output;
}
开发者ID:evanhunter,项目名称:PJMT,代码行数:32,代码来源:JFIF.php


示例19: get_dump_url

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_remote函数代码示例发布时间:2022-05-15
下一篇:
PHP get_relationship函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap