コード例 #1
0
ファイル: pouet-user.php プロジェクト: neodyme60/pouet2.0
 function PrintLinkedName() {
   $classes = array("user");
   if ((time() - strtotime($this->lastLogin)) < 5 * 60) $classes[] = "online";
   if ($this->IsBanned()) $classes[] = "banned";
   //return "<a href='user.php?who=".(int)$this->id."' class='".implode(" ",$classes)."'>"._html($this->nickname)."</a>";
   return sprintf("<a href='user.php?who=%d' class='%s'>%s</a>",$this->id,implode(" ",$classes),_html($this->nickname));
 }
コード例 #2
0
ファイル: buttons.php プロジェクト: neodyme60/pouet2.0
 function Render()
 {
   echo "\n\n";
   echo "<div class='pouettbl' id='".$this->uniqueID."'>\n";
   $type = "";
   foreach($this->buttons as $b)
   {
     if ($type != $b->type)
     {
       if($type)
       {
         echo "</ul>\n";
         echo "</div>\n";
       }
       echo "<h2>"._html($b->type)."</h2>\n";
       echo "<div class='content'>\n";
       echo "<ul>\n";
       $type = $b->type;
     }
     echo "  <li><a href='"._html($b->url)."'><img src='".POUET_CONTENT_URL."buttons/".$b->img."' title='"._html($b->alt)."' alt='"._html($b->alt)."'/></a></li>\n";
   }
   echo "</ul>\n";
   echo "</div>\n";
   echo "</div>\n";
 }
コード例 #3
0
ファイル: faq.php プロジェクト: neodyme60/pouet2.0
  function RenderBody()
  {
    echo "<div class='content' id='faq_toc'>\n";
    $lastType = "";
    foreach($this->entries as $e)
    {
      if ($lastType != $e->category)
      {
        if ($lastType)
          echo "</ul>\n";
        echo "<h3>"._html($e->category)."</h3>\n";
        $lastType = $e->category;
        echo "<ul>\n";
      }
      echo "<li><a href='#faq"._html($e->id)."'>".$e->question."</a></li>\n";
    }
    echo "</ul>\n";
    echo "</div>\n";

    $lastType = "";
    foreach($this->entries as $e)
    {
      if ($lastType != $e->category)
      {
        if ($lastType)
          echo "</dl>\n";
        echo "<h2>:: "._html($e->category)."</h2>\n";
        $lastType = $e->category;
        echo "<dl class='faq'>\n";
      }
      echo "<dt id='faq"._html($e->id)."'>:: "._html($e->category)." :: ".$e->question."</dt>\n";
      echo "<dd>".$e->answer."</dd>\n";
    }
    echo "</dl>\n";
  }
コード例 #4
0
ファイル: topic.php プロジェクト: neodyme60/pouet2.0
  function RenderBody() {
    global $POSTS_PER_PAGE;
    global $THREAD_CATEGORIES;
    global $currentUser;

    echo "<div class='threadcategory'>";
    echo "<b>category:</b> "._html($this->topic->category);
    if ($currentUser && $currentUser->CanEditBBS())
    {
      printf(" [<a href='admin_topic_edit.php?which=%d' class='adminlink'>edit</a>]\n",$this->id);
    }
    printf(" [<a href='gloperator_log.php?which=%d&amp;what=topic'>glöplog</a>]\n",$this->id);


    echo "</div>\n";

    if ($this->postcount > $POSTS_PER_PAGE) {
      echo $this->paginator->RenderNavbar();
    } else {
      echo "<div class='blank'>&nbsp;</div>\n";
    }

    foreach ($this->posts as $c) {
      $p = $c->post;
      $p = parse_message($p);
      echo "<div class='content cite-".$c->user->id."' id='c".$c->id."'>".$p."</div>\n";
      echo "<div class='foot'><span class='tools' data-cid='".$c->id."'></span> added on the <a href='topic.php?post=".$c->id."'>".$c->added."</a> by ".
        $c->user->PrintLinkedName()." ".$c->user->PrintLinkedAvatar()."</div>\n\n";
    }

    if ($this->postcount > $POSTS_PER_PAGE) {
      echo $this->paginator->RenderNavbar();
    }
  }
