當前位置: 首頁>>代碼示例>>PHP>>正文


PHP news函數代碼示例

本文整理匯總了PHP中news函數的典型用法代碼示例。如果您正苦於以下問題:PHP news函數的具體用法?PHP news怎麽用?PHP news使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了news函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: textResponse

/**
 * response text msg
 * @param $postObj
 * @return string
 */
function textResponse($postObj)
{
    $content = $postObj->Content;
    $contentStr = '';
    switch ($content) {
        case '你好':
            $contentStr = responseText($postObj, '你好 :-)');
            break;
        default:
            $contentStr .= news($postObj);
            break;
    }
    return $contentStr;
}
開發者ID:lampjian,項目名稱:wechat-quick-start,代碼行數:19,代碼來源:wechat.php

示例2: exec_Index

function exec_Index($app, $params)
{
    $navigation = navigation();
    $app->set('navigation', $navigation);
    $commits = recentcommits('next', 7, false);
    $commits .= "<li><hr /></li>\n";
    $commits .= recentcommits('experimental', 7, false);
    $commits .= "<li><hr /></li>\n";
    $commits .= recentcommits('master', 7, false);
    $app->set('recentcommits', $commits);
    $news = news(!isset($_GET['page']) || !is_numeric($_GET['page']) ? 0 : intval($_GET['page']), False, True);
    $app->set('news', $news);
    $app->render('index.php');
}
開發者ID:uzbl,項目名稱:uzbl-website,代碼行數:14,代碼來源:index.php

示例3: news

  <a class="pull-left" href="#">
    <img class="media-object" src="../../assets/simg/' . $img . '.jpg" alt="...">
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="niiith.php?clg=<?php 
echo news('National Institute Of Technology(NIT) Warangal');
?>
 &str=<?php 
echo stream('National Institute Of Technology(NIT) Warangal');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
開發者ID:abhilash-tango,項目名稱:collegeconnect,代碼行數:31,代碼來源:nitw.php

示例4: news

  <a class="pull-left" href="#">
    <img class="media-object" src="../../assets/simg/' . $img . '.jpg" alt="...">
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="nbitm.php?clg=<?php 
echo news('Indian Institute Of Information Technology(IIIT) Hyderabad');
?>
 &str=<?php 
echo stream('Indian Institute Of Information Technology(IIIT) Hyderabad');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
開發者ID:abhilash-tango,項目名稱:collegeconnect,代碼行數:31,代碼來源:bitm.php

示例5: news

  <a class="pull-left" href="#">
    <img class="media-object" src="../../assets/simg/' . $img . '.jpg" alt="...">
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</font></small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="nnalsar.php?clg=<?php 
echo news('Faculty Of Law DU ,Delhi');
?>
 &str=<?php 
echo stream('Faculty Of Law DU ,Delhi');
?>
">
              <h4>Post news about your college <small>  @ be rewsponsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div>
開發者ID:abhilash-tango,項目名稱:collegeconnect,代碼行數:31,代碼來源:fold.php

