示例#1
0
 public function creatLink($id, $item = null)
 {
     $link = null;
     if (isset($item)) {
         do {
             $name = menuInfo('name', '', $id);
             $url = menuInfo('link', '', $id);
             $url = make_permalink($url);
             $link = "<li><span></span><a href='{$url}'>{$name}</a></li> {$link}";
         } while ($id = menuInfo('parent_id', '', $id));
     } else {
         while ($id = menuInfo('parent_id', '', $id)) {
             $name = menuInfo('name', '', $id);
             $url = menuInfo('link', '', $id);
             $url = make_permalink($url);
             $link = "<li><span></span><a href='{$url}'>{$name}</a></li>  {$link}";
         }
     }
     $home = "<li><span></span><a href='" . FUrl . "' class='breadchumb-home'>Home</a></li>";
     if (!checkHomePage()) {
         return "{$home} {$link} <li><span></span>" . PageTitle . "</li>";
     } else {
         return "<li><span></span>" . PageTitle . "</li>";
     }
 }
示例#2
0
		<tbody>
		<?php 
$db = new FQuery();
$db->connect();
$sql = $db->select(FDBPrefix . 'permalink', '*', '', 'locker DESC');
$no = 1;
while ($qr = mysql_fetch_array($sql)) {
    if ($qr['locker'] == 1) {
        $stat1 = "selected";
        $stat2 = "";
    } else {
        $stat2 = "selected";
        $stat1 = "";
    }
    $status = "\n\t\t\t\t<p class='switch'>\n\t\t\t\t\t<label class='cb-enable {$stat1}'><span>&nbsp;Lock&nbsp;</span></label>\n\t\t\t\t\t<label class='cb-disable {$stat2}'><span>Unlock</span></label>\n\t\t\t\t\t<input type='text' value='{$qr['id']}' id='id' class='invisible'><input type='text' value='stat' id='type' class='invisible'>\n\t\t\t\t</p>";
    $name = "<a class='tips' data-placement='right' title='" . Edit . "' href='?app=permalink&act=edit&id={$qr['id']}'>{$qr['permalink']}</a>";
    $permalink = "<a class='tips' data-placement='right' title='" . Edit . "' href='?app=permalink&act=edit&id={$qr['id']}'>{$qr['link']}</a>";
    $check = "<input type='checkbox' name='check[]' value='{$qr['id']}' rel='ck'>";
    $menu = menuInfo("name", null, "{$qr['pid']}");
    if (empty($menu)) {
        $menu = "Default";
    }
    echo "<tr>";
    echo "<td align='center'>{$check}</td><td>{$name}</td><td>{$permalink}</td><td align=center>{$status}</td><td align='center'><span class='tips' data-placement='top' title='{$menu}'>{$qr['pid']}</span></td>";
    echo "</tr>";
    $no++;
}
?>
        </tbody>			
	</table>
</form>
示例#3
0
文件: office.php 项目: mul14/FiyoCMS
<?php

/**
* @version		2.0
* @package		Fiyo CMS
* @copyright	Copyright (C) 2014 Fiyo CMS.
* @license		GNU/GPL, see LICENSE.txt
* @description	
**/
defined('_FINDEX_') or die('Access Denied');
$id = app_param('id');
$contact = new Contact() or die;
//$contact -> send(@$_POST['name'],@$_POST['email'],@$_POST['text'],@$_POST['send'],@$_POST['to']);
$param = menuInfo('parameter');
$email = parse_param('office_email', $param);
$ph1 = parse_param('office_phone1', $param);
$ph2 = parse_param('office_phone2', $param);
$addr = parse_param('office_address', $param);
$text = parse_param('office_text', $param);
$fax = parse_param('office_fax', $param);
$map = parse_param('office_map', $param);
?>

<script>
function reloadCaptcha() {
	document.getElementById('captcha').src = document.getElementById('captcha').src+ '?' +new Date();
}

$(function() {
	$('.send_contact').click(function() {	
		var name = $("#contact-name").val();
示例#4
0
文件: site.php 项目: mul14/FiyoCMS
     if ($pid == menuInfo('id')) {
         define('Page_ID', $pid);
     } else {
         if ($pid = check_permalink('link', $link, 'pid')) {
             define('Page_ID', $pid);
         } else {
             if (isset($_GET['pid']) and is_numeric($_GET['pid'])) {
                 define('Page_ID', pageInfo($_GET['pid'], 'id'));
             } else {
                 define('Page_ID', oneQuery('menu', 'global', 1, 'id'));
             }
         }
     }
 } else {
     if (SEF_URL) {
         if (!empty($pid) and $pid == menuInfo('id')) {
             define('Page_ID', $pid);
         } else {
             if (isset($_GET['pid']) and is_numeric($_GET['pid'])) {
                 define('Page_ID', pageInfo($_GET['pid'], 'id'));
             } else {
                 $pid = @check_permalink('permalink', $_REQUEST['link'], 'pid');
                 if ($pid == 0) {
                     $pid = oneQuery('menu', 'global', 1, 'id');
                 }
                 if ($pid == 0) {
                     $pid = oneQuery('menu', 'home', 1, 'id');
                 }
                 define('Page_ID', $pid);
             }
         }
示例#5
0
         $i++;
     }
     $lcat = strtolower($lcat);
     $item = articleInfo('title');
     add_permalink($item, $lcat, $page);
 } else {
     if ($view == 'category' or $view == 'catlist') {
         $icat = categoryInfo('id');
         $ncat = categoryInfo('name');
         $page = menuInfo('id', "?app=article&view=category&id={$icat}");
         $lcat = "{$ncat}";
         $i = 1;
         while (empty($page) and !check_permalink('link', getLink()) and $i < 10 and $icat != 0) {
             $icat = categoryInfo('parent_id', $icat);
             $ncat = categoryInfo('name', $icat);
             $page = menuInfo('id', "?app=article&view=category&id={$icat}");
             if ($icat == 0) {
                 break;
             }
             $lcat = "{$ncat}/{$lcat}";
             $i++;
         }
         $lcat = strtolower($lcat);
         $item = articleInfo('title');
         if (_FEED_ == 'rss') {
             add_permalink("{$lcat}", "", "", "rss");
         } else {
             add_permalink($lcat, '', $page);
         }
     } else {
         if ($view == "archives") {