コード例 #5
0
ファイル: box-index-news.php プロジェクト: neodyme60/pouet2.0
 function Render() {
   echo "<div class='pouettbl ".$this->uniqueID."'>\n";
   echo " <h3><a href='".$this->link."'>"._html($this->title)."</a></h3>\n";
   echo " <div class='content'>\n".str_replace("<br>","<br/>",$this->content)."\n</div>\n";
   echo " <div class='foot'>lobstregated at <a href='http://www.bitfellas.org/'>BitFellas.org</a> on ".($this->timestamp)."</div>\n";
   echo "</div>\n";
 }
コード例 #6
0
ファイル: format.php プロジェクト: juanretamales/Bits
 public function bitsList($bits)
 {
     $html = '<ul>';
     $count = 2;
     foreach ($bits as $bit) {
         $settings = json_decode($bit->meta);
         $sampleCode = $bit->javascript ? $bit->javascript : ($bit->html ? $bit->html : ($bit->css ? $bit->css : false));
         if ($sampleCode) {
             $compressed = preg_replace("/\n/", '', preg_replace("/\t/", '', substr(base64_decode($sampleCode), 0, 200)));
             $sampleCode = '<pre class="sample-code">' . _html($compressed) . '</pre>';
         } else {
             $sampleCode = '';
         }
         if ($settings->bit_description) {
             $sampleCode = '<pre class="sample-code">' . _html($settings->bit_description) . '</pre>';
         }
         $klass = $count % 2 == 0 ? 'even' : 'odd';
         $html .= '<li class="' . $klass . '"><a href="' . home_url('code/bit/' . $bit->slug . '/' . $bit->latestVersion) . '" class="block-link">';
         $html .= '<div class="bit-title group">';
         $html .= '<p class="pull-left code-font">' . $settings->bit_title . ' <span>v' . $bit->latestVersion . '</span></p>';
         $html .= '<time class="pull-right" datetime="' . $bit->created . '">' . timeAgo($bit->created) . '</time>';
         $html .= '</div>';
         $html .= '<div class="bit-sample">';
         $html .= $sampleCode;
         $html .= '</div>';
         $html .= '</a></li>';
         $count++;
     }
     $html .= '</ul>';
     return $html;
 }
コード例 #7
0
ファイル: party_results.php プロジェクト: neodyme60/pouet2.0
 function RenderContent()
 {
   if ($_GET["font"]=="none")
   {
     echo "<pre>";
     echo _html( process_ascii( file_get_contents( get_local_partyresult_path( $_GET["which"], $_GET["when"] ) ) ) );
     echo "</pre>";
   }
   else
     printf("<img src='img_ascii.php?results=%d&amp;year=%d&amp;font=%d' alt='nfo'/>\n",$_GET["which"],$_GET["when"],$_GET["font"]);
 }
コード例 #8
0
  function PouetBoxSubmitProdInfo( $id )
  {
    parent::__construct();


    $this->prod = PouetProd::Spawn( $id );
    $a = array(&$this->prod);
    PouetCollectPlatforms( $a );

    $this->title = "submit things for this prod: "._html($this->prod->name);
  }
コード例 #9
0
  function PouetBoxAdminEditPartyEdition( $id, $year )
  {
    parent::__construct();

    $this->id = $id;
    $this->year = $year;

    $this->party = PouetParty::Spawn( $this->id );

    $this->title = sprintf("edit this party: %s %04d",_html($this->party->name),$this->year);
  }
コード例 #10
0
  function PouetBoxAdminEditTopic( $id )
  {
    parent::__construct();
    $this->id = (int)$id;
    $this->uniqueID = "pouetbox_edittopic";
    $this->topic = SQLLib::SelectRow(sprintf_esc("select * from bbs_topics where id = %d",$this->id));
    $this->title = "edit this topic: "._html($this->topic->topic);
    $this->formifier = new Formifier();
    $this->fields = array();

    $row = SQLLib::selectRow("DESC bbs_topics category");
    preg_match_all("/'([^']+)'/",$row->Type,$m);
    $this->categories = $m[1];
  }
