Ejemplo n.º 1
0
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>";
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
 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');
 }
Ejemplo n.º 4
0
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;
}
Ejemplo n.º 5
0
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 
}
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 ';
        }
    }
}
Ejemplo n.º 7
0
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);
    }
}
Ejemplo n.º 8
0
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;
}
/**
 * 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)];
}
Ejemplo n.º 10
0
        $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);
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 
Ejemplo n.º 12
0
     $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);
                         }
                     }
                 }
             }
         }
     }
Ejemplo n.º 13
0
                    <?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>
Ejemplo n.º 14
0
     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':
Ejemplo n.º 15
0
    <?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"]):?>
Ejemplo n.º 16
0
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;
}
Ejemplo n.º 17
0
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']);
Ejemplo n.º 18
0
    $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>';
Ejemplo n.º 19
0
<?php

include 'functions.php';
$year = 2016;
$month = 01;
$day = 25;
getTitle($year, $month, $day);
Ejemplo n.º 20
0
<?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";
Ejemplo n.º 21
0
<!--[if IE 8]>         <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Muximux - Application Management Console">
    <link rel="shortcut icon" href="favicon.ico" type="image/ico" />
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> <!-- Bootstrap (includes Glyphicons) -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" /> <!--FontAwesome-->
    <link rel="stylesheet" href="//fonts.googleapis.com/css?family=PT+Sans:400" type="text/css"> <!-- Font -->
    <link rel="stylesheet" href="css/reset.css"> <!-- CSS reset -->
    <link rel="stylesheet" href="css/style.css"> <!-- Resource style -->
    <script src="js/modernizr-2.8.3-respond-1.4.2.min.js"></script> <!-- Modernizr -->
    <title><?php 
echo getTitle($config);
?>
</title>
</head>

<body>
<!--[if lt IE 8]>
    <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->

<div class="cd-tabs">

        <?php 
echo menuItems($config);
?>
Ejemplo n.º 22
0
function showlist($path)
{
    global $ignore, $ignore_dirs, $id, $divs, $imgpath, $types, $startin;
    $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");
        echo "{$indent}<ul id=\"list{$id}\">\n";
        if ($n > $base) {
            $divs[] = "{$id}";
        }
        $imgsrc = "minus";
        foreach ($dirs as $d => $t) {
            $id++;
            /*echo "$indent\t<li><a href=\"javascript:toggle('list$id','img$id')\"><img src=\"$imgpath/$imgsrc.gif\" id=\"img$id\" align=\"middle\" border=\"0\" alt=\"\" /></a>";
            		echo "<img src=\"$imgpath/folder.gif\" alt=\"\" align=\"middle\" />";
            		echo " <strong><a href=\"$url/$d/\">$t</a></strong>\n";
            		showlist("$path/$d");
            		echo "$indent\t</li>\n";*/
            echo "{$indent}\t<li><a href=\"javascript:toggle('list{$id}','img{$id}')\"><img src=\"{$imgpath}/{$imgsrc}.gif\" id=\"img{$id}\" align=\"middle\" border=\"0\" alt=\"\" /></a>";
            echo "";
            echo " <strong>{$t}</strong>\n";
            showlist("{$path}/{$d}");
            echo "{$indent}\t</li>\n";
        }
        natcasesort($files);
        $id++;
        foreach ($files as $f => $t) {
            $f = retira_extensao($f);
            /*echo "$indent\t<li><img style=\"padding-left:20px;\" src=\"$imgpath/html.gif\" alt=\"\" border=\"0\" /> <a href=\"$url/$f\">$t</a></li>\n";*/
            echo "{$indent}\t<li><a href=\"{$url}/{$f}\">{$t}</a></li>\n";
        }
        echo "{$indent}</ul>\n";
    }
}
Ejemplo n.º 23
0
							$shelf = new Shelf();
		
							$shelf->setUserID($_COOKIE['userID']);
		
							$shelfList = $shelf->getListShelf();
		
							for($i = 0; $i < count($shelfList); $i++)
							{
								$article = $shelfList[$i]->getArticle();
								echo '<li><b><a target="_blank" href="'.$article->getURL().'">';
		
		/*
		pegando o título do artigo no Lang corrente, se não pega o titulo q tiver hehehe
		do arquivo functions.php
		*/
								echo getTitle($article->getTitle());
								echo '</a></b><br />'."\n";
								echo '<i>';
		/*
		criando a lista de Autores do artigo
		do arquivo functions.php
		*/
								echo getAutors($article->getAuthorXML());
		
								echo '</i><br />';
								
								echo '<i>'.$article->getSerial(). ', '.$article->getYear().', vol:'.$article->getVolume();
								echo ', n. '.$article->getNumber().', ISSN '.substr($article->getPID(),1,9).'</i><br/>'."\n";
								
								echo '<a href="/services/removeArticleFromShelf.php?PID='.$article->getPID().'">'.REMOVE_FROM_SHELF."</a>\n";
		
Ejemplo n.º 24
0
<!DOCTYPE html>

<html>
<head>
	<meta charset="UTF-8">
	<title><?php 
echo getTitle($PageContent);
?>
</title>
	<link href="css/<?php 
echo getTemplate($PageContent);
?>
.css" rel="stylesheet" type="text/css">
</head>
<body>
Ejemplo n.º 25
0
function prodPinterest($permalink, $keyword)
{
    $title = getTitle($keyword);
    return 'http://pinterest.com/pin/create/button?url=' . $permalink . '&amp;title=' . $title;
}
Ejemplo n.º 26
0
$player = $_GET["player"];
$bustCache = $_GET['bustCache'] || false;
$title;
$filename;
$key;
if ($path) {
    $title = getTitleFromXML($path);
    $paths = explode('/', $path);
    $filename = $paths[1];
} else {
    if ($player) {
        $title = getStatscard($player);
        $filename = $title["num"] . $title["first"] . $title["last"];
        $key = 'p' . $title['id'];
    } else {
        $title = getTitle($titleId, $eventId);
        $filename = $title["name"] . $title["id"];
        $key = $titleId;
    }
}
if (checkHashForTitle($title, $key) && $bustCache == false) {
    $img = file_get_contents(realpath('out') . '/' . $filename . '.' . IMGFMT);
    timestamp('Echoing cached version');
    if ($img && !$metrics) {
        header("Content-Type: image/" . IMGFMT);
        echo $img;
    }
    exit;
}
timestamp('pre-Imagick');
$canvas = new Imagick();
Ejemplo n.º 27
0
<?php

session_start();
include "../includes/helpers.php";
if (!isset($_SESSION['user'])) {
    header('location:login.php');
}
include '../includes/database.php';
$db = new Database();
$db->connect();
?>
<html>
	<head>
		<title><?php 
echo getTitle(__FILE__);
?>
</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<link rel="icon" href="<?php 
echo base_url();
?>
images/favicon.png" type="image/x-icon">
		<!--[if lte IE 8]><script src="<?php 
echo base_url();
?>
assets/js/ie/html5shiv.js"></script><![endif]-->
		<link rel="stylesheet" href="<?php 
echo base_url();
?>
assets/css/main.css" />
Ejemplo n.º 28
0
    <?php 
require_once "../server/Connection.class.php";
require_once "../server/lib.php";
//abre a conexao
$conn = new Connection();
//abre a conexao
$actionType = $_GET['actionType'];
$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
$html .= "<html xmlns='http://www.w3.org/1999/xhtml'>";
$html .= "<head>";
$html .= "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />";
$html .= getTitle($_GET['actionType']);
$html .= "<link rel='stylesheet' href='style/flexslider.css' />";
$html .= "<link rel='stylesheet' href='style/default.css' type='text/css' />";
//$html .="<link rel='stylesheet' href='style/rcarousel.css' />";
$html .= "</head>";
$html .= "<body>";
$mbanners = mysql_query("\r\n\t\tSELECT  \r\n\t\t\tfotos.CODFOTO,\r\n\t\t\tDATE_FORMAT( fotos.DTA, '%d/%m/%Y - %Hh%i' ) as DTA,\r\n\t\t\tfotos.TITULO,\r\n\t\t\tfotos.URL,\r\n\t\t\tfotos.STATUS,\r\n\t\t\tfotos.DESTAQUE,\r\n\t\t\tfotos.OWNER,\r\n\t\t\teventos." . $_GET['language'] . " as TITLE,\r\n\t\t\tdescricao." . $_GET['language'] . ",\r\n\t\t\teventos_rel_fotos.CODEVENTO\r\n\t\tFROM \r\n\t\tfotos \r\n\t\tINNER JOIN eventos_rel_fotos ON eventos_rel_fotos.CODFOTO=fotos.CODFOTO\r\n\t\tINNER JOIN eventos ON eventos_rel_fotos.CODEVENTO=eventos.CODEVENTO\r\n\t\tINNER JOIN eventos_rel_descricao ON eventos_rel_descricao.CODEVENTO=eventos.CODEVENTO\r\n\t\tINNER JOIN descricao ON eventos_rel_descricao.CODDESCRICAO=descricao.CODDESCRICAO\r\n\t\tWHERE fotos.DESTAQUE=1 \r\n\t\tAND fotos.STATUS=1\r\n\t\tAND eventos.STATUS=1\r\n\t\tGROUP BY eventos_rel_fotos.CODFOTO \r\n\t\tORDER BY fotos.DTA DESC \r\n\t\tLIMIT 0,3");
$n = mysql_num_rows($mbanners);
if ($n != 0) {
    if ($n != 1) {
        $html .= "<div class='eventos_container'>";
        $html .= "<ul id='eventos_carousel' class='eventos_ul slides'>";
        while ($mbanner = mysql_fetch_object($mbanners)) {
            $nm = explode(" ", $mbanner->TITLE);
            $nome = "";
            $i = 0;
            foreach ($nm as $n => $valor) {
                $i == 0 ? $nome .= "{$valor} " : ($nome .= "<strong>{$valor} </strong>");
                $i++;
            }
Ejemplo n.º 29
0
<!DOCTYPE html>

<html>
<head>
	<meta charset="UTF-8">
	<title><?php 
echo getTitle();
?>
</title>
	<link rel="stylesheet" href="templates/template.php">
	<link href="css/night.css" rel="stylesheet" type="text/css">
</head>
<body>
	<div class="wraper">
		<header>
		<section>
			<nav>
			 <?php 
echo getMenu();
?>
			</nav>
		</header>
			<article>
			  <?php 
echo getContent();
?>
			</article>
		</section>
		<footer>
		@ Remco de Zwart 2016
		</footer>
Ejemplo n.º 30
0
<?php

//$doc_Root    =   $_SERVER['DOCUMENT_ROOT'];
include $doc_Root . "/php/profile.php";
include $doc_Root . "/php/viewer.php";
//include($doc_Root."/php/performer.php");
$page_Title = getTitle();
$link_Tiles = linkTiles();
if ($_GET["l"] != true) {
    $temp_Limmit = 12;
    $back_Btn = '';
} else {
    $temp_Limmit = 1;
    $back_Btn = '<a href="' . $link_Tiles[1] . '" class="btn btn-primary btn-sm"><span class="glyphicon glyphicon-arrow-left"></span> Back to Gallery</a><hr>';
}
$imageGallery = imageGallery($temp_Limmit);
include $doc_Root . "/php/navbar.php";
include $doc_Root . "/php/header.php";
include $doc_Root . "/php/sidebar.php";
include $doc_Root . "/php/credits.php";
include $doc_Root . "/php/footer.php";
$body_Content = '
<div class="row">
    <div class="col-sm-9">
        <div class="text-left">
            ' . $imageGallery[2] . '
        </div>
        <div class="text-center">
            ' . $back_Btn . '
        </div>
        <div class="text-center">