• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getTitle函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getTitle函数的典型用法代码示例。如果您正苦于以下问题:PHP getTitle函数的具体用法?PHP getTitle怎么用?PHP getTitle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getTitle函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: parseFile

function parseFile($path, $baseUrl, $docID)
{
    echo "  parse file  ";
    $content = file_get_contents($path, true);
    $title = getTitle($content);
    deleteFacts($title);
    $GLOBALS["paragraphs"] = array();
    $contentParse = $content;
    while ($contentParse != null) {
        $contentParse = parseText($contentParse);
    }
    echo "got paragraphs,  ";
    $paragraphs = $GLOBALS["paragraphs"];
    $factsExist = count($paragraphs) > 0;
    logSubject($title, $factsExist);
    foreach ($paragraphs as $text) {
        logFact($text, $title, $docID);
    }
    echo "logged facts";
    /*$GLOBALS["urls"] = array();
    	$contentParse = $content;
    	while($contentParse != null) {
    		$contentParse = parseURL($contentParse, $baseUrl);
    	}/*/
    //logURLs($GLOBALS["urls"]);
    //echo "<pre>"; print_r($GLOBALS["urls"]); echo "</pre>";
}
开发者ID:jreinstra,项目名称:dragonfly-main,代码行数:27,代码来源:parseOne.php


示例2: parserArray

function parserArray($array_xml)
{
    $_level_key_name = $_SESSION['_level_key_name'];
    $image_url = "../../pixmaps/theme/";
    foreach ($array_xml as $key => $value) {
        $size = count($array_xml);
        if (is_array($value) && !isset($value['@attributes']) && $key !== '@attributes') {
            $json .= parserArray($value, '');
            continue;
        } elseif (is_array($value) && isset($value['@attributes'])) {
            $icon = $image_url . getIcon($key, $value);
            $title = getTitle($key, $value);
            $json .= "{title: '{$title}', addClass: 'size10', key:'" . $value['@attributes'][$_level_key_name] . "', isFolder:'true', icon:'{$icon}'";
            $aux = parserArray($value);
            $json .= !empty($aux) ? ", children:  [" . $aux . "]" : '';
            $json .= "},\n";
        } elseif (is_array($value) && $key === '@attributes') {
            $keys = array_keys($value);
            if (!(count($keys) == 1 && $keys[0] == $_level_key_name)) {
                $json .= "{title: '<span>" . _("Attributes") . "</span>', addClass: 'size10', key:'attr_" . $value[$_level_key_name] . "', icon:'" . $image_url . "gear-small.png', children: [";
                foreach ($value as $k => $v) {
                    if ($k !== $_level_key_name) {
                        $json .= "{title: '<span>" . clean_string($k) . "</span>=" . clean_string($v) . "', addClass: 'size10', key:'" . $value[$_level_key_name] . "', icon:'" . $image_url . "ticket-small.png'},\n";
                    }
                }
                $json = preg_replace('/,$/', '', $json);
                $json .= "]";
                $json .= "},\n";
            }
        }
    }
    return $json;
}
开发者ID:jhbsz,项目名称:ossimTest,代码行数:33,代码来源:utils.php


示例3: user_verify

 public function user_verify()
 {
     session_id($_GET[session_name()]);
     session_start();
     $data = $_SESSION;
     session_destroy();
     //Aqui se debiesen hacer validaciones para que el usuario pueda ingresar a la aplicación
     $this->load->model('User_model');
     $this->load->library('session');
     $user = $this->User_model->getUserById($data['rut']);
     if (!$user) {
         $this->session->set_flashdata("error", 1);
         redirect('');
     }
     if (!$user->name) {
         $this->User_model->modifyUser(array('id' => $user->id, 'name' => $data['nombre_completo']));
     }
     //Aqui se debe agregar las variables de sesion que seran consultadas a futuro en la aplicacion.
     $this->session->set_userdata('rut', $data['rut']);
     $this->session->set_userdata('name', $data['nombre_completo']);
     $this->session->set_userdata('email', $user->email);
     $permits = $this->User_model->getPermitByUser($user->id);
     $permits_array = getPermits($permits);
     $permits_array['title'] = getTitle($user);
     $this->session->set_userdata($permits_array);
     redirect('inicio');
 }
