コード例 #1
0
ファイル: mdl.comment.php プロジェクト: dalinhuang/shopexts
 function toUpdate(&$data)
 {
     if (!empty($data['comment'])) {
         $data['comment'] = safeHtml($data['comment']);
     }
     $rs = $this->db->query('SELECT * FROM sdb_comments WHERE comment_id=' . intval($data['comment_id']));
     $sql = $this->db->getUpdateSQL($rs, $data);
     return !$sql || $this->db->exec($sql);
 }
コード例 #2
0
<?php

$breadcrumbs = $tpl_breadcrumbs->getBreadcrumbs();
$bc_crumbs = '';
$bc_i = 0;
foreach ($breadcrumbs as $crumb) {
    $bc_i++;
    $strIcon = '';
    if ($crumb['icon']) {
        $strIcon .= sprintf('<i class="%s"></i>', $crumb['icon']);
    }
    if ($bc_i === count($breadcrumbs)) {
        $html = sprintf('<li class="active">%s%s</li>', $strIcon, safeHtml($crumb['title']));
    } else {
        $html = sprintf('<li>%s<a href="%s">%s</a></li>', $strIcon, safeUrl($crumb['linkurl']), safeHtml($crumb['title']));
    }
    $bc_crumbs .= $html;
}
?>
<div class="breadcrumbs" id="breadcrumbs">
  <script type="text/javascript">
  try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
  </script>

  <ul class="breadcrumb">
    <?php 
print $bc_crumbs;
?>
  </ul><!-- .breadcrumb -->

  <div class="nav-search" id="nav-search">
コード例 #3
0
ファイル: signin.tpl.php プロジェクト: setimouse/be-shop-pc
<?php

include TEMPLATE . 'mod/home/mod.nav.tpl.php';
?>

<div class="container">
  <div class="row">
    <div class="col-xs-12 col-md-6 col-md-offset-3">
      <div class="page-header">
        <h2>请登录</h2>
      </div>
      <form class="form-horizontal" role="form" method="post" action="/signin/commit">
        <input type="hidden" name="shopname" value="<?php 
echo safeHtml($tpl_shopname);
?>
" />
        <div class="form-group">
          <label for="username" class="col-sm-2 control-label">用户名</label>
          <div class="col-sm-10">
            <input type="text" class="form-control" name="username" id="username" placeholder="登录用户名">
          </div>
        </div>
        <div class="form-group">
          <label for="inputPassword" class="col-sm-2 control-label">密码</label>
          <div class="col-sm-10">
            <input type="password" class="form-control" name="password" id="inputPassword" placeholder="登录密码">
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-success">登录</button>
コード例 #4
0
function smarty_modifier_safehtml($content)
{
    return safeHtml($content);
}
コード例 #5
0
ファイル: setting.tpl.php プロジェクト: setimouse/be-shop-pc
          <button class="btn btn-success btn-sm" id="uploadicon"><i class="icon-plus"></i> 上传图标</button>
        </div>
        <input type="hidden" name="imgmd5" value="<?php 
echo safeHtml($tpl_shopinfo['imgmd5']);
?>
" />
        <input type="hidden" name="imgtype" value="<?php 
echo safeHtml($tpl_shopinfo['imgtype']);
?>
" />
      </div>
      <div class="form-group">
        <label for="tel" class="col-sm-2 col-md-2 control-label">电话</label>
        <div class="col-sm-3 col-md-3">
          <input type="tel" name="tel" class="form-control" value="<?php 
echo safeHtml($tpl_shopinfo['tel']);
?>
" id="tel" placeholder="电话">
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="submit" id="btn-submit-shopinfo" class="btn btn-primary"><i class="icon-ok"></i> 保存修改</button>
        </div>
      </div>
    </form>
  </div>
</div>
<form action="/upload-image" method="post" target="uploadImg" class="hide" enctype="multipart/form-data" class="form-search">
  <input type="file" name="img" id="imgfile" />
  <input type="hidden" name="context" value="icon" />
コード例 #6
0
ファイル: feed.php プロジェクト: alni/digital-signage-samples
 foreach ($_content["items"] as $item) {
     $content = "";
     // Default content (gCal event description)
     if (isset($item["content"]) && isset($item["content"]["content"])) {
         // If the item has a "content" with "content" then use it as the
         // gCal event description
         $content = $item["content"]["content"];
     } else {
         if (isset($item["summary"]) && isset($item["summary"]["content"])) {
             // Otherwise, if the item as a "summary" with content then use it
             // instead as the gCal event description
             $content = $item["summary"]["content"];
         }
     }
     if ($safeHtml) {
         $content = safeHtml($content);
     }
     $updated = null;
     // Default updated value
     if (isset($item["updated"])) {
         // If the item as an "updated" state, then use it as the
         // updated timestamp
         $updated = $item["updated"];
     } else {
         // Otherwise, use the "published" state as the updated timestamp
         $updated = $item["published"];
     }
     array_push($items, array("summary" => $item["title"], "updated" => date("c", $updated / 1000), "start" => array("dateTime" => date("c", $item["published"] / 1000)), "end" => array("dateTime" => date("c", $item["published"] / 1000)), "description" => $content));
 }
 $title = $_content["title"];
 // Use the Feed title as the default title
コード例 #7
0
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title><?php 
echo safeHtml($tpl_title);
?>
</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <!-- basic styles -->

        <link rel="stylesheet" href="/static/ace/css/bootstrap.min.css" />
        <link rel="stylesheet" href="/static/ace/css/font-awesome.min.css" />

        <!--[if IE 7]>
          <link rel="stylesheet" href="/static/ace/css/font-awesome-ie7.min.css" />
        <![endif]-->

        <!-- page specific plugin styles -->

        <!-- ace styles -->
        <link rel="stylesheet" href="/static/jquery-ui/jquery-ui.min.css" />

        <!-- fonts -->
        <!-- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,300" /> -->

        <link rel="stylesheet" href="/static/ace/css/ace.min.css" />
        <link rel="stylesheet" href="/static/ace/css/ace-rtl.min.css" />
        <link rel="stylesheet" href="/static/ace/css/ace-skins.min.css" />
コード例 #8
0
ファイル: mod.nav.tpl.php プロジェクト: setimouse/be-shop-pc
<nav class="container">
  <h3>66号店</h3>
  <ul>
    <li><a href="/">首页</a></li>
  </ul>
  <div class="nav-right">
  <?php 
if ($tpl_me) {
    ?>
    <div class="dropdown">
      <button class="btn btn-link dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
        <?php 
    echo safeHtml($tpl_me->v('username'));
    ?>
        <span class="caret"></span>
      </button>
      <ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="dropdownMenu1">
        <li role="presentation" class="text-right">
          <a role="menuitem" tabindex="-1" href="/signout">
            <i class="glyphicon glyphicon-log-out"></i> 登出
          </a>
        </li>
      </ul>
    </div>
  <?php 
}
?>
  </div>
</nav>
<style type="text/css">
nav h3 {float: left;}