Пример #1
0
function buildURL($urlParts, $includeUser = false)
{
    $result = $urlParts['scheme'];
    $result .= '://';
    if ($includeUser) {
        if (isset($urlParts['user'])) {
            $result .= $urlParts['user'];
            if (isset($urlParts['pass'])) {
                $result .= ':';
                $result .= $urlParts['pass'];
            }
        }
    }
    $result .= $urlParts['host'];
    $result .= ':';
    $result .= $urlParts['port'];
    //$result .= '/';
    $result .= htmlpath($urlParts['path']);
    if (isset($urlParts['query'])) {
        $result .= '?';
        $result .= $urlParts['query'];
    }
    if (isset($urlParts['fragment'])) {
        $result .= '#';
        $result .= $urlParts['fragment'];
    }
    return $result;
}
Пример #2
0
function bh_get_weburi()
{
    global $bhconfig;
    if (!empty($bhconfig['baseuri'])) {
        if (substr($bhconfig['baseuri'], -1) != "/") {
            $bhconfig['baseuri'] .= "/";
        }
        return $bhconfig['baseuri'];
    } else {
        if ($_SERVER['HTTPS'] == 'on') {
            $httpsuff = 's';
        }
        if (defined("BH_ROOT")) {
            $htmlpath = BH_ROOT;
        } else {
            $htmlpath = ".";
        }
        return $sysurl = "http" . $httpsuff . "://" . $_SERVER['HTTP_HOST'] . htmlpath($htmlpath) . "/";
    }
}
Пример #3
0
    ?>
&nbsp;</td></tr>
					  <?php 
}
if ($staff_flag == 1) {
    ?>
					    		<tr class="listingmaintext"><td colspan="3"  class=subsidelink align=center ><?php 
    echo htmlpath("../staff/languages/");
    ?>
&nbsp;</td></tr>
					  <?php 
}
if ($user_flag == 1) {
    ?>
					     		<tr class="listingmaintext"><td colspan="3"  class=subsidelink align=center ><?php 
    echo htmlpath("../languages/");
    ?>
&nbsp;</td></tr>
					  <?php 
}
?>
                       
					   
					  
                     </table>
            <table width="100%"  border="0" cellspacing="10" cellpadding="0">
				<tr>
					<td class="btm_brdr">&nbsp;</td>
				</tr>
              <tr>
                <td>
Пример #4
0
                      <td><?php 
echo $htmlpath;
?>
</td>
                      <td><b>
                        <?php 
echo $command;
?>
                      </b></td>
                    </tr>
					<tr align="left">
					   <td colspan="2"  height="1"></td>
					</tr>
					<?php 
if (is_dir("../admin/purgedtickets/attachments")) {
    $htmlpath = htmlpath("../admin/purgedtickets/attachments");
    $wr = getDirList("../admin/purgedtickets/attachments", 0);
    if ($wr == TEXT_WRITE_PERMISSION_AVAILABLE) {
        $style = "listingmaintext";
        $command = TEXT_NO_ACTION;
        $num++;
    } else {
        $style = "redlistingmaintext";
        $command = TEXT_ENABLE_WRITE_PERMISSION;
    }
} else {
    $command = "";
    $style = "redlistingmaintext";
    $htmlpath = "yourinstalldirectory/admin/purgedtickets/attachments missing";
}
?>
Пример #5
0
							    <?php 
$wr = getDirList("./purgedtickets/attachments");
if ($wr == TEXT_WRITE_PERMISSION_AVAILABLE) {
    $current = $wr;
    $recom = "&nbsp;";
} else {
    $current = TEXT_WRITE_PERMISSION_UNAVAILABLE;
    $recom = $wr;
}
?>
							     <td width="22%" ><?php 
echo TEXT_PURGED_ATTACHMENTS;
?>
</td>
								 <td width="26%" ><?php 
echo htmlpath("./purgedtickets/attachments");
?>
</td>
								 <td width="27%" ><?php 
echo $current;
?>
</td>
								 <td width="25%" ><?php 
echo $recom;
?>
</td>								 
							   </tr>	
							</table>
							</div>
	                       
                  
Пример #6
0
    // get category name
    $var['category'] = getCategoryName($xmlParser, $catdir);
    // generate (sub)menu
    if ($xmlParser->match("/directory[1]/menu[1]")) {
        $var['catmenu'] = menuFromXml($xmlParser->exportAsXml("/directory[1]/menu[1]"), $var['catdir']);
    } else {
        $var['catmenu'] = menuFromCatdir($var['catdir']);
    }
    // get category stylesheet
    if ($xmlParser->match("/directory/stylesheet")) {
        $var['stylesheet'] = $xmlParser->getData("/directory/stylesheet");
    }
} else {
    // generate all "by hand"
    $var['category'] = getPathElement($var['catdir'], 1);
    $var['catmenu'] = menuFromCatdir($var['catdir']);
}
// generate mainmenu
$var['mainmenu'] = mainMenu();
// set some more variables to use in template
$var['absolute_content_filename'] = htmlpath($var['filepath']);
// calculate runtime
$var['end_time'] = time();
$var['generation_time'] = $var['end_time'] - $var['start_time'];
if (stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")) {
    header("Content-type: application/xhtml+xml");
} else {
    header("Content-type: text/html");
}
$output = template($var, "templates/" . $var['template'] . "/main.html");
echo $output;