开发者ID:farodrig,项目名称:IndicadoresDCC,代码行数:27,代码来源:ADI.php


示例4: getBacklink

function getBacklink($id, $type, $category = true)
{
    $db =& JFactory::getDBO();
    if (!$category) {
        $query = "SELECT articleid from #__fieldsattach_values WHERE (value LIKE '%," . $id . ",%' OR value LIKE '" . $id . ",%' OR value LIKE '%," . $id . "' OR value LIKE '" . $id . "') AND fieldsid = 23";
    } else {
        $query = "SELECT catid from #__fieldsattach_categories_values WHERE (value LIKE '%," . $id . ",%' OR value LIKE '" . $id . ",%' OR value LIKE '%," . $id . "' OR value LIKE '" . $id . "') AND fieldsid = 22";
    }
    $db->setQuery($query);
    $result = $db->loadObjectList();
    $function = '';
    foreach ($result as $item) {
        if (!$category) {
            $parent = getParent(getCategory($item->articleid));
        } else {
            $parent = getParent($item->catid);
        }
        if ($parent == $type) {
            if (!$category) {
                $function .= '<li><a href="' . ContentHelperRoute::getArticleRoute($item->articleid, $parent) . '">' . getTitle($item->articleid, $category) . '</a></li>';
            } else {
                $function .= '<li><a href="' . ContentHelperRoute::getCategoryRoute($item->catid, $parent) . '">' . getTitle($item->catid, $category) . '</a></li>';
            }
        }
    }
    return $function;
}
开发者ID:AxelFG,项目名称:ckbran-inf,代码行数:27,代码来源:helper.php


示例5: renderInterfaceHTML

function renderInterfaceHTML($pageno, $tabno, $payload)
{
    ?>
<!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" xml:lang="en" lang="en">
<head><title><?php 
    echo getTitle($pageno);
    ?>
</title>
<?php 
    printPageHeaders();
    ?>
</head>
<body>
<table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%" class="maintable">
 <tr class="mainheader"><td>
 <?php 
    echo getConfigVar('enterprise');
    ?>
 RackTables <a href="http://racktables.org" title="Visit RackTables site"><?php 
    echo CODE_VERSION;
    ?>
</a><?php 
    renderQuickLinks();
    ?>
 <div style="float: right" class=greeting><a href='index.php?page=myaccount&tab=default'><?php 
    global $remote_displayname;
    echo $remote_displayname;
    ?>
</a> [ <a href='?logout'>logout</a> ]</div>
 </td></tr>
 <tr><td class="menubar">
  <table border="0" width="100%" cellpadding="3" cellspacing="0">
  <tr><?php 
    showPathAndSearch($pageno);
    ?>
</tr>
  </table>
 </td></tr>
 <tr><td><?php 
    showTabs($pageno, $tabno);
    ?>
</td></tr>
 <tr><td><?php 
    showMessageOrError();
    ?>
</td></tr>
 <tr><td><?php 
    echo $payload;
    ?>
</td></tr>
</table>
</body>
</html>
<?php 
}
开发者ID:rhysm,项目名称:racktables,代码行数:56,代码来源:interface.php


示例6: showlist

