コード例 #1
0
ファイル: index.php プロジェクト: phplucidframe/phplucidframe
<?php

/**
 * The index.php (required) serves as the front controller for the requested page,
 * initializing the base resources needed to run the page
 */
$pageTitle = _t('Generic Form Example');
include 'action.php';
include 'query.php';
?>
<!DOCTYPE html>
<html>
<head>
    <title><?php 
echo _title($pageTitle);
?>
</title>
    <?php 
include _i('inc/tpl/head.php');
?>
</head>
<body>
    <?php 
include 'view.php';
?>
</body>
</html>
コード例 #2
0
    if (!$xPath->importFromString($xmlSource)) {
        echo $xPath->getLastError();
        exit;
    }
    _title("Following was imported:");
    echo $xPath->exportAsHtml();
    _title("Get some content");
    echo "Last text part in &lt;AAA&gt;: '" . $xPath->wholeText('/AAA[1]', -1) . "'<br>\n";
    echo "All the text in  &lt;AAA&gt;: '" . $xPath->wholeText('/AAA[1]') . "'<br>\n";
    echo "The attibute value  in  &lt;BBB&gt; using getAttributes('/AAA[1]/BBB[1]', 'FOO'): '" . $xPath->getAttributes('/AAA[1]', 'FOO') . "'<br>\n";
    echo "The attibute value  in  &lt;BBB&gt; using getData('/AAA[1]/@FOO'): '" . $xPath->getData('/AAA[1]/@FOO') . "'<br>\n";
    _title("Append some additional XML below /AAA/BBB:");
    $xPath->appendChild('/AAA[1]/BBB[1]', '<CCC> Step 1. Append new node </CCC>', $afterText = FALSE);
    $xPath->appendChild('/AAA[1]/BBB[1]', '<CCC> Step 2. Append new node </CCC>', $afterText = TRUE);
    $xPath->appendChild('/AAA[1]/BBB[1]', '<CCC> Step 3. Append new node </CCC>', $afterText = TRUE);
    echo $xPath->exportAsHtml();
    _title("Insert some additional XML below <AAA>:");
    $xPath->reindexNodeTree();
    $xPath->insertChild('/AAA[1]/BBB[1]', '<BB> Step 1. Insert new node </BB>', $shiftRight = TRUE, $afterText = TRUE);
    $xPath->insertChild('/AAA[1]/BBB[1]', '<BB> Step 2. Insert new node </BB>', $shiftRight = FALSE, $afterText = TRUE);
    $xPath->insertChild('/AAA[1]/BBB[1]', '<BB> Step 3. Insert new node </BB>', $shiftRight = FALSE, $afterText = FALSE);
    echo $xPath->exportAsHtml();
    _title("Replace the last <BB> node with new XML data '&lt;DDD&gt; Replaced last BB &lt;/DDD&gt;':");
    $xPath->reindexNodeTree();
    $xPath->replaceChild('/AAA[1]/BB[last()]', '<DDD> Replaced last BB </DDD>', $afterText = FALSE);
    echo $xPath->exportAsHtml();
    _title("Replace second <BB> node with normal text");
    $xPath->reindexNodeTree();
    $xPath->replaceChildByData('/AAA[1]/BB[2]', '"Some new text"');
    echo $xPath->exportAsHtml();
}
コード例 #3
0
    $_html['id'] = $_rows['tg_id'];
    $_html['fromuser'] = $_rows['tg_fromuser'];
    $_html['content'] = $_rows['tg_content'];
    $_html['flower'] = $_rows['tg_flower'];
    $_html['date'] = $_rows['tg_date'];
    $_html = _html($_html);
    $_html['count'] += $_html['flower'];
    ?>
			<tr><td><?php 
    echo $_html['fromuser'];
    ?>
</td><td><img src="images/x4.gif" alt="花朵" /> x <?php 
    echo $_html['flower'];
    ?>
朵</td><td><?php 
    echo _title($_html['content']);
    ?>
</td><td><?php 
    echo $_html['date'];
    ?>
</td><td><input name="ids[]" value="<?php 
    echo $_html['id'];
    ?>
" type="checkbox" /></td></tr>
			<?php 
}
_free_result($_result);
?>
			<tr><td colspan="5">共<strong><?php 
echo $_html['count'];
?>
コード例 #4
0
ファイル: index.php プロジェクト: phplucidframe/phplucidframe
<?php

