本文整理汇总了PHP中friendly_url函数的典型用法代码示例。如果您正苦于以下问题:PHP friendly_url函数的具体用法?PHP friendly_url怎么用?PHP friendly_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了friendly_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: feed_display_name
function feed_display_name(&$record)
{
if ($record['display_name']) {
return $record['display_name'];
}
return friendly_url($record['feed_url']);
}
开发者ID:diplix,项目名称:Monocle,代码行数:7,代码来源:db_helpers.php
示例2: get_party
function get_party($short_name, $parties)
{
$k = 1;
foreach ($parties as $party) {
if ($party['party_short_name'] == $short_name) {
return array('party' => $party['party'], 'party_short_name' => $party['party_short_name'], 'id' => $k, 'friendly_name' => friendly_url($party['party_short_name']));
}
$k++;
}
}
开发者ID:totalrandom,项目名称:vaa2012-2,代码行数:10,代码来源:generate_answers_psp2013_podnikatel.php
示例3: do_registrar
function do_registrar($id)
{
$imagen = $this->upload_file('imagen');
$imagen2 = $this->upload_file('imagen2');
$logo = array();
if ($imagen) {
$logo['lo_nombre'] = $imagen['file_name'];
}
if ($imagen2) {
$logo['lo_nombre2'] = $imagen2['file_name'];
}
$logo['lo_usu_id'] = $id;
$logo['lo_key'] = friendly_url($logo['lo_nombre']);
$idinsert = $this->logotipo_model->save_logotipo($logo);
redirect('administrador/logotipo/listar_logotipos');
}
开发者ID:josu3e,项目名称:bolvar,代码行数:16,代码来源:logotipo.php
示例4: editar
function editar($id)
{
$val = $this->form_validation;
$val->set_rules('tipo', 'tipo', 'callback_reqsel_check|xss_clean');
$val->set_rules('nombre', 'nombre', 'required|xss_clean');
if ($val->run()) {
$data = array('cat_nombre' => $val->set_value('nombre'), 'cat_key' => friendly_url($val->set_value('nombre')), 'cat_padre' => $val->set_value('tipo'));
$this->categoria->update_file($id, $data);
$this->session->set_flashdata('msje', '<h2> La categoria con el id: <b>' . $id . '</b> fue editado correctamente </h2>');
redirect('administrador/categoria/listar');
} else {
$cont['categoria'] = $this->categoria->get_file($id);
$cont['tipo'] = $this->categoria->get_all_array(0);
$data['contenido'] = $this->load->view('administrador/categoria_editar', $cont, TRUE);
$this->load->view('administrador/template_admin', $data);
}
}
开发者ID:josu3e,项目名称:bolvar,代码行数:17,代码来源:categoria.php
示例5: do_registrar
function do_registrar()
{
$val = $this->form_validation;
$val->set_rules('cat_nombre', 'Nombre Categoria', 'trim|required|xss_clean');
if (!$val->run()) {
$this->load_registrar();
} else {
$res = '';
$ta_id = $this->input->post('tipoarticulo');
if ($ta_id == 1) {
$categoria = array('cat_nombre' => $this->input->post('cat_nombre'), 'cat_key' => friendly_url($this->input->post('cat_nombre')), 'cat_ta_id' => 1);
$res = $this->categorias_model->insert_categoria($categoria);
} else {
$categoria = array('cat_nombre' => $this->input->post('cat_nombre'), 'cat_ta_id' => 2);
$res = $this->categorias_model->insert_categoria($categoria);
}
redirect('administrador/categorias/listar_categorias');
}
}
开发者ID:josu3e,项目名称:bolvar,代码行数:19,代码来源:categorias.php
示例6: foreach
$answers_id[$key] = $ids;
}
//print_r($keys);die();
foreach ($answers0 as $key => $region) {
array_shift($region);
array_shift($region);
$i = 1;
foreach ($region as $row) {
//print_r($row);die();
$vote = array();
foreach ($answers_id[$key] as $ikey => $id) {
$vote[$id] = answer2value($row[$ikey]);
}
if (isset($parties[$row[$unique_code_column[$key]]])) {
$party = $parties[$row[$unique_code_column[$key]]];
$data[$key][] = array('vote' => $vote, 'last_name' => $party['last_name'], 'first_name' => $party['first_name'], 'short_name' => $party['short_name'], 'name' => $party['name'], 'friendly_name' => friendly_url($party['last_name']), 'id' => $i);
$i++;
} else {
//report wrong unique key
echo $key . "::" . $row[$unique_code_column[$key]] . "<br/>\n";
}
}
//print_r($data);die();
//if direcotry not existing, create it
$dir = $path . 'volba-prezidenta-cr-2-kolo' . '-2013/';
if (!file_exists($dir)) {
mkdir($dir);
}
$fout = fopen($dir . 'answers.json', "w+");
$json = json_encode($data[$key]);
fwrite($fout, $json);
开发者ID:totalrandom,项目名称:vaa2012-2,代码行数:31,代码来源:generate_answers_president.php
示例7: foreach
}
}
$answers_id[$key] = $ids;
}
//print_r($answers0);die();
foreach ($answers0 as $key => $region) {
array_shift($region);
$i = 1;
foreach ($region as $row) {
$vote = array();
foreach ($answers_id[$key] as $ikey => $id) {
$vote[$id] = answer2value($row[$ikey]);
}
if (isset($parties[$row[$unique_code_column[$key]]])) {
$party = $parties[$row[$unique_code_column[$key]]];
$data[$key][] = array('vote' => $vote, 'last_name' => $party['last_name'], 'first_name' => $party['first_name'], 'short_name' => $party['short_name'], 'name' => $party['name'], 'party' => $party['party'], 'constituency_code' => $party['constituency_code'], 'friendly_name' => friendly_url($party['party']), 'id' => $i);
$i++;
} else {
//report wrong unique key
echo $key . "::" . $row[$unique_code_column[$key]] . "<br/>\n";
}
}
//print_r($data);die();
//if direcotry not existing, create it
$dir = $path . 'senat' . '-2012/';
if (!file_exists($dir)) {
mkdir($dir);
}
$fout = fopen($dir . 'answers.json', "w+");
$json = json_encode($data[$key]);
fwrite($fout, $json);
开发者ID:totalrandom,项目名称:vaa2012-2,代码行数:31,代码来源:generate_answers_senat.php
示例8: header
header('location: ./mn-galleries.php?back=added');
exit;
} else {
overal_header($lang['galleries_galleries'], $lang['galleries_msg_put_contents_error'], 'error');
}
} else {
overall_header($lang['galleries_galleries'], $lang['galleries_msg_empty_gallery_name'], 'error');
}
} elseif (isset($_POST['action']) && $_POST['action'] == 'edit' && isset($_POST['id']) && file_exists($file['galleries'])) {
if (!empty($_POST['gallery_name'])) {
$galleries_file = file($file['galleries']);
$galleries_file_content = '';
foreach ($galleries_file as $single_line) {
$gallery_data = explode(DELIMITER, $single_line);
if ($gallery_data[0] == $_POST['id']) {
$galleries_file_content .= $gallery_data[0] . DELIMITER . $_POST['gallery_name'] . DELIMITER . friendly_url($_POST['gallery_name']) . "\n";
} else {
$galleries_file_content .= $single_line;
}
}
if (mn_put_contents($file['galleries'], $galleries_file_content)) {
header('location: ./mn-galleries.php?back=edited');
exit;
} else {
overal_header($lang['galleries_galleries'], $lang['galleries_msg_put_contents_error'], 'error');
}
} else {
overall_header($lang['galleries_galleries'], $lang['galleries_msg_empty_gallery_name'], 'error');
}
} elseif (isset($_GET['action']) && $_GET['action'] == 'edit' && isset($_GET['id']) && file_exists($file['galleries']) && !empty($var['gallery_name'])) {
overall_header($lang['galleries_edit_gallery'] . ' » ' . $var['gallery_name'], $lang['galleries_edit_gallery'], 'main');
开发者ID:deanbrabec,项目名称:news_slider,代码行数:31,代码来源:mn-galleries.php
示例9: htmlspecialchars
?>
single h-entry">
<td>
<div class="title p-name"><a href="<?php
echo $this->post->href;
?>
" class="u-url"><?php
echo htmlspecialchars($this->post->title ?: preg_replace('/^https?:\\/\\//', '', $this->post->href));
?>
</a></div>
<div class="details">
<span class="p-author h-card"><a href="<?php
echo $this->post->post_author;
?>
" class="u-url"><?php
echo friendly_url($this->post->post_author);
?>
</a></span> |
<? if($this->post->in_reply_to) { ?>
<a href="<?php
echo $this->post->in_reply_to;
?>
" class="u-in-reply-to"><?php
echo __('in reply to');
?>
</a> |
<? } ?>
<?php
echo $this->post->post_date ? '<time class="dt-published" datetime="' . date('c', strtotime($this->post->post_date)) . '">' . date('Y-m-d H:i T', strtotime($this->post->post_date)) . '</time> |' : '';
?>
<?php
开发者ID:voxpelli,项目名称:IndieNews,代码行数:31,代码来源:_post-row.php
示例10: foreach
//for each region
foreach ($out as $key => $region) {
print_r($key);
//if direcotry not existing, create it
$dir = $path . friendly_url($regions[$key]['name']) . '-2012/';
if (!file_exists($dir)) {
mkdir($dir);
}
//questions
$fout = fopen($dir . 'questions.json', "w+");
$json = json_encode($region);
fwrite($fout, $json);
fclose($fout);
//info about region
$rout = $regions[$key];
$rout['friendly_calc_url'] = friendly_url($regions[$key]['name']) . '-2012';
$rout['calc'] = $regions[$key]['name'] . ' 2012';
$fout = fopen($dir . 'region.json', "w+");
$json = json_encode($rout);
fwrite($fout, $json);
fclose($fout);
}
/**
* creates "friendly url" version of text, translits string (gets rid of diacritics) and substitutes ' ' for '-', etc.
* @return friendly url version of text
* example:
* friendly_url('klub ČSSD')
* returns 'klub-cssd'
*/
function friendly_url($text, $locale = 'cs_CZ.utf-8')
{
开发者ID:totalrandom,项目名称:vaa2012-2,代码行数:31,代码来源:generate_questions_senat.php
示例11: user_auth
<?php
include './stuff/inc/mn-start.php';
# --- xFIELDs
if (isset($_GET['action']) && $_GET['action'] == 'xfields') {
$auth = user_auth('8');
$xfields = get_unserialized_array('xfields');
# --- add new xField
if (isset($_POST['action']) && $_POST['action'] == 'xfield_add') {
if (!in_array($_POST['field_section'], array('posts', 'comments', 'pages', 'users'))) {
die;
} else {
$xSection = $_POST['field_section'];
}
$xName = check_text(trim($_POST['field_name']), true);
$xVar = str_replace('-', '_', friendly_url(trim($_POST['field_variable'])));
$xType = $_POST['field_type'] == 'select' && !empty($_POST['field_options']) ? 'select' : 'input';
if (empty($xName) || empty($xVar) || array_key_exists($xVar, $xfields)) {
$var = array('name' => $xName, 'var' => $xVar, 'section' => $xSection, 'type' => $xType, 'options' => trim($_POST['field_options']), 'action' => 'add');
$admin_tmpl['xfields_list'] = true;
$xError = array_key_exists($xVar, $xfields) ? 'xfields_msg_variable_exists' : 'xfields_msg_empty_fields';
overall_header($lang['xfields_xfields'], $lang[$xError], 'error');
} else {
if ($xType == 'select' && !empty($_POST['field_options'])) {
$xOptions = array();
$xOptions_lines = explode("\n", trim($_POST['field_options']));
foreach ($xOptions_lines as $xLine) {
$xO = explode('=', check_text($xLine, true));
if (isset($xO[1])) {
$xOptions[$xO[0]] = $xO[1];
} else {
开发者ID:deanbrabec,项目名称:news_slider,代码行数:31,代码来源:mn-tools.php
示例12: friendly_url
<?php
if (session('me')) {
?>
<li><a href="/channels">Channels</a></li>
<?php
}
?>
<!-- <li><a href="/docs">Docs</a></li> -->
</ul>
<ul class="nav navbar-nav navbar-right">
<?php
if (session('me')) {
?>
<li><span class="navbar-text"><?php
echo friendly_url(session('me'));
?>
</span></li>
<li><a href="/signout">Sign Out</a></li>
<?php
/* } else if(!property_exists($this, 'authorizing')) { ?>
<li class="navbar-text"><?= $this->authorizing ?></li>
<?php */
} else {
?>
<form action="/auth/start" method="get" class="navbar-form">
<input type="text" name="me" placeholder="yourdomain.com" class="form-control" />
<button type="submit" class="btn">Sign In</button>
</form>
<?php
}
开发者ID:diplix,项目名称:Monocle,代码行数:31,代码来源:layout.php
示例13: header
header('location: ./mn-categories.php?back=added');
exit;
} else {
overal_header($lang['cats_categories'], $lang['cats_msg_put_contents_error'], 'error');
}
} else {
overall_header($lang['cats_categories'], $lang['cats_msg_empty_cat_name'], 'error');
}
} elseif (isset($_POST['action']) && $_POST['action'] == 'edit' && isset($_POST['id']) && file_exists($file['categories'])) {
if (!empty($_POST['cat_name'])) {
$cats_file = file($file['categories']);
$cats_file_content = '';
foreach ($cats_file as $single_line) {
$cat_data = explode(DELIMITER, $single_line);
if ($cat_data[0] == $_POST['id']) {
$cats_file_content .= $cat_data[0] . DELIMITER . $_POST['cat_name'] . DELIMITER . friendly_url($_POST['cat_name']) . "\n";
} else {
$cats_file_content .= $single_line;
}
}
if (mn_put_contents($file['categories'], $cats_file_content)) {
header('location: ./mn-categories.php?back=edited');
exit;
} else {
overal_header($lang['cats_categories'], $lang['cats_msg_put_contents_error'], 'error');
}
} else {
overall_header($lang['cats_categories'], $lang['cats_msg_empty_cat_name'], 'error');
}
} elseif (isset($_GET['action']) && $_GET['action'] == 'edit' && isset($_GET['id']) && file_exists($file['categories']) && !empty($var['cat_name'])) {
overall_header($lang['cats_edit_category'] . ' » ' . $var['cat_name'], $lang['cats_edit_category'], 'main');
开发者ID:deanbrabec,项目名称:news_slider,代码行数:31,代码来源:mn-categories.php
示例14: foreach
foreach ($region as $row) {
$vote = array();
foreach ($answers_id[$key] as $ikey => $id) {
$vote[$id] = answer2value($row[$ikey]);
}
if (isset($parties[$row[$unique_code_column[$key]]])) {
$party = $parties[$row[$unique_code_column[$key]]];
$data[$key][] = array('vote' => $vote, 'name' => $party['name'], 'short_name' => $party['short_name'], 'friendly_name' => friendly_url($party['short_name']), 'id' => $i);
$i++;
} else {
//report wrong unique key
echo $key . "::" . $row[$unique_code_column[$key]] . "<br/>\n";
}
}
//if direcotry not existing, create it
$dir = $path . friendly_url($regions[$key]['name']) . '-2012/';
if (!file_exists($dir)) {
mkdir($dir);
}
$fout = fopen($dir . 'answers.json', "w+");
$json = json_encode($data[$key]);
fwrite($fout, $json);
fclose($fout);
}
print_r($data);
die;
function answer2value($a)
{
if ($a == 'Souhlasím.') {
return 1;
}
开发者ID:totalrandom,项目名称:vaa2012-2,代码行数:31,代码来源:generate_answers_kraje.php
示例15: array
$path = '../www/';
$out = array();
$i = 1;
while (($row = fgetcsv($fin)) !== FALSE) {
if ($i == 1) {
$j = 0;
$ids = array();
foreach ($row as $item) {
if ($j >= $columns) {
$ids[$j] = $item;
}
$j++;
}
} else {
if ($i > 2) {
$mp = array('last_name' => $row[1], 'first_name' => $row[0], 'party' => $row[2], 'friendly_name' => friendly_url($row[2]), 'id' => $row[6], 'sex' => $row[5], 'region' => $row[4], 'party_long' => $row[3]);
for ($j = $columns; $j < count($row); $j++) {
if (trim($row[$j]) != '') {
$mp['vote'][$ids[$j]] = $row[$j];
}
}
$out[] = $mp;
}
}
$i++;
}
$fout = fopen($path . $directory . 'answers.json', "w+");
$json = json_encode($out);
fwrite($fout, $json);
fclose($fout);
/**
开发者ID:totalrandom,项目名称:vaa2012-2,代码行数:31,代码来源:generate_answers_psp2013_inventura.php
示例16: decode_friendly
function decode_friendly($url)
{
return friendly_url($url, false);
}
开发者ID:jbaicoianu,项目名称:elation,代码行数:4,代码来源:common_funcs.php
示例17: Smarty
<?php
// put full path to Smarty.class.php
require '/usr/local/lib/php/Smarty/libs/Smarty.class.php';
$smarty = new Smarty();
$smarty->setTemplateDir('../../smarty/templates');
$smarty->setCompileDir('../../smarty/templates_c');
$smarty->setCacheDir('../../smarty/cache');
$smarty->setConfigDir('../../smarty/configs');
//regions
include '../regions.php';
//add friendly url
foreach ($regions as $key => $r) {
$regions[$key]['friendly_url'] = friendly_url($r['name'] . '-2012') . '/?';
}
$constit = array('0' => 'Celá ČR', '2' => 'Sokolov (2)', '5' => 'Chomutov (5)', '8' => 'Rokycany (8)', '11' => 'Domažlice (11)', '14' => 'České Budějovice (14)', '17' => 'Praha 12 (17)', '20' => 'Praha 4 (20)', '23' => 'Praha 8 (23)', '26' => 'Praha 2 (26)', '29' => 'Litoměřice (29)', '32' => 'Teplice (32)', '35' => 'Jablonec nad Nisou (35)', '38' => 'Mladá Boleslav (38)', '41' => 'Benešov (41)', '44' => 'Chrudim (44)', '47' => 'Náchod (47)', '50' => 'Svitavy (50)', '53' => 'Třebíč (53)', '56' => 'Břeclav (56)', '59' => 'Brno-město (59)', '62' => 'Prostějov (62)', '65' => 'Šumperk (65)', '68' => 'Opava (68)', '71' => 'Ostrava-město (71)', '74' => 'Karviná (74)', '77' => 'Vsetín (77)', '80' => 'Zlín (80)');
foreach ($constit as $ckey => $c) {
$constit[$ckey] = array('name' => $c, 'friendly_url' => $ckey == 0 ? 'senat-2012/?' : 'senat-2012/page.php?constituency_code=' . $ckey . '&');
}
$inventory2014 = array(array('name' => 'Inventura hlasování ve Sněmovně 2014', 'friendly_url' => 'inventura-hlasovani-2014', 'custom' => true));
$calc2014zdarnadsazavou = array(array('name' => 'Volební kalkulačka Žďár nad Sázavou 2014', 'friendly_url' => 'zdar-nad-sazavou-2014', 'custom' => true));
$calc2014karlovyvary = array(array('name' => 'Volební kalkulačka Karlovy Vary 2014', 'friendly_url' => 'karlovy-vary-2014', 'custom' => true));
$calc2014trutnov = array(array('name' => 'Volební kalkulačka Trutnoc 2014', 'friendly_url' => 'trutnov-2014', 'custom' => true));
$calc2014ceskebudejovice = array(array('name' => 'Volební kalkulačka České Budějovice 2014', 'friendly_url' => 'ceske-budejovice-2014', 'custom' => true));
$calc2014olomouc = array(array('name' => 'Volební kalkulačka Olomouc 2014', 'friendly_url' => 'olomouc-2014', 'custom' => true));
$calc2014liberec = array(array('name' => 'Volební kalkulačka Liberec 2014', 'friendly_url' => 'liberec-2014', 'custom' => true));
$calc2014liberec2010 = array(array('name' => 'Inventura hlasování Liberec 2010-2014', 'friendly_url' => 'liberec-2010-2014', 'custom' => true));
$calc2014decin = array(array('name' => 'Volební kalkulačka Děčín 2014', 'friendly_url' => 'decin-2014', 'custom' => true));
$calc2014prostejov = array(array('name' => 'Volební kalkulačka Prostějov 2014', 'friendly_url' => 'prostejov-2014', 'custom' => true));
$calc2014pardubice = array(array('name' => 'Volební kalkulačka Pardubice 2014', 'friendly_url' => 'pardubice-2014', 'custom' => true));
$calc2014bohumin = array(array('name' => 'Volební kalkulačka Bohumín 2014', 'friendly_url' => 'bohumin-2014', 'custom' => true));
开发者ID:totalrandom,项目名称:vaa2012-2,代码行数:31,代码来源:index.php
示例18: menu_tratamentos
function menu_tratamentos()
{
global $pdo;
$sql = "SELECT * FROM tb_paginas WHERE tipo = 'tratamentos' AND status = '1' ORDER BY subtitulo ASC, datacad DESC";
$exec = $pdo->query($sql);
$count = $exec->rowCount();
echo '<li class="atvdo">';
echo '<a class="sub-menu pointer">tratamentos</a>';
echo '<img class="sub-menu" src="' . url_site() . 'imagens/sub-menu.png" alt="">';
echo '<ul class="insub-menu">';
echo '<img class="img-submenu" src="' . url_site() . 'imagens/top-submenu.png" alt="">';
foreach ($exec as $tratamento) {
echo '<li><a href="' . url_site() . 'tratamentos/' . friendly_url($tratamento['titulo']) . '">' . $tratamento['titulo'] . '</a></li>';
}
echo '</ul>';
echo '</li>';
}
开发者ID:mvnp,项目名称:purophp,代码行数:17,代码来源:functions.php
示例19: ZobrazMenu
function ZobrazMenu($spojeni)
{
?>
<div id="vrch">
<div id="pole">
<a href="http://www.koneridec.cz/"><img height="100" src="img/logo.png" title="Vyjíždky na koních Koně řídeč " alt="Vyjíždky na koních Koně Řídeč"/></a>
<div id="menu">
<ul id="nav">
<?php
$sql = "SELECT * from hlavnimenu order by poradi";
$res = PrSql($spojeni, $sql);
$pocet = mysqli_num_rows($res);
setlocale(LC_ALL, 'czech');
$i = 1;
while ($zaznam = mysqli_fetch_array($res)) {
$id = $zaznam["id"];
$nazev = $zaznam["nazev"];
$typ = $zaznam["typ"];
$input = friendly_url($nazev);
$class = "";
if ($i == 1) {
$class = "class=\"first\"";
}
if ($i == $pocet) {
$class = "class=\"noborder\"";
}
?>
<li><a href="<?php
echo $input;
?>
.html" <?php
echo $class;
?>
><?php
echo $nazev;
?>
</a>
<?php
/* if ($typ=="T") {$rr=$rr."RewriteRule ^$input.html index.php?cmd=zobrazContent&id=$id\n";}
if ($typ=="K") {$rr=$rr."RewriteRule ^$input.html index.php?cmd=zobrazKone&id=-1\n";}
if ($typ=="G") {$rr=$rr."RewriteRule ^$input.html index.php?cmd=zobrazGalerii\n";}
if ($typ=="U") {$rr=$rr."RewriteRule ^$input.html index.php\n";}
if ($typ=="G") {$rr=$rr."RewriteRule ^$input.html index.php?cmd=zobrazGalerii\n";}
if ($typ=="V") {$rr=$rr."RewriteRule ^$input.html index.php?cmd=zobrazVzkazy\n";}
*/
if ($typ == "K") {
$sqlk = "SELECT * from konemenu order by poradi";
$resk = PrSql($spojeni, $sqlk);
$pocetk = mysqli_num_rows($resk);
$j = 1;
echo " <ul>";
while ($zaznamk = mysqli_fetch_array($resk)) {
$id = $zaznamk["id"];
$nazevk = $zaznamk["nazev"];
$input = friendly_url($nazevk);
if ($j == 1) {
$class = "class=\"top\"";
}
if ($j == $pocetk) {
$class = "class=\"bottom\"";
}
?>
<li><a href="kone-ridec-<?php
echo $input;
?>
.html" <?php
echo $class;
?>
><?php
echo $nazevk;
?>
</a></li>
<?php
$rr = $rr . "RewriteRule ^kone-ridec-{$input}.html index.php?cmd=zobrazKone&id={$id}\n";
$j = $j + 1;
}
echo "</ul>";
}
if ($typ == "M") {
$sqlk = "SELECT * from content_menu where id_hlavni_menu=" . $zaznam["id"] . " order by poradi";
$resk = PrSql($spojeni, $sqlk);
$pocetk = mysqli_num_rows($resk);
$j = 1;
echo " <ul>";
while ($zaznamk = mysqli_fetch_array($resk)) {
$id = $zaznamk["id_content_Menu"];
$nazevk = $zaznamk["nazev"];
$input = friendly_url($nazevk);
if ($j == 1) {
$class = "class=\"top\"";
}
if ($j == $pocetk) {
$class = "class=\"bottom\"";
}
?>
<li><a href="tabory-<?php
echo $input;
?>
.html" <?php
//.........这里部分代码省略.........
开发者ID:ctiborv,项目名称:koneridec.cz,代码行数:101,代码来源:funkce.php
示例20: unique_code2id
function unique_code2id($unique_code, $parties, $json)
{
if (isset($parties[$unique_code])) {
$party = $parties[$unique_code];
foreach ($json as $p) {
if ($p->friendly_name == friendly_url($party['party_short_name'])) {
return $p->id;
}
}
} else {
echo "<br/>unique code not present in parties: **{$unique_code}**<br/>";
return false;
}
}
开发者ID:totalrandom,项目名称:vaa2012-2,代码行数:14,代码来源:generate_answers_psp2013_2.php
注:本文中的friendly_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论