function showlist($path)
{
    global $ignore, $ignore_dirs, $id, $divs, $imgpath, $types, $startin, $url_domain;
    $dirs = array();
    $files = array();
    if (is_dir($path)) {
        if ($dir = @opendir($path)) {
            //if(!in_dirs($path, $ignore_dirs)){
            while (($file = readdir($dir)) !== false) {
                if ($file != "." && $file != ".." && !in_array($file, $ignore)) {
                    if (is_dir("{$path}/{$file}")) {
                        if (file_exists("{$path}/{$file}/index.php")) {
                            $dirs[$file] = getTitle("{$path}/{$file}/index.php");
                        } elseif (file_exists("{$path}/{$file}/index.html")) {
                            $dirs[$file] = getTitle("{$path}/{$file}/index.html");
                        } elseif (file_exists("{$path}/{$file}/index.htm")) {
                            $dirs[$file] = getTitle("{$path}/{$file}/index.htm");
                        } else {
                            $dirs[$file] = $file;
                        }
                    } else {
                        if (ereg("{$types}\$", $file)) {
                            $files[$file] = getTitle("{$path}/{$file}");
                            if (strlen($files[$file]) == 0) {
                                $files[$file] = $file;
                            }
                        }
                    }
                }
            }
            //}
            closedir($dir);
        }
        natcasesort($dirs);
        $url = str_replace($_SERVER['DOCUMENT_ROOT'], "", $path);
        $n = substr_count("{$url}/\$", "/");
        $base = substr_count($startin, "/") + 1;
        $indent = str_pad("", $n - 1, "\t");
        if ($n > $base) {
            $divs[] = "{$id}";
        }
        $imgsrc = "minus";
        natcasesort($files);
        $id++;
        foreach ($files as $f => $t) {
            $f = retira_extensao($f);
            echo $url_domain . '/' . $f . ' 0.5000 ';
        }
    }
}
开发者ID:ganesank,项目名称:angular.experiment.1,代码行数:50,代码来源:gwsitemap_simple_xml.php


示例7: fillUrlCache

function fillUrlCache()
{
    echo "  Filling URL Cache...";
    $mapper = new Application_Model_UrlcacheMapper();
    foreach ($mapper->findAllUntitled() as $urlcache) {
        $url = $urlcache->getDomain() . $urlcache->getPath();
        $title = getTitle($url);
        if ($title == null) {
            $title = $urlcache->getPath();
        }
        echo "Setting title of {$url} to {$title}...\n";
        $urlcache->setTitle($title);
        $mapper->save($urlcache);
    }
}
开发者ID:revpriest,项目名称:webace,代码行数:15,代码来源:fillUrlCache.php


示例8: getMainTemplate

function getMainTemplate()
{
    global $settings, $sql;
    // Haupt-Template
    $template = '{..doctype..}
<html lang="' . $settings['language'] . '">
    <head>
        {..title..}{..meta..}{..link..}{..script..}
    </head>
    {..body..}
</html>';
    // Dynamischen Titel laden
    $template_title = getTitle();
    // Metadaten laden
    $template_meta = '
                <meta name="title" content="' . $template_title . '">
                <meta name="description" content="' . $settings['description'] . '">
                <meta name="keywords" lang="' . $settings['language'] . '" content="' . $settings['keywords'] . '">
                <meta name="robots" content="index,follow">
                <meta name="Revisit-after" content="3 days">
                
                <meta http-equiv="content-language" content="' . $settings['language'] . '">
                <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
                
                <meta name="DC.Title" content="' . $template_title . '">
                <meta name="DC.Description" content="' . $settings['description'] . '">
                <meta name="DC.Language" content="' . $settings['language'] . '">
                <meta name="DC.Format" content="text/html">
    ';
    // link's + CSS einbinden
    $template_link = '
                <link rel="shortcut icon" href="style/icons/favicon.ico">' . getCSS();
    // Platzhalter ersetzen
    $template = str_replace("{..title..}", "<title>" . $template_title . "</title>", $template);
    $template = str_replace("{..meta..}", $template_meta, $template);
    $template = str_replace("{..link..}", $template_link, $template);
    $template = str_replace("{..script..}", getJS(), $template);
    // Haupt-Template zurückgeben
    return $template;
}
开发者ID:rancor2k,项目名称:bierBill,代码行数:40,代码来源:inc_functions.php


示例9: parseURL

/**
 * Gets a title from a remote URL.
 * @param  [type] $url     The URL to fetch a readable title from.
 * @param  [type] $comment A comment, if you need one.
 * @return [type]          Returns nothing; pushes data directly into $_SESSION
 *                         (This may change later)
 */
