本文整理汇总了PHP中get_description函数的典型用法代码示例。如果您正苦于以下问题:PHP get_description函数的具体用法?PHP get_description怎么用?PHP get_description使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_description函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display_results
function display_results($token)
{
$rank = retrieve_results($token);
$total_step = get_steps();
$first = key($rank);
$desc = get_description($first);
echo '<p>Tu es donc <strong> ' . $first . '<strong><p><p class="hero_desc">' . $desc . '</p>';
echo '<p>Plus de détails : </p>';
foreach ($rank as $key => $profile) {
$percent = round($profile / $total_step * 100);
echo 'Tu es à ' . $percent . ' % ' . $key . '<br/>';
}
}
开发者ID:hafedhbou,项目名称:hetic-p2017,代码行数:13,代码来源:display_functions.php
示例2: index
public function index($slug)
{
$this->load->library('user_agent');
$this->load->helper('meta');
$data = $this->mongo_db->page->findOne(array('slug' => $slug));
if (!isset($data['slug'])) {
$this->redirect($slug, NULL, NULL, 'page/index/');
show_404(uri_string(), FALSE);
}
if (!$this->agent->is_robot()) {
$this->mongo_db->page->update(array('_id' => new MongoId($data['_id'])), array('$set' => array('counter' => ++$data['counter'])));
}
$this->template->set_keyword(get_keyword($data))->set_description(get_description($data))->set_title(get_title($data))->view('index', $data)->render();
}
开发者ID:navruzm,项目名称:navruz.net,代码行数:14,代码来源:page.php
示例3: createOldHeaderData
function createOldHeaderData()
{
global $gbl, $sgbl, $login, $ghtml;
global $gdata;
$homedesc = $login->getKeywordUc('home');
$deskdesc = $login->getKeywordUc('desktop');
$aboutdesc = $login->getKeywordUc('about');
$domaindesc = get_plural(get_description('domain'));
$clientdesc = get_plural(get_description('client'));
$slavedesc = get_description('pserver');
$ticketdesc = get_plural(get_description('ticket'));
$ssessiondesc = get_description('ssession');
$systemdesc = $login->getKeywordUc('system');
$logoutdesc = $login->getKeywordUc('logout');
$helpdesc = $login->getKeywordUc('help');
$ffiledesc = get_plural(get_description("ffile"));
$alldesc = $login->getKeywordUc('all');
if ($login->isAdmin()) {
$doctype = "admin";
$domainclass = "domain";
} else {
$doctype = "client";
$domainclass = "domain";
}
if (check_if_many_server()) {
$serverurl = $ghtml->getFullUrl('a=list&c=pserver');
$slavedesc = get_plural($slavedesc);
} else {
$serverurl = $ghtml->getFullUrl('k[class]=pserver&k[nname]=localhost&a=show');
}
if ($login->is__table('client')) {
$ffileurl = $ghtml->getFullUrl('k[class]=ffile&k[nname]=/&a=show');
} else {
$ffileurl = $ghtml->getFullUrl('n=web&k[class]=ffile&k[nname]=/&a=show');
}
$gob = $login->getObject('general')->generalmisc_b;
if (isset($gob->ticket_url) && $gob->ticket_url) {
$url = $gob->ticket_url;
$url = add_http_if_not_exist($url);
$ticket_url = "javascript:window.open('{$url}')";
} else {
$ticket_url = "/display.php?frm_action=list&frm_o_cname=ticket";
}
$helpurl = "http://wiki.lxcenter.org";
$gdata = array("desktop" => array($deskdesc, "/display.php?frm_action=desktop", "client_list.gif"), "home" => array($homedesc, "/display.php?frm_action=show", "client_list.gif"), "all" => array($alldesc, "/display.php?frm_action=list&frm_o_cname=all_domain", "client_list.gif"), "domain" => array($domaindesc, "/display.php?frm_action=list&frm_o_cname={$domainclass}", "domain_list.gif"), "system" => array($systemdesc, "/display.php?frm_action=show&frm_o_o[0][class]=pserver&frm_o_o[0][nname]=localhost", "pserver_list.gif"), "client" => array($clientdesc, "/display.php?frm_action=list&frm_o_cname=client", "client_list.gif"), "ffile" => array($ffiledesc, $ffileurl, "client_list.gif"), "pserver" => array($slavedesc, $serverurl, "pserver_list.gif"), "ticket" => array($ticketdesc, $ticket_url, "ticket_list.gif"), "ssession" => array($ssessiondesc, "/display.php?frm_action=list&frm_o_cname=ssessionlist", "ssession_list.gif"), "about" => array($aboutdesc, "/display.php?frm_action=about", "ssession_list.gif"), "help" => array($helpdesc, "javascript:window.open('{$helpurl}/')", "ssession_list.gif"), "logout" => array("<font color=red>{$logoutdesc}<font >", "javascript:top.mainframe.logOut();", "delete.gif"));
}
开发者ID:zseand,项目名称:kloxo,代码行数:46,代码来源:oldheader.php
示例4: index
public function index()
{
$this->load->library('user_agent');
$this->load->helper('meta');
$slug = $this->uri->uri_string();
$data = $this->mongo_db->post->findOne(array('slug' => $slug, 'status' => 'publish'));
if (!isset($data['slug'])) {
$this->redirect($slug, NULL, NULL, 'post/index/');
$this->show_404();
return;
}
if (!$this->agent->is_robot()) {
$this->mongo_db->post->update(array('_id' => new MongoId($data['_id'])), array('$set' => array('counter' => ++$data['counter'])));
}
$related = $this->mongo_db->post->find(array('_id' => array('$ne' => $data['_id']), 'tags' => array('$in' => $data['tags'])))->limit(3);
$data['related'] = iterator_to_array($related);
$this->template->set_keyword(get_keyword($data))->set_description(get_description($data))->set_title(get_title($data))->view('index', $data)->render();
}
开发者ID:navruzm,项目名称:navruz.net,代码行数:18,代码来源:post.php
示例5: display_image
function display_image($filename)
{
// I need to know which picture this is, for navigation links
$picture_files = list_picture_files();
$current_picture_index = array_search($filename, $picture_files);
// Actual image
$img_tag = '<img src="' . $filename . '" alt="' . pretty_print_name(get_name_part($filename)) . '" />';
// Overlay navigation
$overlay_navigation_previous = '';
$overlay_navigation_next = '';
if ($current_picture_index !== count($picture_files) - 1) {
$overlay_navigation_next .= link_to_picture($picture_files[$current_picture_index + 1]);
}
if ($current_picture_index !== 0) {
$overlay_navigation_previous .= link_to_picture($picture_files[$current_picture_index - 1]);
}
$image_display = "<div id=\"image_display\">\n\t" . $overlay_navigation_previous . "\n" . $img_tag . "\n" . $overlay_navigation_next . "</div>\n";
// Image title
$title = pretty_print_name(get_name_part($filename));
$image_display .= "<div id=\"image_name\">" . $title . "</div>\n";
// Image date
$date = pretty_print_timestamp(get_timestamp_part($filename));
$image_display .= "<div id=\"image_date\">" . $date . "</div>\n";
// Image description
$description = get_description($filename);
if (!is_null($description)) {
$image_display .= "<div id=\"image_description\">" . $description . "</div>\n";
}
// links to previous, index and next image
$links = "<div id=\"image_links\">\n\t";
// Link to previous image
if ($current_picture_index !== 0) {
$link_to_previous = link_to_picture($picture_files[$current_picture_index - 1], false);
$links .= "<span id=\"image_link_previous\" class=\"image_link\">" . $link_to_previous . "</span>\n\t";
} else {
$links .= "<span class=\"image_link\"> </span>";
}
// Link to the image index
$link_to_index = '<a href="?p=index">Images index</a>';
$links .= "<span id=\"image_link_index\">" . $link_to_index . "</span>\n";
// Links to next image
if ($current_picture_index !== count($picture_files) - 1) {
$link_to_next = link_to_picture($picture_files[$current_picture_index + 1], false);
$links .= "<span id=\"image_link_next\" class=\"image_link\">" . $link_to_next . "</span>\n\t";
} else {
$links .= "<span class=\"image_link\"> </span>";
}
$links .= "</div>\n";
$image_display .= $links;
return $image_display;
}
开发者ID:jkbockstael,项目名称:elite-gallery,代码行数:51,代码来源:index.php
示例6: display_grid
function display_grid($prefix, $courseid, $students, $criteria)
{
//print_r($criteria);
$ok = array();
if (count($criteria['P'])) {
$ok['P'] = true;
}
if (count($criteria['M'])) {
$ok['M'] = true;
}
if (count($criteria['D'])) {
$ok['D'] = true;
}
//print_r($ok);
$padding = array('P' => 0, 'M' => 0, 'D' => 0);
$count['P'] = count($criteria['P']);
$count['M'] = count($criteria['M']);
$count['D'] = count($criteria['D']);
if ($count['D'] < 6) {
$padding['D'] = 6 - $count['D'];
$count['D'] = 6;
}
$data = '<table id="grades" border="1">' . "\n";
if (array_key_exists('P', $ok) && array_key_exists('M', $ok)) {
$data .= '<tr><th colspan="3"> </th>';
if ($ok['P']) {
$data .= '<th class="divider"> </th><th class="left small" colspan="' . $count['P'] . '">' . get_string('pass', 'block_progress') . '</th>';
}
if ($ok['M']) {
$data .= '<th class="divider"> </th><th class="left small" colspan="' . $count['M'] . '">' . get_string('merit', 'block_progress') . '</th>';
}
if ($ok['D']) {
$data .= '<th class="divider"> </th><th class="left small" colspan="' . $count['D'] . '">' . get_string('distinction', 'block_progress') . '</th>';
}
$data .= '</tr>' . "\n";
}
$data .= '<tr><th colspan="3"> </th>';
foreach ($criteria as $l => $crit) {
if (array_key_exists($l, $ok)) {
$data .= '<th class="divider"> </th>';
foreach ($crit as $a => $c) {
$data .= '<th class="centre small">' . $c . '</th>';
}
}
}
$data .= '<th> </th><th> </th><th> </th><th> </th></tr>';
foreach ($students as $student) {
$data .= '<tr><td>' . strtoupper($student->lastname) . '</td><td>' . ucfirst(strtolower($student->firstname)) . '</td></td><td> </td>';
foreach ($criteria as $letter => $crit) {
if (array_key_exists($letter, $ok)) {
$data .= '<td class="divider"> </td>';
foreach ($crit as $a => $c) {
$class = 'partial hide';
$title = '';
$desc = get_description($prefix, $courseid, $letter . $c);
if ($desc) {
$title = ' title="' . $desc . '"';
}
if (outcome_achieved($prefix, $courseid, $student->id, $letter . $c)) {
$class = 'achieved';
}
$data .= '<td' . $title . ' class="' . $class . '">' . $letter . $c . '</td>';
}
}
}
$data .= '</tr>';
}
$data .= '</table>' . "\n";
return $data;
}
开发者ID:nathanfriend,项目名称:progress,代码行数:70,代码来源:summary_course.php
示例7: explode
$voteid = explode(' ', $voteid);
}
if ($fromurl) {
$fromurl = fix_link($fromurl);
}
$fileurl = $linkurl;
$linkurl = $MOD['linkurl'] . $linkurl;
$titles = array();
if ($subtitle) {
$titles = explode("\n", $subtitle);
$titles = array_map('trim', $titles);
}
$keytags = $tag ? explode(' ', $tag) : array();
$fee = get_fee($item['fee'], $MOD['fee_view']);
if ($fee) {
$description = get_description($content, $MOD['pre_view']);
$user_status = 4;
} else {
$user_status = 3;
}
$pages = '';
$total = 1;
$subtitles = count($titles);
if (strpos($content, '[pagebreak]') !== false) {
$contents = explode('[pagebreak]', $content);
$total = count($contents);
if ($total < $subtitles) {
$subtitles = $total;
}
}
$seo_file = 'show';
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:show.htm.php
示例8: get_title
echo $curr_page;
?>
" />
<h2><img src="inc/images/loading.gif" id="loading" alt="loading" style="display: none;" />Planet</h2>
<a name="settings"></a>
<h3>Planet settings</h3>
<p class="settings">
<label for="title">Planet title:</label>
<input type="text" name="title" id="title" value="<?php
echo get_title();
?>
" />
<label for="description">Planet description:</label>
<textarea name="description" id="description"><?php
echo get_description();
?>
</textarea>
<?php
$allow_reg = get_setting_value('show_reg_button');
$notify = get_setting_value('reg_notify');
if ($allow_reg == 'on') {
$allow_reg = "checked=\"true\"";
} else {
$allow_reg = "";
}
if ($notify == 'on') {
$notify = "checked=\"true\"";
} else {
$notify = "";
}
开发者ID:laiello,项目名称:planetoid-project,代码行数:31,代码来源:planet.php
示例9: __ajax_desc_tree
function __ajax_desc_tree()
{
global $gbl, $sgbl, $login, $ghtml;
$object = $gbl->__c_object;
$icondir = get_image_path('/button/');
$rclist = $object->getResourceChildList();
$cid = $ghtml->node;
if ($object->hasFileResource()) {
$u = "a=show&k[class]=ffile&k[nname]=/";
$u = $ghtml->getFullUrl($u);
$v = createClName('ffile', '/');
$ret[] = array('text' => "File", 'icon' => "{$icondir}/ffile_show.gif", 'hrefTarget' => 'mainframe', 'href' => $u, 'id' => "{$cid}&{$v}");
}
if ($ghtml->__resource_class) {
$c = strfrom($ghtml->__resource_class, "__resource_");
if (cse($c, "_l")) {
$clname = $object->getChildNameFromDes($c);
$list = $object->getList($clname, $totalcount);
foreach ($list as $o) {
$u = "a=show&k[class]={$o->getClass()}&k[nname]={$o->nname}";
$u = $ghtml->getFullUrl($u);
$ret[] = array('text' => basename($o->nname), 'icon' => "{$icondir}/{$o->getClass()}_list.gif", 'hrefTarget' => 'mainframe', 'href' => $u, 'id' => "{$cid}&{$o->getClName()}");
}
} else {
if (cse($c, "_o")) {
$clname = $object->getChildNameFromDes($c);
$o = $object->getObject($clname);
$u = "a=show&o={$o->getClass()}";
$u = $ghtml->getFullUrl($u);
$ret[] = array('text' => $o->getClass(), 'icon' => "{$icondir}/{$o->getClass()}_show.gif", 'hrefTarget' => 'mainframe', 'href' => $u, 'id' => "{$cid}&{$o->getClass()}");
}
}
return $ret;
}
if ($ghtml->__title_function) {
$t = $ghtml->__title_function;
$alist = $object->createShowAlist($alist);
foreach ($alist as $k => $v) {
if (csb($k, "__title")) {
if ($k !== $t) {
if ($insidetitle) {
$insidetitle = false;
break;
}
continue;
}
$insidetitle = true;
continue;
}
if ($insidetitle) {
$url = $ghtml->getFullUrl($v);
if ($ghtml->is_special_url($url)) {
continue;
}
$urlinfo = $ghtml->getUrlInfo($url);
$ret[] = array('text' => $urlinfo['description']['desc'], 'icon' => $urlinfo['image'], 'hrefTarget' => 'mainframe', 'leaf' => true, 'href' => $url, 'id' => "&end");
}
}
return $ret;
}
if ($object->hasFunctions()) {
$alist = $object->createShowAlist($alist);
foreach ($alist as $k => $v) {
if (!csb($k, "__title")) {
continue;
}
$title = strfrom($k, "__title_");
if ($title === 'mailaccount') {
continue;
}
if ($title === 'custom') {
continue;
}
$icon = "{$icondir}/__title_{$title}.gif";
if (!lxfile_exists("__path_program_htmlbase/{$icon}")) {
//lfile_put_contents("title.img", "$title.gif\n", FILE_APPEND);
$icon = null;
}
$ret[] = array('text' => $v, 'icon' => $icon, 'hrefTarget' => '', 'href' => null, 'id' => "{$cid}&{$k}");
}
}
foreach ($rclist as $c) {
$clname = $object->getChildNameFromDes($c);
$desc = get_description($clname);
$desc = get_plural($desc);
$url = $ghtml->getFullUrl("a=list&c={$clname}");
$ret[] = array('text' => $desc, 'icon' => "{$icondir}/{$clname}_list.gif", 'hrefTarget' => 'mainframe', 'href' => $url, 'id' => "{$cid}&__resource_{$c}");
}
return $ret;
}
开发者ID:lonelywoolf,项目名称:hypervm,代码行数:90,代码来源:ajaxcore.php
示例10: array
}
} else {
$user_status = 3;
}
} else {
$inner = true;
$user_status = $_userid ? 1 : 0;
}
if ($_username && $_username == $item['username']) {
$user_status = 3;
}
if ($inner) {
if ($user_status == 3 || $user_status == 2) {
$best = $aid ? $db->get_one("SELECT * FROM {$DT_PRE}know_answer WHERE itemid={$aid}") : array();
if ($user_status == 2 && $best) {
$description = get_description($best['content'], $MOD['pre_view']);
}
}
$content = strip_nr(ob_template('content', 'chip'), true);
echo 'Inner("content", \'' . $content . '\');';
}
$update = '';
include DT_ROOT . '/include/update.inc.php';
echo 'Inner("hits", \'' . $item['hits'] . '\');';
if ($MOD['show_html'] && $edittime > @filemtime(DT_ROOT . '/' . $MOD['moduledir'] . '/' . $item['linkurl'])) {
tohtml('show', $module);
}
} else {
if ($html == 'list') {
$catid or exit;
if ($MOD['list_html'] && $task_list && $CAT) {
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:task.inc.php
示例11: fleet_info
function fleet_info()
{
global $pid;
global $uid;
global $skin;
$sth = mysql_query("select uid from planets where id={$pid} and uid={$uid}");
if (!$sth) {
show_error("Database failure!");
return 0;
}
if (mysql_num_rows($sth) == 0) {
show_error("Databaser failure!");
return 0;
}
$fids = get_fids_by_pid($pid, $uid);
if (!$fids) {
show_message("You have no fleet on this planet");
} else {
table_start("center", "500");
table_head_text(array("Ships in orbit"), "3");
table_text_open("head");
for ($i = 0; $i < sizeof($fids); $i++) {
$fleet = new fleet($fids[$i]);
table_text_open("head");
table_text_design($fleet->name, "80", "", "", "head");
table_text_design("Name", "300", "center", "", "smallhead");
table_text_design("Count", "100", "center", "", "smallhead");
table_text_close();
while (list($prod_id, $ships_arr) = each($fleet->ships)) {
$sth = mysql_query("select manual from production where prod_id={$prod_id}");
if (!$sth) {
show_error("Database failure!");
return 0;
}
$manual = mysql_fetch_array($sth);
table_text_open("text", "center");
table_text_design("<a href='" . $manual["manual"] . "' target=\"_blank\"><img src='arts/" . get_pic($prod_id) . "' border='0' alt='" . get_description($prod_id) . "' align='center'></a><br><a href=\"" . $PHP_SELF . "?act=print_ship_info&prod_id=" . $prod_id . "\">Info</a>", "80", "", "", "text");
table_text_design(get_name_by_prod_id($prod_id), "300", "", "", "text");
table_text_design($ships_arr[0], "100", "", "", "text");
table_text_close();
}
}
table_end();
}
$sth3 = mysql_query("select * from s_production as sp,production as p where sp.planet_id='" . $pid . "' and p.prod_id=sp.prod_id order by sp.time,sp.prod_id");
table_start("center", "500");
fleet($sth3);
table_end();
}
开发者ID:spaceregents,项目名称:spaceregents,代码行数:49,代码来源:production.php
示例12: getTitleWithSync
function getTitleWithSync($class = null)
{
global $gbl, $sgbl, $login, $ghtml;
if ($class) {
$obj = $this->getObject($class);
} else {
$obj = $this;
$class = $this->get__table();
}
$switch = null;
if (isset($obj->olddeleteflag) && $obj->olddeleteflag === 'on') {
$switch = "(Switching)";
}
$desc = get_description($class);
$descr = null;
$str = null;
if (check_if_many_server()) {
$descr = "on {$obj->syncserver}";
}
return "{$desc} <span title=\"{$desc} is Configured {$descr}\">{$str} {$switch}</span>";
}
开发者ID:soar-team,项目名称:kloxo,代码行数:21,代码来源:lxclass.php
示例13: foreach
}
?>
</tr>
<?php
foreach ($criteria as $letter => $detail) {
foreach ($detail as $num => $desc) {
$n = $desc['shortname'];
echo '<tr><td>' . $letter . $n . '</td><td>' . shorten_text($desc['description'], 40) . '</td>';
foreach ($assignments as $key => $assignment) {
$desc = '';
$class = 'notenrolled';
$content = ' ';
if ($possible[$letter . $n][$key]) {
$class = 'partial nobox';
$content = $letter . $n;
$d = get_description($_GET['course'], $letter . $n);
if ($d) {
$desc = ' title="' . $d . '"';
}
}
if ($achieved[$letter . $n][$key]) {
$class = 'achieved';
}
//if ($achieved[$letter.$n][$key] == 'yes') $class = 'yes';
echo '<td' . $desc . ' class="' . $class . '">' . $content . '</td>';
}
echo '</tr>';
}
}
?>
</table>
开发者ID:nathanfriend,项目名称:progress,代码行数:31,代码来源:summary_student_course.php
示例14: getTitleWithSync
function getTitleWithSync($class = null)
{
global $gbl, $sgbl, $login, $ghtml;
if ($class) {
$obj = $this->getObject($class);
} else {
$obj = $this;
$class = $this->get__table();
}
$switch = null;
if (isset($obj->olddeleteflag) && $obj->olddeleteflag === 'on') {
$switch = "(Switching)";
}
$desc = get_description($class);
$path = get_image_path();
$img = $ghtml->get_image($path, null, $obj->__driverappclass, '.gif');
$descr = null;
$str = null;
if (check_if_many_server()) {
$descr = "on {$obj->syncserver}";
//$str = ":{$obj->syncserver}";
}
//<img src={$img} width=14 height=14>
// Don't need this. Ruins the appearance <b> [</b>{$obj->getShowInfo()}<b>] </b>
return "{$desc} <span title=\"{$desc} is Configured {$descr} on {$obj->__driverappclass}\"> {$str} {$switch}: {$obj->__driverappclass} </span>";
}
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:26,代码来源:lxclass.php
示例15: do_addform
function do_addform($object, $class, $dttype = null, $notitleflag = false)
{
global $gbl, $sgbl, $login, $ghtml;
$gbl->setSessionV("lx_add_return_url", "/display.php?" . $ghtml->get_get_from_current_post(null));
$cdesc = get_description($class);
$cdesc = $dttype ? $dttype['val'] : $cdesc;
if ($notitleflag) {
$title = null;
} else {
$title = "Add {$cdesc}";
}
$string[] = $ghtml->object_variable_startblock($object, $class, $title);
$string[] = $ghtml->object_inherit_classpath();
$string[] = $ghtml->object_variable_hidden("frm_o_cname", $class);
$string[] = $ghtml->object_variable_hidden("frm_dttype", $dttype);
$ret = exec_class_method($class, 'addform', $object, $class, $dttype);
if ($dttype) {
$ret['variable'][$dttype['var']] = array('h', $dttype['val']);
}
$string[] = create_xml($object, $class, $ret);
$vlist = $ret['variable'];
$pre = $post = null;
if (isset($vlist['__m_message_pre'])) {
$pre = $vlist['__m_message_pre'];
}
if (isset($vlist['__m_message_post'])) {
$post = $vlist['__m_message_post'];
}
$ghtml->print_information('pre', 'addform', $class, $dttype['val'], $pre);
$ghtml->xml_print_page($string);
$ghtml->print_information('post', 'addform', $class, $dttype['val'], $post);
}
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:32,代码来源:coredisplaylib.php
示例16: display_key
function display_key($prefix, $courseid, $criteria)
{
$data = '<div id="key" class="printonly">';
$data .= '<h2>Criteria</h2>';
$data .= '<dl>';
foreach ($criteria as $letter => $crit) {
foreach ($crit as $c) {
$data .= '<dt>' . $letter . $c . '</td>' . "\n";
$data .= '<dd>' . get_description($prefix, $courseid, $letter . $c) . '</dd>' . "\n";
}
}
$data .= '</dl></div>';
return $data;
}
开发者ID:nathanfriend,项目名称:progress,代码行数:14,代码来源:functions.php
示例17: count
<?php
include_once "/db/db_search.php";
include_once "search-item.php";
$search_results = \search\get_search_results($_GET['q']);
echo '<div id="search-results-number">' . count($search_results) . ' Results Found</div>';
foreach ($search_results as $search_item) {
$search_item['description'] = get_description($search_item['id'], $search_item['type']);
output_search_item($search_item['id'], $search_item['type'], $search_item['name'], $search_item['image'], $search_item['description']);
}
开发者ID:brthiess,项目名称:rockstat_final,代码行数:10,代码来源:search-view.php
示例18: printListAddForm
function printListAddForm($parent, $class)
{
global $gbl, $sgbl, $login, $ghtml;
$vlist = exec_class_method($class, "addListForm", $parent, $class);
if (!$vlist) {
return;
}
$unique_name = "{$parent->getClName()}_{$class}";
$showstring = "Show/Hide";
$show_all_string = null;
if ($login->getSpecialObject('sp_specialplay')->isOn('close_add_form')) {
$visiblity = "visibility:hidden;display:none";
} else {
$visiblity = "visibility:visible;display:block";
}
$cdesc = get_description($class);
$cdesc .= " for {$parent->nname}";
$backgroundstring = "background:#fff;";
$fontcolor = "black";
$bordertop = "#d0d0d0";
if ($sgbl->isBlackBackground()) {
$backgroundstring = "background:#000;";
$fontcolor = "#333333";
$bordertop = "#444444";
}
?>
<table cellpadding="0" cellspacing="0" background="img/skin/kloxo/default/default/expand.gif">
<tr>
<td>
<font align=left style='color:<?php
echo $fontcolor;
?>
;font-weight:bold'>
<a style='color:<?php
echo $fontcolor;
?>
;font-weight:bold'
href="javascript:toggleVisibility('listaddform_<?php
echo $unique_name;
?>
');"> Click Here to
Add <?php
echo $cdesc;
?>
(<?php
echo $showstring;
?>
) </a> <?php
echo $show_all_string;
?>
</font>
</td>
</tr>
</table>
<div id="listaddform_<?php
echo $unique_name;
?>
" style="<?php
echo $visiblity;
?>
">
<table width="100%" border="0" cellpadding=0 style=' border: 0px solid '>
<tr>
<td width="10"></td>
<td>
<table cellpadding=0 align=center cellspacing=0 width=90%>
<tr>
<td>
<?php
do_addform($parent, $class, null, true);
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<?php
}
开发者ID:hypervm-ng,项目名称:hypervm-ng,代码行数:82,代码来源:htmllib.php
示例19: send_header
//.........这里部分代码省略.........
if (!empty($DBInfo->title_msgstr)) {
$site_title = sprintf($DBInfo->title_msgstr, $sitename, $options['title']);
} else {
$site_title = $options['title'] . ' - ' . $sitename;
}
// set OpenGraph information
$act = !empty($options['action']) ? strtolower($options['action']) : 'show';
$is_show = $act == 'show';
$is_frontpage = $this->page->name == get_frontpage($DBInfo->lang);
if (!$is_frontpage && !empty($DBInfo->frontpages) && in_array($this->page->name, $DBInfo->frontpages)) {
$is_frontpage = true;
}
if (!empty($DBInfo->canonical_url)) {
if (($p = strpos($DBInfo->canonical_url, '%s')) !== false) {
$page_url = sprintf($DBInfo->canonical_url, $this->page->urlname);
} else {
$page_url = $DBInfo->canonical_url . $this->page->urlname;
}
} else {
$page_url = qualifiedUrl($this->link_url($this->page->urlname));
}
if ($is_show && $this->page->exists()) {
$oc = new Cache_text('opengraph');
if ($this->refresh || ($val = $oc->fetch($this->page->name, $this->page->mtime())) === false) {
$val = array('description' => '', 'image' => '');
if (!empty($this->pi['#redirect'])) {
$desc = '#redirect ' . $this->pi['#redirect'];
} else {
$raw = $this->page->_get_raw_body();
if (!empty($this->pi['#description'])) {
$desc = $this->pi['#description'];
} else {
$cut_size = 2000;
if (!empty($DBInfo->get_description_cut_size)) {
$cut_size = $DBInfo->get_description_cut_size;
}
$cut = mb_strcut($raw, 0, $cut_size, $DBInfo->charset);
$desc = get_description($cut);
if ($desc !== false) {
$desc = mb_strcut($desc, 0, 200, $DBInfo->charset) . '...';
} else {
$desc = $this->page->name;
}
}
}
$val['description'] = _html_escape($desc);
if (!empty($this->pi['#image'])) {
if (preg_match('@^(ftp|https?)://@', $this->pi['#image'])) {
$page_image = $this->pi['#image'];
} else {
if (preg_match('@^attachment:("[^"]+"|[^\\s]+)@/', $this->pi['#image'], $m)) {
$image = $this->macro_repl('attachment', $m[1], array('link_url' => 1));
if ($image[0] != 'a') {
$page_image = $image;
}
}
}
}
if (empty($page_image)) {
// extract the first image
$punct = '<>"\'}\\]\\|\\!';
if (preg_match_all('@(?<=\\b)((?:attachment:(?:"[^' . $punct . ']+"|[^\\s' . $punct . '?]+)|' . '(?:https?|ftp)://(?:[^\\s' . $punct . ']+)\\.(?:png|jpe?g|gif)))@', $raw, $m)) {
foreach ($m[1] as $img) {
if ($img[0] == 'a') {
$img = substr($img, 11);
// strip attachment:
开发者ID:sedrion,项目名称:moniwiki,代码行数:67,代码来源:wiki.php
示例20: createShowAlist
function createShowAlist(&$alist, $subaction = null)
{
//$alist[] = "a=show";
global $gbl, $sgbl, $login, $ghtml;
$alist['__title_main'] = $login->getKeywordUc('config');
if ($this->isLocalhost('nname')) {
$alist[] = "a=show&o=lxupdate";
}
$alist['property'][] = "a=updateform&sa=password";
//$this->getCPToggleUrl($alist);
$alist[] = "a=updateform&sa=showused";
//$alist[] = "a=list&c=component";
$cnl = array('ipaddress', 'dbadmin');
foreach ($cnl as $cn) {
$alist = $this->getListActions($alist, $cn);
}
$alist['__title_next'] = get_plural(get_description('service'));
$cnl = array('service', 'cron', 'process', 'uuser');
foreach ($cnl as $cn) {
$alist = $this->getListActions($alist, $cn);
}
$this->driverApp->createShowAlist($alist);
//$alist[] = "a=updateform&sa=phpsmtp";
$alist[] = "a=show&l[class]=ffile&l[nname]=";
//$alist[] = "a=list&c=firewall";
//$alist[] = "a=show&o=proxy";
//$alist[] = "a=updateform&sa=update&c=serverspam";
$alist['__title_nnn'] = 'Machine';
$alist[] = "a=show&o=driver";
//$alist[] = "a=update&sa=loaddriverinfo";
$alist[] = "a=updateForm&sa=reboot";
$alist[] = "a=updateForm&sa=poweroff";
return $alist;
}
开发者ID:soar-team,项目名称:kloxo,代码行数:34,代码来源:pservercorelib.php
注:本文中的get_description函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论