コード例 #1
0
ファイル: index.php プロジェクト: skaligotla/kplaylist
function settings_edit($reload = 0, $page = 0)
{
    global $phpenv, $setctl;
    kprintheader(get_lang(126));
    $menuclass = array('header', 'header', 'header', 'header', 'header', 'header');
    $menuclass[$page] = 'headermarked';
    $widths = array('35%', '50%', '15%');
    function pagelink($id, $reload)
    {
        return PHPSELF . '?action=settingsview&reload=' . $reload . '&page=' . $id;
    }
    ?>
	<form style="margin:0;padding:0" name="settings" method="post" action="<?php 
    echo PHPSELF;
    ?>
">
	<input type="hidden" name="action" value="savesettings"/>
	<input type="hidden" name="page" value="<?php 
    echo $page;
    ?>
"/>
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="13%" class="settings">
				<a class="<?php 
    echo $menuclass[0];
    ?>
" href="<?php 
    echo pagelink(0, $reload);
    ?>
"><?php 
    echo get_lang(188);
    ?>
</a></td>
			<td width="18%" class="settings">
				<a class="<?php 
    echo $menuclass[1];
    ?>
" href="<?php 
    echo pagelink(1, $reload);
    ?>
"><?php 
    echo get_lang(189);
    ?>
</a></td>
			<td width="19%" class="settings">
				<a class="<?php 
    echo $menuclass[2];
    ?>
" href="<?php 
    echo pagelink(2, $reload);
    ?>
"><?php 
    echo get_lang(190);
    ?>
</a></td>
			<td width="18%" class="settings">
				<a class="<?php 
    echo $menuclass[3];
    ?>
" href="<?php 
    echo pagelink(3, $reload);
    ?>
"><?php 
    echo get_lang(203);
    ?>
</a></td>
			<td width="18%" class="settings">
				<a class="<?php 
    echo $menuclass[4];
    ?>
" href="<?php 
    echo pagelink(4, $reload);
    ?>
"><?php 
    echo get_lang(352);
    ?>
</a></td>
			<td width="14%" class="settings" style="border-right-width: 0px;">
				<a class="<?php 
    echo $menuclass[5];
    ?>
" href="<?php 
    echo pagelink(5, $reload);
    ?>
"><?php 
    echo get_lang(52);
    ?>
</a></td>
		</tr>
		<tr>
			<td height="10"></td>
		</tr>
		<tr>
			<td colspan="6" height="5"/>
		</tr>
	</table>

	<table width="100%" border="0" cellpadding="0" cellspacing="0">	
		<tr>
			<td width="<?php 
    echo $widths[0];
    ?>
"></td>
			<td width="<?php 
    echo $widths[1];
    ?>
"></td>
			<td width="<?php 
    echo $widths[2];
    ?>
"></td>
		</tr>
		<?php 
    settings_page($page);
    ?>
	</table>

	<?php 
    if ($page != 3) {
        ?>
		<div id="bottommsg" style="position:absolute; left:10px; bottom:10px; width:98%; height:35px; z-index:1">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td align="left"><input class="fatbuttom" type="submit" name="submit" value="<?php 
        echo get_lang(45);
        ?>
"/>
					&nbsp;<input class="fatbuttom" type="submit" name="button" value="<?php 
        echo get_lang(27);
        ?>
" onclick="javascript: window.close(); <?php 
        if ($reload) {
            echo 'window.opener.location.reload();';
        }
        ?>
"/></td>
					<td align="right" class="wtext"><?php 
        echo get_lang(191);
        ?>
</td>
				</tr>
			</table>
		</div>
	<?php 
    }
    ?>
	</form>
	<?php 
    kprintend();
    die;
}
コード例 #2
0
ファイル: show.php プロジェクト: KevinStoneCode/twmap
     exit(0);
 }
 if (isset($_GET['zip']) && $_GET['zip'] == 1) {
     $name = sprintf("/tmp/twmap-%d_%dx%s-%dx%d.zip", $mid, $map['locX'], $map['locY'], $map['shiftX'], $map['shiftY']);
     zipdownload($name, $imgarr);
     //register_shutdown_function('cleanupfile',$name);
     exit(0);
 }
 // 真正加總
 map_accessed($mid);
 if (strstr($map['filename'], 'v3p')) {
     $map['ph'] = 1;
 } else {
     $map['ph'] = 0;
 }
 $links['page'] = pagelink($map);
 $links['download'] = $links['page'] . "&links=1";
 $links['zip'] = $links['page'] . "&zip=1";
 $links['fullmap'] = $site_url . $html_root . "/" . basename($map['filename']);
 $links['fullmap_path'] = $site_url . $html_root;
 $links['download_link'] = $site_url . $site_html_root . "/show.php?mid=" . $map['mid'] . "&links=1";
 //$links['kmz'] = $site_url . $site_html_root . "/kmz.php?x=". $map['locX'] ."&y=" .$map['locY'] . "&tx=".$map['shiftX'] . "&ty=". $map['shiftY'] . "&title=".urlencode($map['title']). "&file=".$html_root."/".basename($map['filename'] . "&mid=$mid");
 if (map_file_exists($map['filename'], 'gpx')) {
     $links['gpx'] = $links['fullmap_path'] . "/" . basename(map_file_name($map['filename'], 'gpx'));
 }
 if (map_file_exists($map['filename'], 'kmz')) {
     //$links['kmz'] = $links['fullmap_path'] . "/". basename(map_file_name($map['filename'], 'kmz'));
     $links['kmz'] = "kmz2.php?mid=" . $map['mid'];
 }
 if (map_file_exists($map['filename'], 'pdf')) {
     $links['pdf'] = $links['fullmap_path'] . "/" . basename(map_file_name($map['filename'], 'pdf'));
コード例 #3
0
ファイル: viewer-shortcode.php プロジェクト: ajay786singh/emc
{
    $pageURL = 'http';
    if (isset($_SERVER["HTTPS"]) && strtolower($_SERVER["HTTPS"]) == "on") {
        $pageURL .= "s";
    }
    $pageURL .= "://";
    if ($_SERVER["SERVER_PORT"] != "80") {
        $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    } else {
        $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
    }
    return $pageURL;
}
//define('WEB_DIR', 'pdf-viewer-for-wordpress/web');
$file_url = $_REQUEST['file'];
$share_url = pagelink();
?>
                    <ul>
                     <!--  <li><a href="#" class="tnc_share">Share: </a></li> -->
                      <li><a href="https://www.facebook.com/sharer/sharer.php?u=<?php 
echo $share_url;
?>
" target="_blank" class="tnc_fb">Facebook</a></li>
                      <li><a href="https://twitter.com/intent/tweet?url=<?php 
echo $share_url;
?>
&text=I Liked this pdf" target="_blank" class="tnc_tw">Twitter</a></li>
                      <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php 
echo $share_url;
?>
" target="_blank" class="tnc_lin">Linkedin</a></li>
コード例 #4
0
function dopager($rows, $page, $pagesize)
{
	$startpage = ($page - 5 < 1 ? 1 : $page - 5);
	$endpage = ($page + 5 > $rows/$pagesize ? ceil($rows/$pagesize) : $page + 5);

	if ($rows > 0)
	{
		print "<div class=\"pager\">\n";
		print ($page > 1 ? pagelink($page - 1, false, "Previous") : "");
		for ($i = $startpage; $i <= $endpage; $i++)
		{
			print pagelink($i, $i == $page);
		}
		print ($page < ceil($rows/$pagesize) ? pagelink($page + 1, false, "Next") : "");
		print "</div>\n";
	}
}