function parseURL($url, $comment)
{
    session_name('pubTool');
    header('P3P: CP="CAO PSA OUR"');
    if (verifyURL($url) == false) {
        die("That doesn't look like an URL to me. Click <a href=\"index.php\">here</a> and try again!");
    }
    $url = HttpUri::createFromString($url);
    $url = sanitizeURL($url);
    $title = getTitle($url);
    $domain = getDomain($url);
    $_SESSION["linkList"][] = ['url' => strval($url), 'title' => strval($title), 'domain' => strval($domain), 'comment' => strval($comment)];
}
开发者ID:Gl0dGroup,项目名称:CSICON-Publication-Tool,代码行数:20,代码来源:functions.php


示例10: get_meta_tags

        $tags = get_meta_tags($url);
    } catch (ErrorException $e) {
    }
    // At this version we only need description.
    if (isset($tags['description'])) {
        $description = $tags['description'];
    }
    return $description;
}
// Get title by URL.
function getTitle($url)
{
    $title = '';
    $str = '';
    try {
        $str = file_get_contents($url);
    } catch (ErrorException $e) {
        $title = $url;
    }
    if (strlen($str) > 0) {
        preg_match("/\\<title(.*)\\>(.*)\\<\\/title\\>/", $str, $titleArray);
        if (isset($titleArray[2])) {
            $title = $titleArray[2];
        }
    }
    return $title;
}
$title = getTitle($url);
$description = getDescription($url);
$meta = (object) array('title' => $title, 'description' => $description);
print json_encode($meta);
开发者ID:primitiveart,项目名称:Boxmark-it,代码行数:31,代码来源:meta.php


示例11: getSongID

echo $DOKU_TPL;
?>
images/cornerblack.png" alt="" id="cornerblack" />
	<img src="<?php 
echo $DOKU_TPL;
?>
images/cornerwhite.png" alt="" id="cornerwhite" />

	<div id="content">
		<div class="scrollarea">

			<?php 
if (checkNS('songs')) {
    $songid = getSongID();
    echo '<ul id="nav"><li>';
    tpl_pagelink(':songs:' . $songid, getTitle());
    echo '</li><li>';
    tpl_pagelink(':songs:' . $songid . ':lyrics', 'Lyrics');
    echo '</li><li>';
    tpl_pagelink(':songs:' . $songid . ':tab', 'Tab');
    echo '</li><li>';
    tpl_pagelink(':songs:' . $songid . ':archive', 'Archive');
    echo '</li></ul>';
}
?>

			<div class="xt">&nbsp;</div>
			<div class="content">
			
			<!-- wikipage start -->
			<?php 
开发者ID:pietersartain,项目名称:dokuwiki-template-projectchorus,代码行数:31,代码来源:main.php


示例12: filter_input

     $x = filter_input(INPUT_GET, 'IDs');
     //vl unique machn
     $movingIDs = explode(",", $x);
     $ID01 = $movingIDs[0];
     $ID02 = filter_input(INPUT_GET, 'ID');
     $found = checkIFparent($ID02, $ID01, false, $storyID);
     echo json_encode($found);
 } else {
     if ($functionName == "getContent") {
         getContent($storyID);
     } else {
         if ($functionName == "saveContent") {
             saveContent($storyID);
         } else {
             if ($functionName == "getTitle") {
                 getTitle($storyID);
             } else {
                 if ($functionName == "getStoryDetails") {
                     getStoryDetails($storyID);
                 } else {
                     if ($functionName == "saveStory") {
                         saveStory($storyID);
                     } else {
                         if ($functionName == "addConnection") {
                             addConnection($localhost, $user, $pw, $db, $storyID);
                         }
                     }
                 }
             }
         }
     }
开发者ID:schnurli13,项目名称:Storytelling,代码行数:31,代码来源:getstory.php


示例13: foreach

                    <?php 
} else {
    ?>
<ul class="row gallery-files"><?php 
    foreach ($ADK_GALLERY->docs as $doc) {
        ?>
                        <li class="gallery" data-peaks="<?php 
        echo $doc->peaks;
        ?>
">
                            <a href="#" onclick="getFile(<?php 
        echo $doc->id;
        ?>
);">
                                <span title="<?php 
        echo getTitle($doc);
        ?>
" data-toggle="tooltip" data-container="body" data-placement="right"><?php 
        echo $doc->name;
        ?>
</span>
                            </a>
                        </li>
                    <?php 
    }
    ?>