コード例 #11
0
ファイル: party.php プロジェクト: neodyme60/pouet2.0
  function RenderContent()
  {
    global $currentUser;

    if ($this->party->web)
      printf("[<a href='%s'>web</a>]\n",_html($this->party->web));
    if(file_exists($this->party->GetResultsLocalFileName($this->year)))
      echo $this->party->RenderResultsLink( $this->year );
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+results</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->download)
      echo "[<a href='".$this->partylinks->download."'>download</a>]\n";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+download</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->slengpung)
      echo " [<a href='http://www.slengpung.com/?eventid=".(int)$this->partylinks->slengpung."'>slengpung</a>]";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+slengpung</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->csdb)
      echo " [<a href='http://csdb.dk/event/?id=".(int)$this->partylinks->csdb."'>csdb</a>]";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+csdb</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->zxdemo)
      echo " [<a href='http://zxdemo.org/party.php?id=".(int)$this->partylinks->zxdemo."'>zxdemo</a>]";
    //else if ($currentUser && $currentUser->CanSubmitItems())
    //  printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+zxdemo</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->demozoo)
      echo " [<a href='http://demozoo.org/parties/".(int)$this->partylinks->demozoo."/'>demozoo</a>]";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+demozoo</a>]\n",$this->party->id,$this->year);

    if($this->partylinks->artcity)
      echo " [<a href='http://artcity.bitfellas.org/index.php?a=search&type=tag&text=".rawurlencode($this->partylinks->artcity)."'>artcity</a>]";
    else if ($currentUser && $currentUser->CanSubmitItems())
      printf(" [<a class='submitadditional' href='submit_party_edition_info.php?which=%d&amp;when=%d'>+artcity</a>]\n",$this->party->id,$this->year);

    if ($currentUser && $currentUser->CanEditItems())
    {
      printf(" [<a href='admin_party_edit.php?which=%d' class='adminlink'>edit</a>]\n",$this->party->id);
      printf(" [<a href='admin_party_edition_edit.php?which=%d&amp;when=%d' class='adminlink'>edit year</a>]\n",$this->party->id,$this->year);
    }
    printf(" [<a href='gloperator_log.php?which=%d&amp;what=party'>glöplog</a>]\n",$this->party->id);

  }
コード例 #12
0
ファイル: prod_nfo.php プロジェクト: neodyme60/pouet2.0
 function RenderBody()
 {
   $title = "nfo added by "._html($this->nfo->user->nickname)." on "._html($this->nfo->added);
   echo "<div class='content' title='".$title."'>\n";
   if ($_GET["font"]=="none")
   {
     echo "<pre>";
     $text = file_get_contents( get_local_nfo_path( $_GET["which"] ) );
     echo _html( process_ascii( $text ) );
     echo "</pre>";
   }
   else
     printf("<img src='img_ascii.php?nfo=%d&amp;font=%d' alt='nfo'/>\n",$_GET["which"],$_GET["font"]);
   echo "</div>\n";
 }
コード例 #13
0
ファイル: global.function.php プロジェクト: vagsy/demoset
/**
*_html()函数表示对字符串进行HTML过滤显示,如果是数组按
数组的方式过滤,如果是单独的字符串,那么就按单独的字符串过滤
*@param unknown_type $_string
*/
function _html($_string)
{
    if (is_array($_string)) {
        //判断是否为数组
        foreach ($_string as $_key => $_value) {
            //$_key数组下标值
            $_string[$_key] = _html($_value);
            //这里采用了递归,如果不理解,那么还是用htmlspecialchars
        }
    } else {
        //普通字符串
        $_string = htmlspecialchars($_string);
    }
    return $_string;
}
コード例 #14
0
 function RenderBody() {
   echo "<ul class='boxlist'>\n";
   for($i=0; $i < min( count($this->jsonData),$this->limit); $i++)
   {
     echo "<li>\n";
     $p = "sucks";
     if($this->jsonData[$i]['status'] == "lost"   && $this->jsonData[$i]['intent'] == "lose weight") $p = "rulez";
     if($this->jsonData[$i]['status'] == "gained" && $this->jsonData[$i]['intent'] == "gain weight") $p = "rulez";
     if($this->jsonData[$i]['status'] == "hold"   && $this->jsonData[$i]['intent'] == "hold weight") $p = "rulez";
     if($this->jsonData[$i]['status'] == "hold"   && $this->jsonData[$i]['intent'] != "hold weight") $p = "isok";
     echo "<img src='".POUET_CONTENT_URL."gfx/".$p.".gif' alt='".$p."' />\n";
     echo "<a href='"._html($this->jsonData[$i]['url'])."'>"._html($this->jsonData[$i]['name'])."</a> "._html(strip_tags($this->jsonData[$i]['message']));
     echo "</li>\n";
   }
   echo "</ul>\n";
 }