示例6: mysql_query

            $j++;
            $n = $aRow3[0];
            $k = $j % 7;
        }
        $wait_time = mysql_query("SELECT   persons.`name` AS operator,\r\n\t\t\t\t\t\t\t\t\t\tIFNULL((MAX(asterisk_incomming.wait_time)),0) AS max_wait_time,                \t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t IFNULL((ROUND(SUM(asterisk_incomming.wait_time)/COUNT(*),2)),0) AS sashualo,                                 \t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\tIFNULL((MIN(asterisk_incomming.wait_time)),0) AS min_wait_time   \r\n\t\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\tFROM  asterisk_incomming\r\n\t\t\t\t\t\t\t\tRIGHT  JOIN    users ON users.id=asterisk_incomming.user_id AND disconnect_cause!='ABANDON' AND DATE(asterisk_incomming.call_datetime)=DATE(NOW())\r\n\t\t\t\t\t\t\t\tLEFT JOIN persons ON persons.id=users.person_id\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tGROUP BY persons.`name`\r\n\t\t\t\t\t\t\t\tORDER BY sashualo DESC");
        $j = 0;
        while ($aRow4 = mysql_fetch_array($wait_time)) {
            $data[wait_time][xAxis][] = $aRow4[0];
            for ($i = 0; $i < 3; $i++) {
                $data[wait_time][series][$i][name] = 'lll';
                $data[wait_time][series][$i][type] = "column";
                $data[wait_time][series][$i][data][] = (double) $aRow4[$i + 1];
            }
        }
        $data[mytask] = mytask();
        $data[news] = news();
        $data[service_level] = service_level();
        $data[service_level_unansver] = service_level_unansver();
        echo json_encode($data);
        break;
    default:
        echo "null";
}
function mytask()
{
    $user_id = $_SESSION['USERID'];
    $group = checkgroup($user_id);
    $filter = '';
    if ($group != 2 && $group != 5) {
        $res_row = mysql_fetch_assoc(mysql_query("SELECT \tusers.id as person_id\r\n\t\t\t\t\t\t\t\t\t\t\tFROM \t`users`\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE \t`users`.`id` = {$user_id}"));
        $filter = "AND (task.responsible_user_id ='{$res_row['person_id']}')";
開發者ID:aleqsandre553,項目名稱:msgroup,代碼行數:31,代碼來源:main.action.php

示例7: news

  <a class="pull-left" href="#">
    <img class="media-object" src="../../assets/simg/' . $img . '.jpg" alt="...">
  </a>
  <div class="media-body">
    <h6 class="media-heading"><b>' . $name . '  </b><small>' . $kclg . ' <font face="Latha" size="1px">[posted on ' . $samay . ']</small></h6>
    ' . $kcom . '<br/><small>' . $delink . '</small>
  </div>
</div>';
    }
    $c = $c + 1;
}
?>
  </div>
  <div class="panel-footer">
    <form class="form-horizontal" role="form" method="post" action="niiith.php?clg=<?php 
echo news('Indian Institute of Technology(IIT) Roorkee');
?>
 &str=<?php 
echo stream('Indian Institute of Technology(IIT) Roorkee');
?>
">
              <h4>Post news about your college <small>  @ be responsible and help others</small></h4>
               <div class="form-group" style="padding:14px;">
                <textarea class="form-control" placeholder="@ feel free" name="niitk"></textarea>
              </div>
              
               <button class="btn btn-success pull-right" type="submit" name="subniitk" value="Post">Post</button><ul class="list-inline"><li><a href="#"><i class="glyphicon glyphicon-align-left"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-center"></i></a></li><li><a href="#"><i class="glyphicon glyphicon-align-right"></i></a></li></ul>
            </form>
  </div>
</div>
  </div></div>
開發者ID:abhilash-tango,項目名稱:collegeconnect,代碼行數:31,代碼來源:iitr.php

示例8: news

<div style="float: right; padding-left: 6px">
 <a href="devel09-pci.png">
  <img src="devel09-pci.png" width="405px" alt="Sample hwloc output">
</a></div>

<div style="float: right; clear: both"><!-- "clear: both" prevents news from going near the float image above -->
<?php 
# Lists are not mirrored - use an absolute URL
news("hwloc v1.11.1rc1 released", "New bugfix release", "http://www.open-mpi.org/community/lists/hwloc-announce/2015/10/0079.php");
news("hwloc v1.11.0 published", "New feature release", "http://www.open-mpi.org/community/lists/hwloc-announce/2015/06/0078.php");
news("The Best of lstopo published", "Best lstopo graphical outputs", "lstopo");
//news("hwloc v1.10.1 released",
//     "New stable release",
//     "http://www.open-mpi.org/community/lists/hwloc-announce/2015/01/0075.php");
news("Network Locality (netloc)", "New hwloc companion", "http://blogs.cisco.com/performance/the-network-locality-project-netloc/");
//news("hwloc tutorial material",
//     "Slides and code available",
//     "$topdir/projects/hwloc/tutorials");
?>
</div>