</ul><?php 
}
?>

                </div>
开发者ID:neilsimp1,项目名称:adk,代码行数:31,代码来源:gallery.php


示例14: Data

     if ($sqlcmd) {
         $data = new Data();
         $data->execSql($sqlcmd);
         $sqldata = $data->getArray();
         $output .= "<pre>" . print_r($sqldata, 1) . "</pre>";
     }
     break;
 case 'sql':
     foreach ($tables as $key) {
         $output .= genSQL($key);
     }
     break;
 case 'dd':
     foreach ($tables as $key) {
         $dd = genDD($key);
         $output .= "\n" . '<tr align="center"><td colspan="5" bgcolor="#f0f0f0"><br/>' . getTitle($key) . " ({$key})</br><br/></td></tr>\n";
         $output .= "\n<tr><th>Nombre</th><th>Tipo</th><th>Tama&ntilde;o</th><th>Referencias</th><th>Descripci&oacute;n</th></tr>\n";
         foreach ($dd as $col) {
             $color = $col[5] ? '#bbbbbb' : '#ffffff';
             unset($col[5]);
             unset($col[6]);
             $output .= "<tr bgcolor=\"{$color}\">";
             foreach ($col as $val) {
                 $output .= "<td>{$val}&nbsp;</td>";
             }
             $output .= "</tr>\n";
         }
     }
     $output = "\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"1\">{$output}</table>\n";
     break;
 case 'erdcol':
开发者ID:ReneVallecillo,项目名称:almidon,代码行数:31,代码来源:setup.php


示例15:

    <?foreach ($arResult["ITEMS"] as $key => $arItems) :?>
    	<div class="item js-item mainBlock" data-id="<?=$arItems["ID"]?>">
			<div class="shadowBlockBottom" style="display:none;">
				<input class="item-count js-item-count" value="1" type="text" name="item1-count" id="item1-count" style="display:none;" />			
				<div class="item-actions-cnt common_list">
					<a class="btn important js-add-to-cart" href="#" onclick="ga('send', 'event', 'adtocart', '<?=$arItems["PROPERTIES"]["ARTIKUL"]["VALUE"]?>'); return true;">Купить</a>
				</div>
			</div>
    		<a href="<?=$arItems["DETAIL_PAGE_URL"]?>">
                <?
                    //$waterImage = waterImage($arItems["~PREVIEW_PICTURE"]);
                    // $waterImage["src"]
                    $waterImage["src"] = CFIle::GetPath($arItems["~PREVIEW_PICTURE"]);
                ?>
    	        <div class="img-cnt">
                    <img src="<?=$waterImage["src"]?>" alt="<?=getAlt($arItems)?>" title="<?=getTitle($arItems)?>"/>
                </div>
    	        <div class="item-info">
    	            <p class="item-name">Артикул <?=$arItems["PROPERTIES"]["ARTIKUL"]["VALUE"]?></p>
    	            <p class="item-desc"><?=$arItems["NAME"]?></p>    	         
                    <?if ($arItems["PRICES"]["BASE"]["DISCOUNT_VALUE"] < $arItems["PRICES"]["BASE"]["VALUE"]){?>
                        <div class="item-price oneline"><span><?=number_format($arItems["PRICES"]["BASE"]["DISCOUNT_VALUE"], 0, 0, " ")?></span> <span class="rub">a</span> | </div>
						<div class="old-price oneline"><span><?=number_format($arItems["PRICES"]["BASE"]["VALUE"], 0, 0, " ")?></span> <span class="rub">a</span></div>
                    <?} else {?>
						<div class="item-price"><span><?=number_format($arItems["PRICES"]["BASE"]["DISCOUNT_VALUE"], 0, 0, " ")?></span> <span class="rub">a</span></div>
					<?}?>
                </div>
                <?if ($arItems["PROPERTIES"]["HIT"]["VALUE"]):?>
                    <div class="item-card-badge hit">Хит продаж</div>
                <?endif?>
                <?if ($arItems["PROPERTIES"]["NEW"]["VALUE"]):?>
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:template.php


示例16: fp