/**
 * The index.php (required) serves as the front controller for the requested page,
 * initializing the base resources needed to run the page
 */
include 'query.php';
?>
<!DOCTYPE html>
<html>
<head>
    <title><?php 
echo _title();
?>
</title>
    <?php 
include _i('inc/tpl/head.php');
?>
</head>
<body>
    <?php 
include 'view.php';
?>
</body>
</html>
<script type="text/javascript">
    LC.Page.Home.init();
</script>
コード例 #5
0
 * @since       PHPLucidFrame v 1.0.0
 * @copyright   Copyright (c), PHPLucidFrame.
 * @author      Sithu K. <*****@*****.**>
 * @link        http://phplucidframe.com
 * @license     http://www.opensource.org/licenses/mit-license.php MIT License
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE
 */
?>
<!DOCTYPE html>
<html lang="<?php 
echo _lang();
?>
">
<head>
    <title><?php 
echo _title('Site Error');
?>
</title>
    <?php 
include _i('inc/tpl/head.php');
?>
</head>
<body>
    <?php 
_msg($error->message, isset($error->type) ? $error->type : 'error');
?>
</body>
</html>
コード例 #6
0
<?php

if (!defined('__FP_UNIT')) {
    return;
}
$posts = Mage::getResourceModel('wordpress/post_collection')->addIsViewableFilter()->load();
_title('Post Collection', 2);
echo '<ul>';
foreach ($posts as $post) {
    echo sprintf('<li><a href="%s">%s</a> (%s)</li>', $post->getUrl(), $post->getPostTitle(), implode(', ', $post->getCategoryIds()));
}
echo '</ul>';
コード例 #7
0
ファイル: index.php プロジェクト: zhangwenhua029/forum-2
?>
      
      <div id="list">
      	<h2>帖子列表</h2>
            <a href="post.php" class="post">发表帖子</a>
            <ul class="article">
            	<?php 
$_htmllist = array();
while (!!($_rows = _fetch_array_list($_result))) {
    $_htmllist['id'] = $_rows['tg_id'];
    $_htmllist['type'] = $_rows['tg_type'];
    $_htmllist['readcount'] = $_rows['tg_readcount'];
    $_htmllist['commentcount'] = $_rows['tg_commentcount'];
    $_htmllist['title'] = $_rows['tg_title'];
    $_htmllist = _html($_htmllist);
    echo '<li class="icon' . $_htmllist['type'] . '"><em>阅读数(<strong>' . $_htmllist['readcount'] . '</strong>) 评论数(<strong>' . $_htmllist['commentcount'] . '</strong>)</em> <a href="article.php?id=' . $_htmllist['id'] . '">' . _title($_htmllist['title'], 20) . '</a></li>';
}
_free_result($_result);
?>
            	
            </ul>
            <?php 
//_padding()函数调用分页,1:表示数字分页,2:表示文本分页
_paging(2);
?>
      </div>
      
      <div id="user">
      	<h2>新进会员</h2>
            <dl>
            	<dd class="user"><?php 
コード例 #8
0
		<table cellspacing="1">
			<tr><th>发信人</th><th>短信内容</th><th>时间</th><th>状态</th><th>操作</th></tr>
			<?php 
$_html = array();
while (!!($_rows = _fetch_array_list($_result))) {
    $_html['id'] = $_rows['tg_id'];
    $_html['fromuser'] = $_rows['tg_fromuser'];
    $_html['content'] = $_rows['tg_content'];
    $_html['date'] = $_rows['tg_date'];
    $_html = _html($_html);
    if (empty($_rows['tg_state'])) {
        $_html['state'] = '<img src="images/read.gif" alt="未读" title="未读" />';
        $_html['content_html'] = '<strong>' . _title($_html['content'], 14) . '</strong>';
    } else {
        $_html['state'] = '<img src="images/noread.gif" alt="已读 title="已读" />';
        $_html['content_html'] = _title($_html['content'], 14);
    }
    ?>
			<tr><td><?php 
    echo $_html['fromuser'];
    ?>
</td><td><a href="member_message_detail.php?id=<?php 
    echo $_html['id'];
    ?>
" title="<?php 
    echo $_html['content'];
    ?>
"><?php 
    echo $_html['content_html'];
    ?>
</a></td><td><?php 
コード例 #9
0
        $_html['friend'] = $_html['touser'];
        if (empty($_html['state'])) {
            $_html['state_html'] = '<span style="color:blue;">对方未验证</a>';
        } else {
            $_html['state_html'] = '<span style="color:green;">通过</span>';
        }
    }
    ?>
			<tr><td><?php 
    echo $_html['friend'];
    ?>