<p> The Portable Hardware Locality (hwloc) software package provides a
portable abstraction (across OS, versions, architectures, ...)  of the
hierarchical topology of modern architectures, including NUMA memory
nodes, sockets, shared caches, cores and simultaneous
multithreading. It also gathers various system attributes such as
cache and memory information as well as the locality of I/O devices
such as network interfaces, InfiniBand HCAs or GPUs.
It primarily aims at helping
applications with gathering information about modern computing
開發者ID:anhzhang,項目名稱:ompi-www,代碼行數:30,代碼來源:index.php

示例9: news

<?php

$results = news();
$i = 1;
$reply = array();
foreach ($results->item as $item) {
    $msg = $item->title;
    $reply[] = $msg;
}
print_sms_reply($reply);
function news()
{
    $yelpql = 'select title from rss where url="http://rss.news.yahoo.com/rss/topstories" LIMIT 10';
    $result = getResultFromYQL($yelpql);
    return $result->query->results;
}
開發者ID:HighTechTorres,項目名稱:TwilioCookbook,代碼行數:16,代碼來源:news.php

示例10: show_news

        echo $show_news . '<br />';
    }
}
// Функция вывода конкретной новости.
function show_news($id, $news)
{
    echo $news[$id];
}
// Точка входа.
// Если новость присутствует - вывести ее на сайте, иначе мы выводим весь список
function news($id, $news)
{
    array_key_exists($id, $news) ? show_news($id, $news) : show_all_news($news);
}
?>
<form method="POST">
    <input type="text" name="id" placeholder="Введите номер новости">
    <input type="submit" name="news" value="Искать новость">
</form>
<?php 
// Был ли передан id новости в качестве параметра?
// если параметр не был передан - выводить 404 ошибку
// http://php.net/manual/ru/function.header.php
if ($_POST) {
    if (array_key_exists('id', $_POST) && is_numeric($_POST['id'])) {
        news($_POST['id'], $news);
    } else {
        header("HTTP/1.0 404 Not Found");
        echo 'Error 404 Not Found';
    }
}
開發者ID:sealucky7,項目名稱:lesson_5,代碼行數:31,代碼來源:index_2.php

示例11: internal_newsDispatch

function internal_newsDispatch($op)
{
    if (isset($_POST['undo'])) {
        $op = 'news';
    }
    switch ($op) {
        case "news":
            news();
            break;
        case "addnews":
            editnews();
            break;
        case "editviewer":
            editviewer();
            break;
        case "modnews":
            editnews(true);
            break;
        case "savenews":
            savenews();
            break;
        case "delnews":
            delnews();
            break;
    }
}
開發者ID:abhinay100,項目名稱:forma_app,代碼行數:26,代碼來源:internal_news.php