function fp()
{
    //function นัด fp
    $village = $_GET[village];
    if ($village == "00000000") {
        $wvill = "";
    } else {
        $wvill = " AND perapp.villcode='{$village}' ";
    }
    if ($village == "00000000") {
        $mu = "ทุกหมู่บ้าน";
    } else {
        $mu = getvillagename($village);
    }
    $chk_ncd = $_GET[chk_ncd];
    if ($chk_ncd == "2") {
        $chkncd = " AND vper.visitdate is not null";
    } else {
        if ($chk_ncd == "3") {
            $chkncd = " AND vper.visitdate is null";
        } else {
            $chkncd = "";
        }
    }
    $str = $_GET[str];
    $strx = retDatets($str);
    $sql = "SELECT\nperapp.*,\nvper.visitdate as datechk\nFROM\n(\nSELECT\nperson.pcucodeperson,\nperson.pid,\nperson.idcard,\nperson.fname,\nconcat(ctitle.titlename, person.fname , '  ' , person.lname) AS pname,\nperson.birth,\nROUND(DATEDIFF(now(),person.birth)/365.25) AS age,\nhouse.villcode,\nhouse.hno,\nhouse.hcode,\nhouse.xgis,\nhouse.ygis,\nvisitfp.datedue,\ncdrug.drugname,\ncdrug.drugtypesub,\nvisitfp.datefp\nFROM\nhouse\nINNER JOIN person ON house.pcucode = person.pcucodeperson AND house.hcode = person.hcode\nINNER JOIN visitfp ON person.pcucodeperson = visitfp.pcucodeperson AND person.pid = visitfp.pid\ninner JOIN cdrug on visitfp.fpcode = cdrug.drugcode\nLEFT JOIN ctitle ON person.prename = ctitle.titlecode\nwhere visitfp.datedue = '{$str}') as perapp\nleft JOIN (SELECT visit.* FROM visit WHERE visit.visitdate = '{$str}') as vper \non perapp.pcucodeperson = vper.pcucodeperson and perapp.pid = vper.pid\nwhere perapp.pcucodeperson is not null {$chkncd} {$wvill}\norder by perapp.villcode,perapp.fname";
    $result = mysql_query($sql);
    $txt = '<p align=\'center\'><b>รายงานการนัดวางแผนครอบครัว';
    $txt .= "<br>ข้อมูลการนัดวันที่ {$_GET['str']} {$mu}</b></p><br><b>{$hosp}</b><table width='99%' border='0' cellspacing='1' cellpadding='1' class='table table-striped table-hover table-bordered'>\n  <tr>\n    <th width='4%' scope='col'><div align='center'>ลำดับ</div></th>\n\t<th width='10%' scope='col'><div align='center'>เลขบัตรประชาชน</div></th>\n    <th width='10%' scope='col'><div align='center'>ชื่อ - สกุล</div></th>\n\t<th width='5%' scope='col'><div align='center'>อายุ</div></th>\n    <th width='6%' scope='col'><div align='center'>บ้านเลขที่</div></th>\n\t<th width='4%' scope='col'><div align='center'>หมู่ที่</div></th>\n    <th width='4%' scope='col'><div align='center'>วันที่นัด</div></th>\n\t<th width='4%' scope='col'><div align='center'>ประเภทการนัด</div></th>\n\t<th width='9%' scope='col'><div align='center'>##</div></th>\n\t<th width='9%' scope='col'><div align='center'>วันที่มารับบริการ</div></th>\n\t\n  </tr>";
    while ($row = mysql_fetch_array($result)) {
        $moo = substr($row[villcode], 6, 2);
        $vill = getMooVillage($row[villcode]);
        $title = getTitle($row[prename]);
        if ($row[drugtypesub] == "0") {
            $apptypename = "วชย.ทดสอบตั้งครรภ์";
        } elseif ($row[drugtypesub] == "1") {
            $apptypename = "ยาเม็ด";
        } elseif ($row[drugtypesub] == "2") {
            $apptypename = "ยาฉีด";
        } elseif ($row[drugtypesub] == "3") {
            $apptypename = "ยาฝัง";
        } elseif ($row[drugtypesub] == "4") {
            $apptypename = "ห่วง";
        } elseif ($row[drugtypesub] == "5") {
            $apptypename = "ถุงยางอนามัย";
        } elseif ($row[drugtypesub] == "6") {
            $apptypename = "หมันชาย";
        } else {
            $apptypename = "หมันหญิง";
        }
        if ($row[datedue] == "") {
            $appsick = "";
        } else {
            $appsick = retDatets($row[datedue]);
        }
        if ($row[datechk] == "") {
            $sick = "";
        } else {
            $sick = retDatets($row[datechk]);
        }
        if ($row[datechk] == "") {
            $sicksign = "ขาดนัด";
        } else {
            $sicksign = "มาตามนัด";
        }
        ++$i;
        if ($i % 2 == 1) {
            $cr = " class='altrow'";
        } else {
            $cr = "";
        }
        $txt .= "  <tr {$cr}>\n    <td><div align='center'>{$i}</div></td>\n\t<td><div align='center'>{$row['idcard']}</div></td>\n    <td>{$row['pname']}</td>\n\t<td><div align='center'>{$row['age']}</div></td>\n    <td><div align='center'>{$row['hno']}</div></td>\n    <td><div align='center'>{$moo}</div></td>\n\t<td><div align='center'>{$appsick}</div></td>\n\t<td><div align='center'>{$apptypename}</div></td>\n\t<td><div align='center'>{$sicksign}</div></td>\n\t<td><div align='center'>{$sick}</div></td>\n  </tr>";
    }
    $txt .= "</table><br>";
    echo $txt;
}
开发者ID:nontage24,项目名称:gis4jhcis,代码行数:77,代码来源:xls_appmiss.php