コード例 #15
0
ファイル: box-bbs-open.php プロジェクト: neodyme60/pouet2.0
  function RenderBody()
  {
    global $currentUser;
    if (!get_login_id())
    {
      require_once("box-login.php");
      $box = new PouetBoxLogin();
      $box->RenderBody();
    }
    else
    {
      if (!$currentUser->CanPostInBBS())
        return;

      echo "<form action='add.php' method='post'>\n";

      $csrf = new CSRFProtect();
      $csrf->PrintToken();

      echo "<div class='content'>\n";
      echo " <input type='hidden' name='type' value='bbs'>\n";

      echo " <label for='topic'>topic:</label>\n";
      echo " <input name='topic' id='topic'/>\n";

      echo " <label for='category'>category:</label>\n";
      echo " <select name='category' id='category'>\n";
      foreach($this->categories as $v)
        printf("<option value='%s'>%s</option>",_html($v),_html($v));
      echo " </select>\n";

      echo " <label for='message'>message:</label>\n";
      echo " <textarea name='message' id='message'></textarea>\n";

      echo " <div><a href='faq.php#BB Code'><b>BB Code</b></a> is allowed here</div>\n";
      echo "</div>\n";
      echo "<div class='foot'>\n";
      echo " <script language='JavaScript' type='text/javascript'>\n";
      echo " <!--\n";
      echo "   document.observe('dom:loaded',function(){ AddPreviewButton($('submit')); });\n";
      echo " //-->\n";
      echo " </script>\n";
      echo " <input type='submit' value='Submit' id='submit'>";
      echo "</div>\n";
      echo "</form>\n";
    }
  }
コード例 #16
0
 function RenderBody() {
   global $THREAD_CATEGORIES;
   echo "<table class='boxtable'>\n";
   $n = 0;
   foreach ($this->data as $r) {
     //if (get_setting("indexbbsnoresidue"))
     if ($this->hideResidue)
     {
       if ($r->category == "residue") continue;
     }
     printf("<tr class='%s'>\n",$r->closed?"closed":"");
     echo "  <td class='avatar'>".$r->firstuser->PrintLinkedAvatar()."</td>\n";
     echo "  <td class='category'>"._html($r->category)."</td>\n";
     echo "  <td class='topic'><a href='topic.php?which=".(int)$r->id."'>"._html($r->topic)."</a></td>\n";
     echo "  <td class='count' title='last post "._html(dateDiffReadable(time(),$r->lastpost))." ago - "._html($r->lastpost)."'>".$r->count."</td>\n";
     echo "  <td class='avatar'>".$r->lastuser->PrintLinkedAvatar()."</td>\n";
     echo "</tr>\n";
     if (++$n == $this->limit) break;
   }
   echo "</table>\n";
 }
コード例 #17
0
ファイル: admin.php プロジェクト: neodyme60/pouet2.0
  function Render()
  {
    global $currentUser;
    echo "\n\n";
    echo "<div class='pouettbl' id='".$this->uniqueID."'>\n";
    echo "<h2>i'm gonna wreck it !</h2>\n";
    echo "<ul class='boxlist'>\n";
    $actions = array(
      "recacheFrontPagePartial" => "flush front page cache",
      "recacheFrontPage" => "flush entire front page cache",
      "recacheTopDemos" => "recalculate top demo list",
    );
    foreach($actions as $k=>$v)
    {
      echo "  <li>";
      echo "<form method='post'>";

      $csrf = new CSRFProtect();
      $csrf->PrintToken();

      echo _html($v).": ";
      $func = "PouetAdmin_".$k."_Form";
      if (function_exists($func)) $func();
      
      echo "<input name='".$k."' type='submit' value='submit'/>";
      echo "</form>";
      echo "</li>\n";
    }
    echo "  <li><a href='admin_modification_requests.php'>process modification requests</a></li>";
    if ($currentUser->IsModerator())
    {
      echo "  <li><a href='admin_faq.php'>edit faq items</a></li>";
    }
    echo "</ul>\n";
    echo "</div>\n";
  }