</td><td title="<?php 
    echo $_html['content'];
    ?>
"><?php 
    echo _title($_html['content'], 14);
    ?>
</td><td><?php 
    echo $_html['date'];
    ?>
</td><td><?php 
    echo $_html['state_html'];
    ?>
</td><td><input name="ids[]" value="<?php 
    echo $_html['id'];
    ?>
" type="checkbox" /></td></tr>
			<?php 
}
_free_result($_result);
?>
コード例 #10
0
ファイル: header.php プロジェクト: ghahremany/linkam
});
</script>
</head>
<body>
    <div class="navbar navbar-fixed-top navipage">
    <div class="navbar-inner navibar">
    <div class="container">
    <h1>
		<a href="<?php 
_site_url();
?>
" class="bg-pic logo" title="<?php 
_title();
?>
" ><?php 
_title();
?>
</a>
    </h1>
    
    <ul class="nav navilinks">
    	<li class="navilink actives">
        	<a href="links/popular.html">داغ ترین ها</a>        </li>
    	<li class="navilink ">
        	<a href="<?php 
_site_url();
?>
box.php" targer="_blank">لینک باکس</a>        </li>
       	<li class="navilink ">
        	<a href="javascript:popUp('<?php 
_site_url();
コード例 #11
0
ファイル: shortcuts.php プロジェクト: evilgeny/bob
/**
 * Detect title id by template params and returns title string
 *
 * @param	list		$templateNames
 * @param	list		$templateArgs
 * @return string
 */
function smartTitle(array $templateNames, array $templateArgs)
{
    static $conf = array();
    if (!$conf) {
        $conf = (include_once ROOT_DIR . '/config/title.php');
    }
    foreach ($conf as $titleId => $rec) {
        if (fnmatch("*" . @$rec['match_uri'] . "*", $_SERVER['REQUEST_URI'])) {
            if (isset($rec['match_host'])) {
                if (strstr($_SERVER['SERVER_NAME'], $rec['match_host'])) {
                    return _title(@$rec['title'], $templateArgs, @$rec['reverse']);
                } else {
                    continue;
                }
            } else {
                return _title(@$rec['title'], $templateArgs, @$rec['reverse']);
            }
        }
    }
    return '';
}
コード例 #12
0
ファイル: splider.php プロジェクト: yukisky/MultiHttpRequest
                 $data[$key] = "images/" . md5($detailArr[1][0]) . ".jpg";
                 if (!file_exists($data[$key])) {
                     $images_urls[$data[$key]] = $base . $detailArr[1][0];
                     //file_put_contents($data[$key],$mp->get_content($base.$detailArr[1][0]));
                 }
                 break;
             case 'product_description':
                 $data[$key] = trim(strip_tags($detailArr[1][0]));
                 break;
             default:
                 $data[$key] = $detailArr[1][0];
                 break;
         }
     }
     //产品url
     $data['product_url'] = _title($data['product_name']);
     //转义采集后的数据
     foreach ($data as $_k => $_v) {
         $data[$_k] = addslashes($_v);
     }
     //入库
     $r = mysql_query("\n\t\t\t\t\t\t\tinsert into `content` values(\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t'{$data['meta_title']}',\n\t\t\t\t\t\t\t'{$data['meta_keywords']}',\n\t\t\t\t\t\t\t'{$data['meta_description']}',\n\t\t\t\t\t\t\t'{$data['product_name']}',\n\t\t\t\t\t\t\t'{$data['product_image']}',\n\t\t\t\t\t\t\t'{$data['product_price']}',\n\t\t\t\t\t\t\t'{$data['product_description']}',\n\t\t\t\t\t\t\t'{$data['product_url']}')");
     //打印log
     _flush($j++ . "|" . $r . "|" . $data['product_name'] . "\n");
     //_flush($data);
 }
 //远程图片本地化
 $mp->set_urls($images_urls);
 $images = $mp->start();
 foreach ((array) $images as $image_key => $image_value) {
     _flush($image_key . "\n");