示例12: table_wait_demand

}
$bdd->query("SET NAMES 'utf8'");
echo '<div id = "reload"><div id ="ecran">' . '<div class="col-md-8">';
if ($_SESSION['rang'] <= 2) {
    table_wait_demand($bdd);
}
table_borrowing($bdd);
stufs_available($bdd);
echo '</div></div>';
// DEUXIEME COLONNE !!!
echo '<div class = "col-md-4">' . '<div id = connected style="padding-bottom:15px;">' . 'Connecté(e) en tant que :<br \\> <a align = center style = "color:blue;">' . $_SESSION['nom'] . '</a><br \\>' . '<br \\>' . '<button type = "button" onclick = "deco()" class = "btn btn-primary">Déconnexion</button>';
if ($_SESSION['rang'] <= 2) {
    echo '<button type = "button" onclick="inventaire()" class = "btn btn-info">Gérer les objets</button>';
}
echo '</div>';
news($bdd);
echo '</div>' . '</div>';
?>
        </main>
        <footer>
            <script type="text/javascript">
                $(document).ready(function () {
                    $('[data-toggle = "tooltip"]').tooltip();
                });
                setInterval(
                        function ()
                        {
                            $('#emprunts').load('./centre.php #emprunts_reload');
                        }, 1000);
                setInterval(
                        function ()
開發者ID:AntoineDB,項目名稱:Stock,代碼行數:31,代碼來源:centre.php

示例13: show_all_news

//print_r($news);
// Функция вывода всего списка новостей.
function show_all_news($news)
{
    echo '<strong>Последние новости :</strong><br />';
    foreach ($news as $show_news) {
        echo $show_news . '<br />';
    }
}
// Функция вывода конкретной новости.
function show_news($id, $news)
{
    echo $news[$id];
}
// Точка входа.
// Если новость присутствует - вывести ее на сайте, иначе мы выводим весь список
function news($id, $news)
{
    array_key_exists($id, $news) ? show_news($id, $news) : show_all_news($news);
}
// Был ли передан id новости в качестве параметра?
// если параметр не был передан - выводить 404 ошибку
// http://php.net/manual/ru/function.header.php
if ($_GET) {
    if (array_key_exists('id', $_GET) && is_numeric($_GET['id'])) {
        news($_GET['id'], $news);
    } else {
        header("HTTP/1.0 404 Not Found");
        echo 'Error 404 Not Found';
    }
}
開發者ID:sealucky7,項目名稱:lesson_5,代碼行數:31,代碼來源:index.php

示例14: news

<!-- Tab panes -->
<div class="tab-content">
  <div class="tab-pane active" id="home">
  <div class="panel panel-primary">
  <div class="panel-heading">
    <h3 class="panel-title"><?php 
$name = $_SESSION['pname'];
echo 'Welcome   ' . $name . '  &nbsp &nbsp &nbsp<small><font color="white"><i>Lots of stuff waiting for you</i></font></small>';
?>
</h3>
  </div>
  <div class="panel-body">
    <div class="panel panel-primary">
  <div class="panel-heading">Your College News<span class="pull-right"><?php 
$id = $_SESSION['fclg'];
$se = news($id);
echo '<a href=req.php?ud=' . $se . '><font color="white">View all</font></a>';
?>
</span></div>
  <div class="panel-body">
    <!--Panel1 content STARTS-->
	<?php 
require 'hpanel1.php';
?>

  </div>
</div>
  </div>
   <div class="panel-body">
    <div class="panel panel-primary">
  <div class="panel-heading">Your Stream News<span class="pull-right"><?php 
開發者ID:abhilash-tango,項目名稱:collegeconnect,代碼行數:31,代碼來源:index.php

示例15: auth

<?php

include "../template.php";
include "funcadmin.php";
//Если нажал войти на форме входа
if (isset($_POST["adminSignIn"])) {
    auth($_POST["login"], $_POST["password"], $mysqli, $tmpl["mainAdmin"]);
} else {
    if ($_POST["selectoption"] == "Новости") {
        news($mysqli, $tmpl['newsAdmin']);
    } else {
        if (isset($_POST["selectedNews"])) {
            if ($_POST["selectnews"] == "Новый вопрос") {
                addnews($mysqli, $tmpl["addnews"]);
            } else {
                insertOrDeleteNews($mysqli, $tmpl["updatenews"], $_POST["selectnews"], $tmpl["updatecoments"]);
            }
        } else {
            if (isset($_POST["addnew"])) {
                $title = $_POST["title1"];
                $category = $_POST["categorynews"];
                $text = $_POST["text"];
                $isHot = $_POST["isHot"];
                uploadfile($mysqli);
                addnewsDB($mysqli, $title, $category, $text, $isHot);
                $_SESSION["list"] = $tmpl['mainAdmin'];
            } else {
                if (isset($_POST["insertnew"])) {
                    //получим id категории
                    $sth = $mysqli->prepare("SELECT id2 FROM Category2 WHERE categ2 = ?  ");
                    $sth->bind_Param("s", $_POST["categorynews"]);
開發者ID:Maksumys,項目名稱:lab8,代碼行數:31,代碼來源:event.php


注:本文中的news函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。