コード例 #18
0
ファイル: box-login.php プロジェクト: neodyme60/pouet2.0
 function RenderBody() {
   if (!get_login_id())
   {
     echo "<div class='content loggedout'>\n";
     printf( "<a href='login.php?return=%s'>login via SceneID</a>",_html(rootRelativePath()) );
     echo "</div>\n";
   } else {
     global $currentUser;
     echo "<div class='content loggedin'>\n";
     echo "you are logged in as<br/>\n";
     echo $currentUser->PrintLinkedAvatar()." ";
     echo $currentUser->PrintLinkedName();
     echo "</div>\n";
     if ($currentUser->IsGloperator())
     {
       $req = SQLLib::SelectRow("select count(*) as c from modification_requests where approved is null")->c;
       if ($req)
       {
         echo "<div class='content notifications'>\n";
         echo "[ <a href='admin_modification_requests.php' class='adminlink'>";
         echo $req;
         if ($req==1)
           echo " request waiting!";
         else
           echo " requests waiting!";
         echo "</a> ]";
         echo "</div>\n";
       }
     }
     echo "<div class='foot'>\n";
     echo "<a href='account.php'>account</a> ::\n";
     echo "<a href='customizer.php'>cust&ouml;omizer</a> ::\n";
     echo "<a href='logout.php'>logout</a>\n";
     echo "</div>";
   }
 }
コード例 #19
0
ファイル: pouet-rss.php プロジェクト: neodyme60/pouet2.0
 function AddItem( $params )
 {
   if (!$params["guid"])
     $params["guid"] = $params["link"];
   $node = $this->xml->channel->addChild("item");
   foreach($params as $k=>$v)
   {
     if(!$v) continue;
     switch($k)
     {
       case "enclosure":
         {
           $data = getimagesize(POUET_CONTENT_LOCAL . "/" . $v);
           $enc = $node->addChild("enclosure");
           $enc->addAttribute("url",POUET_CONTENT_URL . $v);
           $enc->addAttribute("length",filesize(POUET_CONTENT_LOCAL . "/" . $v));
           if ($data && $data["mime"])
             $enc->addAttribute("type",$data["mime"]);
         } break;
       case "guid":
         $node->addChild($k,_html($v))->addAttribute("isPermaLink",strstr($v,"://")===false?"false":"true");
         break;
       default:
         if (is_array($v))
         {
           foreach($v as $i)
             $node->addChild($k,_html($i),strstr($k,":")!==false ? $this->dtd : null);
         }
         else
         {
           $node->addChild($k,_html($v),strstr($k,":")!==false ? $this->dtd : null);
         }
         break;
     }
   }
 }
コード例 #20
0
  function RenderNavbar() {
    if ($this->numPages <= 1)
      return;
    echo "<div class='navbar'>\n";
    if ($this->page > 1)
      echo "  <div class='prevpage'><a href='".$this->url["path"]."?"._html(http_build_query( array_merge($this->query,array("page"=>$this->page - 1)) ))."'>previous page</a></div>\n";
    if ($this->page * $this->perPage < $this->itemCount)
      echo "  <div class='nextpage'><a href='".$this->url["path"]."?"._html(http_build_query( array_merge($this->query,array("page"=>$this->page + 1)) ))."'>next page</a></div>\n";
    echo "  <div class='selector'>";

    echo "  <form action='".$this->url["path"]."' method='get'>\n";
    foreach($this->query as $k=>$v)
      echo "  <input type='hidden' name='"._html($k)."' value='"._html($v)."'/>\n";
    echo "   go to page <select name='page'>\n";

    for ($x = 1; $x <= $this->numPages; $x++)
      echo "      <option value='".$x."'".($x==$this->page?" selected='selected'":"").">".$x."</option>\n";

    echo "   </select> of ".$this->numPages."\n";
    echo "  <input type='submit' value='Submit'/>\n";
    echo "  </form>\n";
    echo "  </div>\n";
    echo "</div>\n";
  }
コード例 #21
0
/**
 * _html() 函数表示对字符串进行HTML过滤显示,如果是数组按数组的方式过滤,
 * 如果是单独的字符串,那么就按单独的字符串过滤
 * @param unknown_type $_string
 */
