当前位置: 首页>>代码示例>>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;未经允许,请勿转载。