示例17: getTitle

function getTitle($url)
{
    $fd = @fopen($url, 'r');
    if ($fd) {
        $html = fread($fd, 1750);
        fclose($fd);
        // Get title from title tag
        preg_match_all('/<title>(.*)<\\/title>/si', $html, $matches);
        $title = $matches[1][0];
        // Get encoding from charset attribute
        preg_match_all('/<meta.*charset=([^;"]*)">/i', $html, $matches);
        $encoding = strtoupper($matches[1][0]);
        // Convert to UTF-8 from the original encoding
        if (function_exists('mb_convert_encoding')) {
            $title = @mb_convert_encoding($title, 'UTF-8', $encoding);
        }
        if (utf8_strlen($title) > 0) {
            return $title;
        } else {
            // No title, so return filename
            $uriparts = explode('/', $url);
            $filename = end($uriparts);
            unset($uriparts);
            return $filename;
        }
    } else {
        return false;
    }
}
echo getTitle($_GET['url']);
开发者ID:kidwellj,项目名称:scuttle,代码行数:30,代码来源:ajaxGetTitle.php


示例18: right

    $ect1 = " visitepi.vaccinecode = '{$vaccine}' ";
}
$village = $_GET[village];
if ($village == '00000000') {
    $ect2 = "";
} else {
    $ect2 = " villcode = '{$village}' AND ";
}
$sql = "select\npcu,\npid,\npname,\nbirth,\nage,\nhno,\nvillcode,\nvillname,\nvaccinecode,\ndrugname,\ndateepi,\nxgis,\nygis\nFROM\n(SELECT\nperson.pcucodeperson as pcu,\nperson.pid as pid,\nconcat(ctitle.titlename,person.fname,' ',person.lname) AS pname,\nperson.fname,\nperson.birth as birth,\nround(DATEDIFF(now(),person.birth) /30) AS age,\nhouse.hno as hno,\nhouse.villcode as villcode,\nCONVERT(village.villname using utf8) AS villname,\nhouse.xgis,\nhouse.ygis\nFROM\nhouse\nInner Join person ON house.pcucode = person.pcucodeperson AND house.hcode = person.hcode\nInner Join village ON village.pcucode = house.pcucode AND village.villcode = house.villcode\nInner Join ctitle ON person.prename = ctitle.titlecode\nwhere right(house.villcode,2) <> '00' and ((person.dischargetype is null) or (person.dischargetype = '9')) and  round(DATEDIFF(now(),person.birth) /30)  IN({$ect0})\norder by age) as per_epi\nleft Join (SELECT\nperson.pcucodeperson as pcu1,\nperson.pid as pid1,\nvisitepi.vaccinecode,\ncdrug.drugname,\nvisitepi.dateepi\nFROM\nhouse\nInner Join person ON house.pcucode = person.pcucodeperson AND house.hcode = person.hcode\nInner Join village ON village.pcucode = house.pcucode AND village.villcode = house.villcode\nInner Join visitepi ON person.pcucodeperson = visitepi.pcucodeperson AND person.pid = visitepi.pid\nInner Join ctitle ON person.prename = ctitle.titlecode\nInner Join cdrug ON visitepi.vaccinecode = cdrug.drugcode\nwhere right(house.villcode,2) <> '00' and ((person.dischargetype is null) or (person.dischargetype = '9')) and  round(DATEDIFF(now(),person.birth) /30)  IN({$ect0}) and {$ect1}\n) as visit_epi ON per_epi.pcu = visit_epi.pcu1 AND per_epi.pid = visit_epi.pid1\nwhere {$ect2} pid1 is null\norder by right(villcode,2),fname";
$result = mysql_query($sql);
$xml = '<markers>';
while ($row = mysql_fetch_array($result)) {
    $moo = substr($row[villcode], 6, 2);
    $vill = getMooVillage($row[villcode]);
    $bod = retDatets($row[birth]);
    $title = getTitle($row[prename]);
    $dateepix = retDatets($row[dateepi]);
    $xml .= '<marker ';
    $xml .= 'hono="' . $row[hno] . '" ';
    $xml .= 'moo="' . $moo . '" ';
    $xml .= 'vill="' . $vill . '" ';
    $xml .= 'pname="' . $title . $row[pname] . '" ';
    $xml .= 'bod="' . $bod . '" ';
    $xml .= 'ag="' . $row[age] . '" ';
    $xml .= 'drugname="' . $row[drugname] . '" ';
    $xml .= 'vaccinecode="' . $row[vaccinecode] . '" ';
    $xml .= 'lat="' . $row[ygis] . '" ';
    $xml .= 'lng="' . $row[xgis] . '" ';
    $xml .= '/>';
}
$xml .= '</markers>';
开发者ID:nontage24,项目名称:gis4jhcis,代码行数:31,代码来源:genxml_epi_miss.php