function _html($_string)
{
    if (is_array($_string)) {
        foreach ($_string as $_key => $_value) {
            $_string[$_key] = _html($_value);
            //这里采用了递归,如果不理解,那么还是用htmlspecialchars
        }
    } else {
        $_string = htmlspecialchars($_string);
    }
    return $_string;
}
コード例 #22
0
            _alert_back('短信删除失败');
        }
    } else {
        _alert_back("此短信不存在!");
    }
    //删除
}
//根据id获取短信内容
$_sql = "SELECT \r\n\t\t\t\ttg_id, \r\n\t\t\t\ttg_fromuser,\r\n\t\t\t\ttg_content,\r\n\t\t\t\ttg_date,\r\n\t\t\t\ttg_state \r\n\t\t\tFROM \r\n\t\t\t\ttg_message\r\n\t\t\tWHERE \r\n\t\t\t\ttg_id='{$_GET['id']}'";
if (!!($_row = _fetch_array($_sql))) {
    $_html = array();
    $_html['id'] = $_row['tg_id'];
    $_html['fromuser'] = $_row['tg_fromuser'];
    $_html['content'] = $_row['tg_content'];
    $_html['date'] = $_row['tg_date'];
    $_html = _html($_html);
    if (empty($_row['tg_state'])) {
        //标记消息已读
        $_sql = "UPDATE tg_message SET tg_state = 1 WHERE tg_id='{$_GET['id']}'";
        _query($_sql);
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>多用户留言系统--短信内容</title>
<?php 
require ROOT_PATH . 'includes/title.inc.php';
?>
コード例 #23
0
ファイル: common.inc.php プロジェクト: xiaohuazheng/twbm1.0
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PWD', '123456');
define('DB_NAME', 'testguest');
_connect();
//创建数据库连接
_select_db();
//选择一款数据库
_set_names();
//选择字符集
//网站系统设置初始化
if (!!($_rows = _fetch_array("SELECT\n\t    tg_webname,\n\t\ttg_article,\n\t\ttg_blog,\n\t\ttg_photo,\n\t\ttg_skin,\n\t\ttg_string,\n\t\ttg_post,\n\t\ttg_re,\n\t\ttg_code,\n\t\ttg_register\n\tFROM\n\t\ttg_system\n\tWHERE\n\t\ttg_id=1\n\tLIMIT\n\t\t1"))) {
    $_system = array();
    $_system['webname'] = $_rows['tg_webname'];
    $_system['article'] = $_rows['tg_article'];
    $_system['blog'] = $_rows['tg_blog'];
    $_system['photo'] = $_rows['tg_photo'];
    $_system['skin'] = $_rows['tg_skin'];
    $_system['post'] = $_rows['tg_post'];
    $_system['re'] = $_rows['tg_re'];
    $_system['code'] = $_rows['tg_code'];
    $_system['register'] = $_rows['tg_register'];
    $_system['string'] = $_rows['tg_string'];
    $_system = _html($_system);
    //如果有skin的cookie那么就替代系统数据库的皮肤
    if ($_COOKIE['skin']) {
        $_system['skin'] = $_COOKIE['skin'];
    }
} else {
    exit('系统表异常,请管理员检查!');
}
コード例 #24
0
ファイル: index.php プロジェクト: zhangwenhua029/forum-2
require ROOT_PATH . "includes/header.inc.php";
?>
      
      <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>
コード例 #25
0
		</div>
		<div id="comment">
			<dl>
				<dt><strong class="cooking">做法</strong><strong class="comment" >评价</strong></dt>
			</dl>
			<p class="line"></p>		
				<?php 
while (!!($_rows2 = _fetch_array_list($_result2))) {
    $_html2 = array();
    $_html2['id'] = $_rows2['id'];
    $_html2['order_id'] = $_rows2['order_id'];
    $_html2['food_id'] = $_rows2['food_id'];
    $_html2['username'] = $_rows2['username'];
    $_html2['content'] = $_rows2['content'];
    $_html2['date_time'] = $_rows2['date_time'];
    $_html2 = _html($_html2);
    ?>
					<span>回复</span>
					<dl class="con"><?php 
    echo $_html2['content'];
    ?>
</dl>
					<dl class="username"><?php 
    echo $_html2['username'];
    ?>
</dl>
					<dl class="time"><?php 
    echo $_html2['date_time'];
    ?>
</dl>
					<div class="reply">
コード例 #26
0
ファイル: bbs.php プロジェクト: neodyme60/pouet2.0
  function Render() {
    echo "<table id='".$this->uniqueID."' class='boxtable pagedtable'>\n";
    $headers = array(
      "firstpost"=>"started",
      "userfirstpost"=>"by",
      "category"=>"category",
      "topic"=>"bbs topic",
      "count"=>"replies",
      "lastpost"=>"last post",
      "userlastpost"=>"by",
    );
    echo "<tr><th colspan='".count($headers)."'><h2>the oldskool pouët.net bbs</h2></th></tr>\n";
    echo "<tr class='sortable'>\n";
    foreach($headers as $key=>$text)
    {
      $out = sprintf("<th id='th_%s'><a href='%s' class='%s%s' id='%s'>%s</a></th>\n",
        $key,adjust_query_header(array("order"=>$key)),$_GET["order"]==$key?"selected":"",($_GET["order"]==$key && $_GET["reverse"])?" reverse":"","prodlistsort_".$key,$text);
      if ($key == "type" || $key == "name") $out = str_replace("</th>","",$out);
      if ($key == "platform" || $key == "name") $out = str_replace("<th>"," ",$out);
      echo $out;
    }
    echo "</tr>\n";

    foreach ($this->topics as $p) {
      echo "<tr>\n";

      echo " <td>";
      echo $p->firstpost;
      echo "</td>\n";

      echo " <td>";
      echo $p->firstuser->PrintLinkedAvatar()." ";
      echo $p->firstuser->PrintLinkedName();
      echo "</td>\n";

      echo " <td>"._html($p->category)."</td>\n";

      echo " <td class='topic'>";
      echo "<a href='topic.php?which=".(int)$p->id."'>"._html($p->topic)."</a>";
      echo "</td>\n";

      echo " <td>".$p->count."</td>\n";

      echo " <td title='"._html(dateDiffReadable(time(),$p->lastpost))." ago'>";
      echo $p->lastpost;
      echo "</td>\n";

      echo " <td>";
      echo $p->lastuser->PrintLinkedAvatar()." ";
      echo $p->lastuser->PrintLinkedName();
      echo "</td>\n";

      echo "</tr>\n";
    }

    $perPage = get_setting("bbsbbstopics");

    echo "<tr>\n";
    echo "<td class='nav' colspan=".(count($headers)).">\n";

    $this->page = ((int)$_GET["page"] ? $_GET["page"] : 1);
    if ($this->page > 1)
      echo "  <div class='prevpage'><a href='".adjust_query(array("page"=>($this->page - 1)))."'>previous page</a></div>\n";
    if ($this->page < ($this->count / $perPage))
      echo "  <div class='nextpage'><a href='".adjust_query(array("page"=>($this->page + 1)))."'>next page</a></div>\n";

    echo "  <select name='page'>\n";
    for ($x=1; $x<=($this->count / $perPage) + 1; $x++)
      printf("    <option value='%d'%s>%d</option>\n",$x,$x==$this->page?" selected='selected'":"",$x);
    echo "  </select>\n";
    echo "  <input type='submit' value='Submit'/>\n";
    echo "</td>\n";
    echo "</tr>\n";
    echo "</table>\n";
?>
<script type="text/javascript">
<!--
var threadCategories = $A([<?
foreach($this->categories as $v) echo "'"._js($v)."',";
?>]);
document.observe("dom:loaded",function(){
  var sel = new Element("select",{"id":"categoryFilter"});
  $("th_category").insert(sel);

  var q = location.href.toQueryParams();

  sel.add( new Option("-- filter to","") );
  threadCategories.each(function(item){
    sel.add( new Option(item,item) );
    if (item == q["category"])
      sel.selectedIndex = sel.options.length - 1;
  });
  sel.observe("change",function(){
    if (sel.selectedIndex == 0)
      location.href = "bbs.php";
    else
      location.href = "bbs.php?category=" + sel.options[ sel.selectedIndex ].value;
  });
});
//-->
</script>
<?
    return $s;
  }
コード例 #27
0
ファイル: index.php プロジェクト: JeanFred/intuition
$tabContent .= Html::openElement('div', array('class' => array('tab-pane', 'active' => $settingsIsFirst), 'id' => 'tab-settingsform')) . '<form action="' . $Tool->remoteBasePath . '" method="post" role="form" class="form-horizontal">
	<fieldset>
	<legend>' . $I18N->msg('settings-legend') . '</legend>
	<div class="form-group">
	<label class="col-sm-4 control-label">' . _html('choose-language') . _g('colon-separator') . '</label>
	<div class="col-sm-8">
	' . $dropdown . '
	</div>
	</div>

	<input type="hidden" name="action" value="prefset">
	<input type="hidden" name="returnto" value="' . htmlspecialchars($kgReq->getVal('returnto')) . '">
	<input type="hidden" name="returntoquery" value="' . htmlspecialchars($kgReq->getVal('returntoquery')) . '">
	<div class="form-group">
		<div class="col-sm-offset-4 col-sm-8">
			<input type="submit" class="btn btn-default btn-primary" value="' . _html('form-submit', 'general') . '">
		</div>
	</div>

</fieldset></form>
</div>';
// About tab
$about = '<div class="tab-pane" id="tab-about">';
$about .= '<a href="//translatewiki.net/wiki/Translating:Intuition">' . Html::element('img', array('src' => '//translatewiki.net/w/i.php?title=Special:TranslationStats&graphit=1&preview=&' . 'count=edits&scale=weeks&days=30&width=520&height=400&group=tsint-0-all', 'width' => 520, 'height' => 400, 'alt' => '', 'class' => 'pull-right')) . '</a>';
$about .= '' . '<div class="lead">' . $I18N->msg('usage') . '</div><ul>';
foreach ($I18N->getAllRegisteredDomains() as $domain) {
    $domainInfo = $I18N->getDomainInfo($domain);
    $title = $I18N->msg('title', $domain, $domain);
    if (isset($domainInfo['url'])) {
        $about .= '<li><a href="' . htmlspecialchars($domainInfo['url']) . '">' . htmlspecialchars($title) . '</a></li>';
    }
コード例 #28
0
  function RenderBody()
  {
    echo "<div class='content'/>";
    echo "  <p>To make sure you want to delete <b>this</b> party, type \"".$this->checkString."\" here:</p>";
    echo "  <input name='checkOrig' type='hidden' value='"._html($this->checkString)."'/>";
    echo "  <input id='check' name='check' autocomplete='no'/>";
    echo "</div>";
    echo "<div class='foot'/>";
    echo "  <input type='submit' value='Submit' />";
    echo "</div>";
    ?>
<script type="text/javascript">
document.observe("dom:loaded",function(){
  $("pouetbox_partydelete").up("form").observe("submit",function(e){
    if ($F("check") != "<?php 
echo _js($this->checkString);
?>
")
    {
      alert("Enter the verification string!");
      e.stop();
      return;
    }
    if (!confirm("ARE YOU REALLY SURE YOU WANT TO DELETE \"<?php 
echo _js($this->party->name);
?>
\"?!"))
      e.stop();
  });
});
</script>
    <?
  }
コード例 #29
0
ファイル: header.bare.php プロジェクト: neodyme60/pouet2.0
" media="screen" />
  <?if ( POUET_MOBILE ) {?>
  <link rel="stylesheet" href="<?php 
echo POUET_CONTENT_URL;
?>
styles/001/mobile.css?<?php 
echo filemtime(POUET_CONTENT_LOCAL . "styles/001/mobile.css");
?>
" type="text/css" />
  <meta name="viewport" content="width=device-width; initial-scale=1.0;" />
  <?}?>
  
<?
  if ($metaValues) foreach ($metaValues as $k=>$v)
  {
    printf("  <meta property=\"%s\" content=\"%s\"/>\n",$k,_html($v));
  }
?>  

  <script type="text/javascript">
  <!--
    var pixelWidth = screen.width;
    var Pouet = {};
    Pouet.isMobile = <?php 
echo POUET_MOBILE ? "true" : "false";
?>
;
  //-->
  </script>
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js"></script>
  <script type="text/javascript" src="./jsonp.js"></script>
コード例 #30
0
ファイル: prodlist.php プロジェクト: neodyme60/pouet2.0
///////////////////////////////////////////////////////////////////////////////

$q = new PouetBoxProdlistSelectors();
$q->Load();

$p = new PouetBoxProdlist();
$p->Load();
$TITLE = "prodlist";
if ($p->page > 1)
  $TITLE .= " :: page ".(int)$p->page;


require_once("include_pouet/header.php");
require("include_pouet/menu.inc.php");

echo "<div id='content'>\n";
echo "<form action='prodlist.php' method='get'>\n";

foreach($_GET as $k=>$v)
  if ($k != "type" && $k != "platform" && $k != "page")
    echo "<input type='hidden' name='"._html($k)."' value='"._html($v)."'/>\n";

if($q) $q->Render();
if($p) $p->Render();
echo "</form>\n";
echo "</div>\n";

require("include_pouet/menu.inc.php");
require_once("include_pouet/footer.php");
?>