示例19: getTitle

<?php

include 'functions.php';
$year = 2016;
$month = 01;
$day = 25;
getTitle($year, $month, $day);
开发者ID:umkin,项目名称:netpeak,代码行数:7,代码来源:test.php


示例20: isLoggedIn

<?php

// vim:set ts=4 sw=4 sts=4 et:
require_once "config.php";
require_once "html.php";
require_once "db-func.php";
require_once "utils.php";
// Redirect to the login page, if not logged in
$uid = isLoggedIn();
header("Content-type: text/json");
$puzzles = getPuzzlesInPostprodAndLater($uid);
$exportdata = array();
foreach ($puzzles as $pid) {
    # pid, status, title, slug, round name, round slug.
    $status = getStatusNameForPuzzle($pid);
    $title = getTitle($pid);
    $titleslug = postprodCanon($title);
    $rinfo = getRoundForPuzzle($pid);
    $answer = getAnswersForPuzzleAsList($pid);
    if ($rinfo) {
        $roundname = $rinfo['name'];
        $roundslug = postprodCanonRound($roundname);
        $exportdata[] = array('url' => "/{$roundslug}/{$titleslug}/", 'pid' => $pid, 'status' => $status, 'title' => $title, 'titleslug' => $titleslug, 'round' => $roundname, 'roundslug' => $roundslug, 'answer' => $answer);
    }
}
print json_encode($exportdata) . "\n";
开发者ID:portnoyslp,项目名称:puzzle-editing,代码行数:26,代码来源:postprod-export.php



注:本文中的getTitle函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getTitleArea函数代码示例发布时间:2022-05-15
下一篇:
PHP getTimestamp函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap