public function inicio() { if (esta_logado(FALSE)) { set_tema('titulo', 'Início'); set_tema('conteudo', '<div class="twelve columns">' . breadcrumb() . '<p>Escolha um menu para iniciar</p></div>'); load_template(); } else { redirect('usuarios/login'); } }
<?php require_once 'db.member.inc.php'; require_once 'frm_functions.inc.php'; require_once 'frm_http.inc.php'; if (!isset($_GET['f'])) { redirect('frm_index.php'); } require_once 'frm_header.inc.php'; $forumid = $_GET['f']; $forum = getForum($forumid); echo breadcrumb($forumid, "F"); if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $limit = $admin['pageLimit']['value']; if ($limit == "") { $limit = 25; } $start = ($page - 1) * $admin['pageLimit']['value']; $sql = "CREATE TEMPORARY TABLE tmp ( " . "topic_id INT(11) NOT NULL DEFAULT 0, " . "postdate datetime NOT NULL default '0000-00-00 00:00:00');"; mysql_query($sql) or die(mysql_error() . "<br />" . $sql); $sql = "LOCK TABLES forum_users READ, forum_posts READ;"; mysql_query($sql) or die(mysql_error() . "<br />" . $sql); $sql = "INSERT INTO tmp SELECT topic_id, MAX(date_posted) " . "FROM forum_posts " . "WHERE forum_id = {$forumid} " . "AND topic_id > 0 " . "GROUP BY topic_id;"; mysql_query($sql) or die(mysql_error() . "<br />" . $sql); $sql = "UNLOCK TABLES"; mysql_query($sql) or die(mysql_error() . "<br />" . $sql); // die('stop');
function bt_titulo($s = NULL) { $CI =& get_instance(); $t = ucfirst(str_replace('_', ' ', $CI->router->method)); if ($s == NULL) { $sub = ''; } else { $sub = '<small>' . $s . '</small>'; } if ($t == 'Index') { $t = 'Painel'; } return '<div class="row"> <div class="col-md-12"> <h1 class="page-header"> ' . $t . ' ' . $sub . ' </h1> ' . breadcrumb() . ' </div> </div>'; }
<?php $breacrumb_params = array(); if (isset($params['current-page-as-root'])) { $breacrumb_params['current-page-as-root'] = $params['current-page-as-root']; } $selected_start_depth = get_option('data-start-from', $params['id']); if ($selected_start_depth) { $breacrumb_params['start_from'] = $selected_start_depth; } //dd($breacrumb_params); $data = breadcrumb($breacrumb_params); $module_template = get_option('data-template', $params['id']); if ($module_template == false and isset($params['template'])) { $module_template = $params['template']; } if ($module_template != false) { $template_file = module_templates($config['module'], $module_template); } else { $template_file = module_templates($config['module'], 'default'); } if (is_file($template_file) != false) { include $template_file; } else { $template_file = module_templates($config['module'], 'default'); if (is_file($template_file) != false) { include $template_file; } else { print lnotif("No template found. Please choose template."); } }
} // Retrieve data for the current album if (isset($CURRENT_PIC_DATA)) { $result = cpg_db_query("SELECT title, comments, votes, category, aid FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid='{$CURRENT_PIC_DATA['aid']}' LIMIT 1"); if (!mysql_num_rows($result)) { cpg_die(CRITICAL_ERROR, sprintf($lang_errors['pic_in_invalid_album'], $CURRENT_PIC_DATA['aid']), __FILE__, __LINE__); } $CURRENT_ALBUM_DATA = mysql_fetch_array($result); if (is_numeric($album)) { $cat = -$album; $actual_cat = $CURRENT_ALBUM_DATA['category']; breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text); $cat = -$album; } else { $actual_cat = $CURRENT_ALBUM_DATA['category']; breadcrumb($actual_cat, $breadcrumb, $breadcrumb_text); } } if (!isset($_GET['pos'])) { cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__); } $enlargeit_add_your_comment = str_replace('{{ENL_JSCOMMENT}}', "enl_geto('" . $_GET['enl_img'] . "').commenttext = encodeURIComponent(this.value);", $enlargeit_add_your_comment); $enlargeit_add_your_comment = str_replace('{{ENL_JSNAME}}', "if (this.value == '" . $lang_display_comments['your_name'] . "') this.value='';enl_geto('" . $_GET['enl_img'] . "').commentname = encodeURIComponent(this.value);", $enlargeit_add_your_comment); $enlargeit_add_your_comment = str_replace('{{ENL_JSSUBMIT}}', "this.name='index.php?file=enlargeit/enl_addcomment&enl_img=" . $_GET['enl_img'] . "&pos=" . $_GET['pos'] . "&msg_author='+enl_geto('" . $_GET['enl_img'] . "').commentname+'&msg_body='+enl_geto('" . $_GET['enl_img'] . "').commenttext+'&event=comment&rnd=" . rand(1, 9999) . "';enl_geto('" . $_GET['enl_img'] . "').commenttext='';enl_geto('" . $_GET['enl_img'] . "').commentname='';enl_ajaxfollow(this);return false;", $enlargeit_add_your_comment); $comments = enlargeit_html_comments($CURRENT_PIC_DATA['pid']); if ($comments) { echo $comments; } else { echo '<table cellspacing="1" style="width:100%;height:100%">'; echo '<tr>'; echo '<td class="enl_infotablehead" align="center"><b>' . $lang_enlargeit['enl_cantcomment'] . '</b><br />';
function make_pic_descr($pic, $row) { global $CONFIG; $txt = ""; $breadcrumb = " "; $ret = "<table><tr><td>"; $pic_url = make_pic_url($pic, $size, FALSE); $size = isset($row['pic_size']) ? $row['pic_size'] : "Thumb"; $comments = isset($row['item_comments']) ? $row['item_comments'] : "No"; $content = isset($row['item_content']) ? $row['item_content'] : " "; switch ($size) { case "Normal": $width = $CONFIG['picture_width']; break; case "Thumb": $width = $CONFIG['thumb_width']; break; } $ret .= "<a href =\"" . $CONFIG['ecards_more_pic_target'] . "displayimage.php?pos=-" . $pic['pid'] . "\">"; $ret .= "<img src=\"" . $pic_url . "\" width=\"" . $width . "\" alt=\"RSS image\" /></a></td>"; $n = 0; $content = "x" . $content; //x to avoid hitting anchor in first position (0= false) while ($pos = strpos($content, "{")) { $n++; $len = strpos($content, "}") - $pos + 1; $cmd = substr($content, $pos, $len); $exif = exif_parse_file("albums/" . $pic['file']); switch ($cmd) { case "{br}": $content = str_replace($cmd, "<br />", $content); break; case "{adate}": $content = str_replace($cmd, strftime("%x", $pic['ctime']), $content); break; case "{album}": $content = str_replace($cmd, $pic['atitle'], $content); break; case "{fname}": $content = str_replace($cmd, $pic['filename'], $content); break; case "{fsize}": $content = str_replace($cmd, intval($pic['filesize'] / 1024) . " kB", $content); break; case "{title}": $content = str_replace($cmd, $pic['title'], $content); break; case "{hits}": $content = str_replace($cmd, $pic['hits'], $content); break; case "{rating}": $content = str_replace($cmd, $pic['rating'], $content); break; case "{descr}": $content = str_replace($cmd, $pic['caption'], $content); break; case "{miniCMS}": if (isset($CONFIG['TABLE_CMS'])) { $txt = getMiniCMS($pic['pid']); } $content = str_replace($cmd, $txt, $content); break; case "{owner}": $content = str_replace($cmd, $pic['owner_name'], $content); break; case "{cat}": $i = $pic['category']; if (!isset($alb_name[$i])) { $query = "SELECT title FROM " . $CONFIG['TABLE_ALBUMS'] . " WHERE aid=" . $pic['category']; if ($result = cpg_db_query($query)) { $title = cpg_db_fetch_row($result); $alb_name[$pic['category']] = $title['title']; } } $name = $alb_name[$pic['category']]; $content = str_replace($cmd, $name, $content); break; case "{bread}": $breadcrumb = " "; breadcrumb($pic['category'], $breadcrumb, $BREADCRUMB_TEXT); $content = str_replace($cmd, $breadcrumb, $content); break; case "{make}": $exif = exif_parse_file("albums/" . $pic['file']); $param = substr($exif['Make'], 0, -1); $content = str_replace($cmd, $param, $content); break; case "{model}": $param = substr($exif['Model'], 0, -1); $content = str_replace($cmd, $param, $content); break; case "{keyw}": $content = str_replace($cmd, $pic['keywords'], $content); break; case "{date}": $param = substr($exif['DateTime Original'], 0, -1); $content = str_replace($cmd, $param, $content); break; default: /*print_r ($exif); die();*/ $lookup = substr($cmd, 1, -1); if (isset($exif[$lookup])) { $param = $exif[$lookup]; if (!ord(substr($param, -1))) { $param = substr($param, 0, -1); //some exif values ends with a ascii 0 character } } else { $param = substr($cmd, 1, -1) . " not valid anchor"; // $param = $cmd." not valid anchor"; } $content = str_replace($cmd, $param, $content); break; } // if ($n>5) die ("ut: ".$content); } $content = substr($content, 1); $ret .= "<td valign=\"top\">" . $content . "</td></tr>"; if ($comments == "Yes") { $coms = get_pic_comments($pic['pid']); if (count($coms) > 0) { foreach ($coms as $com) { $ret .= "<tr><td> </td><td><p>" . $com['msg_author'] . ": " . $com['msg_body'] . "</td></tr>"; } } } $ret .= "</table>"; return bb_decode($ret); }
<?php get_header(); breadcrumb(); ?> <div class="container center"> <img style="margin:50px 0;" src="<?php echo get_template_directory_uri(); ?> /image/404.png" alt="404页面"> </div> <?php get_footer();
function breadcrumb_wrapper($match) { return breadcrumb($GLOBALS['content']["cat_id"], $GLOBALS['content']["struct"], empty($match[1]) ? 0 : $match[1], $GLOBALS['template_default']["breadcrumb_spacer"]); }
echo "" . $locale['NOAKX101'] . "<br>"; echo "<a href='" . BASEDIR . "members.php?action=rights'>" . $locale['NOAKX102'] . "</a>"; } else { echo "<center>" . $locale['NOAKX100'] . "<br>"; echo "" . $locale['NOAKX103'] . "<br>"; echo "<a href='" . BASEDIR . "contact.php'>" . $locale['NOAKX104'] . "</a>"; } echo "</center>"; echo "<br>"; require_once "footer.php"; require_once BASEDIR . "side_right.php"; require_once BASEDIR . "footer.php"; exit; } if (isset($category) && isNum($category)) { echo '<table><tr><td align="left">[ <a href="' . FUSION_SELF . '?category=' . $category . '&rowstart=' . $rowstart . '&setdetiledview"><img src="img/view_detailed.png" alt="' . $locale['MKROAX108'] . '"></a> <a href="' . FUSION_SELF . '?category=' . $category . '&rowstart=' . $rowstart . '&setthumbview"><img src="img/view_thumbs.png" alt="' . $locale['MKROAX107'] . '"></a> ] [ ' . breadcrumb($category, '1') . ' ]</td></tr></table>'; $result = dbquery("select * from " . $db_prefix . "kroax_kategori WHERE status='1' AND parentid='" . $category . "' ORDER BY title ASC"); $numrows = dbrows($result); if ($numrows > 0) { //Sub album view start $result = dbquery("SELECT * FROM " . $db_prefix . "kroax_kategori WHERE " . groupaccess('access') . " AND status='1' AND parentid='" . $category . "' ORDER BY title ASC"); $counter = 0; $r = 0; $k = 1; echo "<table cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n"; while ($data = dbarray($result)) { if ($counter != 0 && $counter % $kroaxsettings['kroax_set_thumbs_per_row'] == 0) { echo "</tr>\n<tr>\n"; } echo "<td align='center' valign='top' class='tbl'>\n"; echo "<a href='" . FUSION_SELF . "?category=" . $data['cid'] . "'><b>" . $data['title'] . "</b></a><br>\n";
function navbar($base_dir) { global $interface_lang; echo "<div class='navbar'><a href='/html/{$interface_lang}/index.html'>Μελετώ</a> \n"; echo breadcrumb($base_dir); // add flag / interface language change // two languages only for now, maybe add dropdown if more are added. echo "<div class='interface-lang'>"; // INTERFACE LANG if ($interface_lang == "en") { echo "<a href='/html/pt/index.html'><img src='/img/icons/flags/br.png' alt='br'>Português</a>"; } else { echo "<a href='/html/en/index.html'><img src='/img/icons/flags/us.png' alt='en'>English</a>"; } echo "</div>"; echo "</div>\n"; }
/** * Renders the default breadcrumb. * * @return string */ function render_breadcrumb() { return breadcrumb()->renderCrumbs(); }
<div class="small-5 large-5 columns row left"> <p class="breadcrumb"><?php echo breadcrumb($breadcrumbs); ?> </p> <h3 class="blue-title">Adicionar nova categoria</h3> <?php echo form_open('paginas/categorias/cadastrar', array('class' => 'custom')); erros_validacao(); get_msg('msgok'); get_msg('msgerror'); ?> <div class="small-12 large-12 columns"> <div class="row collapse prefix-radius"> <div class="small-2 columns"> <span class="prefix"><?php echo form_label('Nome'); ?> </span> </div> <div class="small-10 columns"> <?php echo form_input(array('name' => 'nome'), set_value('nome'), 'autofocus'); ?> </div> </div> <div class="row collapse prefix-radius"> <div class="small-2 columns"> <span class="prefix has-tip tip-top" title="Slug é uma url amigável, geramente se usa com lestras minúscula e traço"><?php echo form_label('Slug');
function show_topic($db, $topic_id, $user_id, $limit = 25) { echo breadcrumb($db, $topic_id, 'P'); if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $start = ($page - 1) * $limit; if (isset($_SESSION['user_id'])) { echo topic_reply_bar($db, $topic_id, get_forum_id($db, $topic_id)); } $sql = 'SELECT SQL_CALC_FOUND_ROWS p.id, p.subject, p.body, p.date_posted, p.date_updated, u.name as author, u.id as author_id, u.signature as sig, c.post_count as postcount, p.forum_id as forum_id, f.forum_moderator as moderator, p.update_id, u2.name as updated_by FROM frm_forum f JOIN frm_posts p ON f.id = p.forum_id JOIN frm_users u ON u.id = p.author_id LEFT JOIN frm_users u2 ON u2.id = p.update_id LEFT JOIN frm_post_count c ON u.id = c.user_id WHERE p.topic_id = ' . $topic_id . ' OR p.id = ' . $topic_id . ' ORDER BY p.topic_id, p.date_posted LIMIT ' . $start . ', ' . $limit; $result = mysql_query($sql, $db) or die(mysql_error($db)); $page_links = paginate($db, $limit); if (mysql_num_rows($result) == 0) { $msg = "There are currently no posts. Would you " . "like to be the first person to create a thread?"; $title = "No Posts..."; $dest = "frm_compose.php?forumid=" . $forum_id; echo msg_box($msg, $title, $dest); } else { echo '<table style="width: 80%;">'; echo '<tr>'; echo '<th>Author</th>'; echo '<th style="width: 85%;">Post</th>'; echo '</tr>'; $rowclass = ''; while ($row = mysql_fetch_array($result)) { $lastupdate = ''; $editlink = ''; $dellink = ''; $replylink = ' '; $pcount = ''; $pdate = ''; $sig = ''; $body = $row['body']; if (isset($_SESSION['user_id'])) { $replylink = '<a href="frm_compose.php?forumid=' . $row['forum_id'] . '&topicid=' . $topic_id . '&reid=' . $row['id'] . '">REPLY</a> '; } else { $replylink = ''; } if ($row['update_id'] > 0) { $lastupdate = '<p>Last updated: ' . $row['date_updated'] . ' by ' . $row['updated_by'] . '</p>'; } if ($user_id == $row['author_id'] || $user_id == $row['moderator'] || isset($_SESSION['access_lvl']) && $_SESSION['access_lvl'] > 2) { $editlink = '<a href="frm_compose.php?a=edit&post=' . $row['id'] . '">EDIT</a> '; $dellink = '<a href="frm_transact_affirm.php?' . 'action=deletepost&id=' . $row['id'] . '">DELETE</a> '; } $pcount = '<br/>Posts: ' . ($row['postcount'] == '' ? 0 : $row['postcount']); $pdate = $row['date_posted']; $sig = ($row['sig'] != '' ? '<p class="sig">' . bbcode($db, nl2br($row['sig'])) : '') . '</p>'; $rowclass = $rowclass == 'odd_row' ? 'even_row' : 'odd_row'; echo '<tr class="' . $rowclass . '">'; echo '<td>' . $row['author']; echo $pcount; echo '</td><td><p>'; if (isset($_SESSION['user_id']) && $_SESSION['last_login'] < $row['date_posted']) { echo NEWPOST . ' '; } if (isset($_GET['page'])) { $pagelink = '&page=' . $_GET['page']; } else { $pagelink = ''; } echo '<a name="post' . $row['id'] . '" href="frm_view_topic.php?t=' . $topic_id . $pagelink . '#post' . $row['id'] . '">' . POSTLINK . '</a>'; if (isset($row['subject'])) { echo ' <strong>' . $row['subject'] . '</strong>'; } echo '</p><p>' . bbcode($db, nl2br(htmlspecialchars($body))) . '</p>'; echo $sig; echo $lastupdate; echo '</td>'; echo '</tr><tr class="' . $rowclass . '">'; echo '<td>' . $pdate . '</td>'; echo '<td style="text-align: right;">'; echo $replylink; echo $editlink; echo $dellink; echo '</td></tr>'; } echo '</table>'; echo $pagelink; echo '<p>' . NEWPOST . ' = New Post '; echo POSTLINK . ' = Post link (use to bookmark)</p>'; } }
<?php if (!isset($_GET['f'])) { header('Location: frm_index.php'); } require_once 'frm_header.inc.php'; $forumid = $_GET['f']; $forum = get_forum($db, $forumid); echo breadcrumb($db, $forumid, 'F'); if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $limit = $admin['pageLimit']['value']; if ($limit == '') { $limit = 25; } $start = ($page - 1) * $admin['pageLimit']['value']; $sql = 'CREATE TEMPORARY TABLE tmp ( topic_id INTEGER UNSIGNED NOT NULL DEFAULT 0, postdate DATETIME NOT NULL )'; mysql_query($sql, $db) or die(mysql_error($db)); $sql = 'LOCK TABLES frm_users READ, frm_posts READ'; mysql_query($sql, $db) or die(mysql_error($db)); $sql = 'INSERT INTO tmp SELECT topic_id, MAX(date_posted) FROM frm_posts WHERE
redirect('usuarios/gerenciar'); } echo ' </div> </div> </div> </div> </div>'; break; case 'editar': $idusuario = $this->uri->segment(3); if ($idusuario == NULL) { define_msg('msgerro', 'Para editar as informações é necessário escolher um usuário.', 'erro'); redirect('usuarios/gerenciar'); } echo '<div id="content" class="content"> ' . breadcrumb() . ' <div class="row"> <div class="col-md-6"> <div class="panel panel-inverse" data-sortable-id="form-stuff-1"> <div class="panel-heading"> <h4 class="panel-title">Alterar Usuário</h4> </div> <div class="panel-body">'; if (verifica_adm() || $idusuario == $this->session->userdata('usuario_id')) { $consulta = $this->usuarios_model->pega_id($idusuario)->row(); verifica_msg('msgok'); verifica_msg('msgerro'); echo validacao_erros(); echo form_open(current_url()); echo ' <div class="form-group"> <label>Nome Completo</label>';
function showTopic($topicid, $showfull = TRUE) { global $conn; global $userid; global $limit; echo breadcrumb($topicid, "P"); if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } if ($limit == "") { $limit = 25; } $start = ($page - 1) * $limit; if (isset($_SESSION['user_id'])) { echo topicReplyBar($topicid, getForumID($topicid), "right"); } $sql = "SELECT SQL_CALC_FOUND_ROWS " . "p.id, p.subject, p.body, p.date_posted, " . "p.date_updated, u.username as author, u.id as author_id, " . "c.post_count as postcount, " . "p.forum_id as forum_id, f.forum_moderator as mod, " . "p.update_id, u2.username as updated_by " . "FROM forum f " . "JOIN posts p " . "ON f.id = p.forum_id " . "JOIN login u " . "ON u.id = p.author_id " . "LEFT JOIN login u2 " . "ON u2.id = p.update_id " . "LEFT JOIN info c " . "ON u.id = c.user_id " . "WHERE (p.topic_id = {$topicid} OR p.id = {$topicid}) " . "ORDER BY p.topic_id, p.date_posted " . "LIMIT {$start}, {$limit}"; $result = mysql_query($sql, $db) or die(mysql_error() . "<br />" . $sql); $pagelinks = paginate($limit); if (mysql_num_rows($result) == 0) { $msg = "There are currently no posts.Would you like to be the first person to create a thread?"; $title = "No Posts..."; $dest = "./frm_compose.php?forumid=" . $forumid; $sev = "Info"; $message = msgBox($msg, $title, $dest, $sev); echo $message; } else { echo "<table class='forumtable' cellspacing='0' "; echo "cellpadding='2'><tr>"; echo "<th class='author'>Author</th>"; echo "<th class='post'>Post</th>"; echo "</tr>"; while ($row = mysql_fetch_array($result)) { $lastupdate = ""; $editlink = ""; $dellink = ""; $replylink = " "; $pcount = ""; $pdate = ""; $sig = ""; if ($showfull) { $body = $row['body']; if (isset($_SESSION['user_id'])) { $replylink = "<a href='frm_compose.php?forumid=" . $row['forum_id'] . "&topicid={$topicid}&reid=" . $row['id'] . "' class='buttonlink'>REPLY</a> "; } else { $replylink = ""; } if ($row['update_id'] > 0) { $lastupdate = "<p class='smallNote'>Last updated: " . $row['date_updated'] . " by " . $row['updated_by'] . "</p>"; } if ($userid == $row['author_id'] or $userid == $row['mod'] or $_SESSION['access_lvl'] > 1) { $editlink = "<a href='frm_compose.php?a=edit&post=" . $row['id'] . "' class='buttonlink'>EDIT</a> "; $dellink = "<a href='frm_transact_affirm.php?action=deletepost&id=" . $row['id'] . "' class='buttonlink'>DELETE</a> "; } $pcount = "<br /><span class='textsmall'>Posts: " . ($row['postcount'] == "" ? "0" : $row['postcount']) . "</span>"; $pdate = $row['date_posted']; $sig = ($row['sig'] != "" ? "<p class='sig'>" . nl2br($row['sig']) : "") . "</p>"; } else { $body = trimBody($body); } $rowclass = $rowclass == "row1" ? "row2" : "row1"; echo "<tr class='{$rowclass}'>"; echo "<td class='author'>" . $row['author']; echo $pcount; echo "</td><td class='post'><p>"; if (isset($_SESSION['user_id']) and $_SESSION['last_login'] < $row['date_posted']) { echo NEWPOST . " "; } if (isset($_GET['page'])) { $pagelink = "&page=" . $_GET['page']; } echo "<a name='post" . $row['id'] . "' href='frm_view_topic.php?t=" . $topicid . $pagelink . "#post" . $row['id'] . "'>" . POSTLINK . "</a>"; if (isset($row['subject'])) { echo " <strong>" . $row['subject'] . "</strong>"; } echo "</p><p>" . nl2br(htmlspecialchars($body)) . "</p>"; echo $sig; echo $lastupdate; echo "</td></tr>"; echo "<tr class='{$rowclass}'><td class='authorfooter'>"; echo $pdate . "</td><td class='threadfooter'>"; echo $replylink; echo $editlink; echo $dellink; echo "</td></tr>\n"; } echo "</table>"; echo $pagelinks; echo "<p>" . NEWPOST . " = New Post "; echo POSTLINK . " = Post link (use to bookmark)</p>"; } }
function view_pic($sn = "") { global $xoopsDB, $xoopsUser, $xoopsModule, $xoopsModuleConfig, $xoopsTpl, $xoTheme; $tadgallery = new tadgallery(); //判斷是否對該模組有管理權限, 若空白 if ($xoopsUser) { $nowuid = $xoopsUser->getVar('uid'); $module_id = $xoopsModule->getVar('mid'); $isAdmin = $xoopsUser->isAdmin($module_id); } else { $isAdmin = false; $nowuid = ""; } $sql = "select * from " . $xoopsDB->prefix("tad_gallery") . " where sn='{$sn}'"; $result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error()); $all = $xoopsDB->fetchArray($result); //$csn,$title,$description,$filename,$size,$type,$width,$height,$dir,$uid,$post_date,$counter,$exif,$good,$tag,$photo_sort foreach ($all as $k => $v) { ${$k} = $v; $xoopsTpl->assign($k, $v); } $photo_s = $tadgallery->get_pic_url($dir, $sn, $filename, "s"); $photo_m = $tadgallery->get_pic_url($dir, $sn, $filename, "m"); $photo_l = $tadgallery->get_pic_url($dir, $sn, $filename); $xoopsTpl->assign("photo_s", $photo_s); $xoopsTpl->assign("photo_m", $photo_m); $xoopsTpl->assign("photo_l", $photo_l); if (!empty($csn)) { $ok_cat = $tadgallery->chk_cate_power(); $cate = $tadgallery->get_tad_gallery_cate($csn); if (!in_array($csn, $ok_cat)) { redirect_header("index.php?csn={$csn}&op=passwd_form", 3, sprintf(_TADGAL_NO_PASSWD_CONTENT, $cate['title'])); exit; } $sql = "select * from " . $xoopsDB->prefix("tad_gallery") . " where csn='{$csn}' order by photo_sort , post_date"; $result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error()); $slides1 = $slides2 = ""; $i = 0; $start = false; while ($all = $xoopsDB->fetchArray($result)) { if ($sn == $all['sn']) { $start = true; $i = 0; } if ($start) { $slides1[$i]['sn'] = $all['sn']; $slides1[$i]['photo'] = $tadgallery->get_pic_url($all['dir'], $all['sn'], $all['filename']); $slides1[$i]['description'] = strip_tags($all['description']); $slides1[$i]['thumb'] = $tadgallery->get_pic_url($all['dir'], $all['sn'], $all['filename'], 's'); } else { $slides2[$i]['sn'] = $all['sn']; $slides2[$i]['photo'] = $tadgallery->get_pic_url($all['dir'], $all['sn'], $all['filename']); $slides2[$i]['description'] = strip_tags($all['description']); $slides2[$i]['thumb'] = $tadgallery->get_pic_url($all['dir'], $all['sn'], $all['filename'], 's'); } $i++; } } $xoopsTpl->assign("slides1", $slides1); $xoopsTpl->assign("slides2", $slides2); //找出上一張或下一張 $pnp = get_pre_next($csn, $sn); $xoopsTpl->assign("next", $pnp['next']); $xoopsTpl->assign("back", $pnp['pre']); $arr = get_tadgallery_cate_path($csn); $jBreadCrumbPath = breadcrumb($csn, $arr); $xoopsTpl->assign("path", $jBreadCrumbPath); if (!file_exists(XOOPS_ROOT_PATH . "/modules/tadtools/fancybox.php")) { redirect_header("index.php", 3, _MA_NEED_TADTOOLS); } include_once XOOPS_ROOT_PATH . "/modules/tadtools/fancybox.php"; $fancybox = new fancybox('.fancybox'); $fancybox_code = $fancybox->render(false); $xoopsTpl->assign('fancybox_code', $fancybox_code); $title = empty($title) ? $filename : $title; $div_width = $xoopsModuleConfig['thumbnail_m_width'] + 30; $size_txt = sizef($size); if ($uid == $nowuid or $isAdmin) { $xoopsTpl->assign('show_del', 1); //$del_btn="<a src='javascript:delete_tad_gallery_func($sn)' title='"._TADGAL_DEL_PIC."' class='btn btn-danger'>"._TAD_DEL."</a>"; $xoopsTpl->assign('good', $good); $del_js = "\n <script>\n function delete_tad_gallery_func(sn){\n var sure = window.confirm('" . _TAD_DEL_CONFIRM . "');\n if (!sure) return;\n location.href=\"{$_SERVER['PHP_SELF']}?op=delete_tad_gallery&sn=\" + sn;\n }\n </script>"; } else { $del_btn = $admin_tool = $del_js = ""; } $xoopsTpl->assign('del_btn', $del_btn); //秀出各種尺寸圖示 if ($xoopsModuleConfig['show_copy_pic']) { $xoopsTpl->assign("photo_s", $photo_s); $xoopsTpl->assign("photo_m", $photo_m); $xoopsTpl->assign("photo_l", $photo_l); $xoopsTpl->assign("description", $description); $xoopsTpl->assign("sel_size", 1); } else { $xoopsTpl->assign("sel_size", 0); } //推文工具 $push = push_url($xoopsModuleConfig['use_social_tools']); $xoopsTpl->assign("push", $push); $xoopsTpl->assign("pic_toolbar", $xoopsModuleConfig['pic_toolbar']); $xoopsTpl->assign("thumb_slider", $xoopsModuleConfig['thumb_slider']); //計數器 add_tad_gallery_counter($sn); //地圖部份 $info = explode("||", $exif); foreach ($info as $v) { $exif_arr = explode("=", $v); $exif_arr[1] = str_replace("�", "", $exif_arr[1]); $bb = "\$photoexif{$exif_arr[0]}=\"{$exif_arr[1]}\";"; if (empty($exif_arr[0])) { continue; } @eval($bb); } $latitude = $photoexif['GPS']['latitude']; $longitude = $photoexif['GPS']['longitude']; $xoopsTpl->assign("latitude", $latitude); $xoopsTpl->assign("longitude", $longitude); $jquery_path = get_jquery(true); $xoopsTpl->assign("jquery", $jquery_path); $xoopsTpl->assign("path", $jBreadCrumbPath); $xoopsTpl->assign("del_js", $del_js); $xoopsTpl->assign("div_width", $div_width); $facebook_comments = facebook_comments($xoopsModuleConfig['facebook_comments_width'], 'tadgallery', 'view.php', 'sn', $sn); $xoopsTpl->assign("facebook_comments", $facebook_comments); $fb_tag = "\n <meta property=\"og:title\" content=\"{$title}\" />\n <meta property=\"og:description\" content=\"{$description}\" />\n <meta property=\"og:image\" content=\"" . $tadgallery->get_pic_url($dir, $sn, $filename, "m") . "\" />\n "; $xoopsTpl->assign("xoops_module_header", $fb_tag); $xoopsTpl->assign("xoops_pagetitle", $title); if (is_object($xoTheme)) { $xoTheme->addMeta('meta', 'keywords', $title); $xoTheme->addMeta('meta', 'description', $description); } else { $xoopsTpl->assign('xoops_meta_keywords', 'keywords', $title); $xoopsTpl->assign('xoops_meta_description', $description); } }
public function breadcrumb() { $attributes = $this->attributes(); $attributes['_content'] = $this->content(); return breadcrumb($this->attribute('nav_id'), $attributes); }
$xoopsTpl->assign("csn", $csn); } /*-----------執行動作判斷區----------*/ $op = system_CleanVars($_REQUEST, 'op', '', 'string'); $sn = system_CleanVars($_REQUEST, 'sn', 0, 'int'); $uid = system_CleanVars($_REQUEST, 'uid', 0, 'int'); $show_uid = system_CleanVars($_REQUEST, 'show_uid', 0, 'int'); if (!empty($csn) and !empty($passwd)) { $_SESSION['tadgallery'][$csn] = $passwd; } switch ($op) { case "passwd_form": passwd_form($csn, $cate['title']); break; default: list_photos($csn, $show_uid); break; } /*-----------秀出結果區--------------*/ $arr = get_tadgallery_cate_path($csn); $jBreadCrumbPath = breadcrumb($csn, $arr); $xoopsTpl->assign("path", $jBreadCrumbPath); $author_menu = get_all_author($show_uid); $xoopsTpl->assign("author_option", $author_menu); $xoopsTpl->assign("toolbar", toolbar_bootstrap($interface_menu)); if ($xoTheme) { $xoTheme->addStylesheet('modules/tadgallery/module.css'); $xoTheme->addStylesheet('modules/tadgallery/class/jquery.thumbs/jquery.thumbs.css'); $xoTheme->addScript('modules/tadgallery/class/jquery.thumbs/jquery.thumbs.js'); } include_once XOOPS_ROOT_PATH . '/footer.php';
function move($file, $ndir, $folder) { global $folder, $l; if (!$file == "") { maintop($l['TOP_MOVE']); if (@rename($folder . $file, $ndir . $file)) { $txt = str_replace('%1', "<div class='breadcrumb' style='margin:30px;'>" . breadcrumb($folder) . " / " . $file . "</div>", $l['MOV_MSG2']); $txt = str_replace('%2', "<div class='breadcrumb' style='margin:30px;'>" . breadcrumb($ndir) . " / " . $file . "</div>", $txt); echo $txt; } else { echo "<p>" . str_replace('%1', " <span class='breadcrumb'>" . breadcrumb($folder) . " / " . $file . "</span> ", $l['MOV_MSG3']) . "</p>"; } mainbottom(); } else { home(); } }
function get_cat_list(&$breadcrumb, &$cat_data, &$statistics) { global $_GET, $xoopsModuleConfig, $ALBUM_SET, $CURRENT_CAT_NAME, $BREADCRUMB_TEXT, $STATS_IN_ALB_LIST; global $HIDE_USER_CAT; global $xoopsDB, $xoopsModule; $cat = isset($_GET['cat']) ? (int) $_GET['cat'] : 0; // Build the breadcrumb breadcrumb($cat, $breadcrumb, $BREADCRUMB_TEXT); // Build the category list $cat_data = array(); $album_set_array = array(); get_subcat_data($cat, $cat_data, $album_set_array, $xoopsModuleConfig['subcat_level']); // Treat the album set if ($cat) { if ($cat == USER_GAL_CAT) { $result = $xoopsDB->query("SELECT aid FROM " . $xoopsDB->prefix("xcgal_albums") . " WHERE category >= " . FIRST_USER_CAT); } else { $result = $xoopsDB->query("SELECT aid FROM " . $xoopsDB->prefix("xcgal_albums") . " WHERE category = '{$cat}'"); } while ($row = $xoopsDB->fetchArray($result)) { $album_set_array[] = $row['aid']; } // while $xoopsDB->freeRecordSet($result); } if (count($album_set_array) && $cat) { $set = ''; foreach ($album_set_array as $album) { $set .= $album . ','; } $set = substr($set, 0, -1); $current_album_set = "AND aid IN ({$set}) "; $ALBUM_SET .= $current_album_set; } elseif ($cat) { $current_album_set = "AND aid IN (-1) "; $ALBUM_SET .= $current_album_set; } // Gather gallery statistics if ($cat == 0) { $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix("xcgal_albums") . " WHERE 1"); $album_count = $xoopsDB->getRowsNum($result); $xoopsDB->freeRecordSet($result); $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix("xcgal_pictures") . " WHERE 1 AND approved='YES'"); $picture_count = $xoopsDB->getRowsNum($result); $xoopsDB->freeRecordSet($result); $comment_count = xoops_comment_count($xoopsModule->mid()); $result = $xoopsDB->query("SELECT * FROM " . $xoopsDB->prefix("xcgal_categories") . " WHERE 1"); $cat_count = $xoopsDB->getRowsNum($result) - $HIDE_USER_CAT; $xoopsDB->freeRecordSet($result); $result = $xoopsDB->query("SELECT sum(hits) FROM " . $xoopsDB->prefix("xcgal_pictures") . " WHERE 1"); $nbEnr = $xoopsDB->fetchArray($result); $hit_count = (int) $nbEnr['sum(hits)']; $xoopsDB->freeRecordSet($result); if (count($cat_data)) { $statistics = strtr(_MD_INDEX_STAT1, array('[pictures]' => $picture_count, '[albums]' => $album_count, '[cat]' => $cat_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } else { $STATS_IN_ALB_LIST = true; $statistics = strtr(_MD_INDEX_STAT3, array('[pictures]' => $picture_count, '[albums]' => $album_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } } elseif ($cat >= FIRST_USER_CAT && $ALBUM_SET) { $result = $xoopsDB->query("SELECT count(*) FROM " . $xoopsDB->prefix("xcgal_albums") . " WHERE 1 {$current_album_set}"); $nbEnr = $xoopsDB->fetchArray($result); $album_count = $nbEnr['count(*)']; $xoopsDB->freeRecordSet($result); $result = $xoopsDB->query("SELECT count(*) FROM " . $xoopsDB->prefix("xcgal_pictures") . " WHERE 1 {$current_album_set}"); $nbEnr = $xoopsDB->fetchArray($result); $picture_count = $nbEnr['count(*)']; $xoopsDB->freeRecordSet($result); $result = $xoopsDB->query("SELECT sum(hits) FROM " . $xoopsDB->prefix("xcgal_pictures") . " WHERE 1 {$current_album_set}"); $nbEnr = $xoopsDB->fetchArray($result); $hit_count = (int) $nbEnr['sum(hits)']; $xoopsDB->freeRecordSet($result); $statistics = strtr(_MD_INDEX_STAT2, array('[pictures]' => $picture_count, '[albums]' => $album_count, '[views]' => $hit_count)); } else { $statistics = ''; } }
if (mysql_num_rows($result) == 0) { cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_cat'], __FILE__, __LINE__); } $row = mysql_fetch_array($result); $CURRENT_CAT_NAME = $row['name']; } thumb_get_subcat_data($cat, $album_set_array, $CONFIG['subcat_level']); // Treat the album set if (count($album_set_array)) { $set = ''; foreach ($album_set_array as $album_id) { $set .= $set == '' ? $album_id : ',' . $album_id; } $ALBUM_SET .= "AND aid IN ({$set}) "; } breadcrumb($cat, $breadcrumb, $breadcrumb_text); } } pageheader(isset($CURRENT_ALBUM_DATA) ? $CURRENT_ALBUM_DATA['title'] : $lang_meta_album_names[$album]); if ($breadcrumb) { if (!(strpos($CONFIG['main_page_layout'], "breadcrumb") === false)) { theme_display_breadcrumb($breadcrumb, $cat_data); } theme_display_cat_list($breadcrumb, $cat_data, ''); } /** * Function to draw the password box if the album is password protected */ function form_albpw() { global $lang_thumb_view, $CURRENT_ALBUM_DATA;
/** * get_cat_list() * * List all categories * * @param string $breadcrumb * @param array $cat_data * @param string $statistics * @return void **/ function get_cat_list(&$breadcrumb, &$cat_data, &$statistics) { global $CONFIG, $ALBUM_SET, $CURRENT_CAT_NAME, $BREADCRUMB_TEXT, $STATS_IN_ALB_LIST, $FORBIDDEN_SET; global $HIDE_USER_CAT, $cpg_show_private_album; global $cat; global $lang_list_categories, $lang_errors; // Build the breadcrumb breadcrumb($cat, $breadcrumb, $BREADCRUMB_TEXT); // Build the category list $cat_data = array(); $album_set_array = array(); get_subcat_data($cat, $cat_data, $album_set_array, $CONFIG['subcat_level']); $album_filter = ''; $pic_filter = ''; $cat = (int) $cat; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' and ' . str_replace('p.', 'a.', $FORBIDDEN_SET); $pic_filter = ' and ' . $FORBIDDEN_SET; } // Add the albums in the current category to the album set // if ($cat) { if ($cat == USER_GAL_CAT) { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category >= " . FIRST_USER_CAT . $album_filter; $result = cpg_db_query($sql); } else { $sql = "SELECT aid FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE category = '{$cat}'" . $album_filter; $result = cpg_db_query($sql); } while ($row = mysql_fetch_array($result)) { $album_set_array[] = $row['aid']; } // while mysql_free_result($result); // } if (count($album_set_array) && $cat) { $set = ''; foreach ($album_set_array as $album) { $set .= $album . ','; } $set = substr($set, 0, -1); $current_album_set = "AND aid IN ({$set}) "; $ALBUM_SET .= $current_album_set; } elseif ($cat) { $current_album_set = "AND aid IN (-1) "; $ALBUM_SET .= $current_album_set; } // Gather gallery statistics - start if ($CONFIG['display_stats_on_index'] != 0) { if ($cat == 0) { $result = cpg_db_query("SELECT count(aid) FROM {$CONFIG['TABLE_ALBUMS']} as a WHERE 1" . $album_filter); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(pid) FROM {$CONFIG['TABLE_PICTURES']} as p " . 'LEFT JOIN ' . $CONFIG['TABLE_ALBUMS'] . ' as a ' . 'ON a.aid=p.aid ' . 'WHERE 1' . $pic_filter . ' AND approved=\'YES\''; $result = cpg_db_query($sql); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(msg_id) FROM {$CONFIG['TABLE_COMMENTS']} as c " . 'LEFT JOIN ' . $CONFIG['TABLE_PICTURES'] . ' as p ' . 'ON c.pid=p.pid ' . 'LEFT JOIN ' . $CONFIG['TABLE_ALBUMS'] . ' as a ' . 'ON a.aid=p.aid ' . 'WHERE 1' . $pic_filter . ' AND approval=\'YES\''; $result = cpg_db_query($sql); $nbEnr = mysql_fetch_array($result); $comment_count = $nbEnr[0]; mysql_free_result($result); $sql = "SELECT count(cid) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1"; $result = cpg_db_query($sql); $nbEnr = mysql_fetch_array($result); $cat_count = $nbEnr[0] - $HIDE_USER_CAT; mysql_free_result($result); $sql = "SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} as p " . 'LEFT JOIN ' . $CONFIG['TABLE_ALBUMS'] . ' as a ' . 'ON p.aid=a.aid ' . 'WHERE 1' . $pic_filter; $result = cpg_db_query($sql); $nbEnr = mysql_fetch_array($result); $hit_count = (int) $nbEnr[0]; mysql_free_result($result); if (count($cat_data)) { $statistics = strtr($lang_list_categories['stat1'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[cat]' => $cat_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } else { $STATS_IN_ALB_LIST = true; $statistics = strtr($lang_list_categories['stat3'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[comments]' => $comment_count, '[views]' => $hit_count)); } } elseif ($cat >= FIRST_USER_CAT && $ALBUM_SET) { $result = cpg_db_query("SELECT count(aid) FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1 {$current_album_set}"); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); $result = cpg_db_query("SELECT count(pid) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1 {$current_album_set}"); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; mysql_free_result($result); $result = cpg_db_query("SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1 {$current_album_set} AND approved='YES'"); $nbEnr = mysql_fetch_array($result); $hit_count = (int) $nbEnr[0]; mysql_free_result($result); $statistics = strtr($lang_list_categories['stat2'], array('[pictures]' => $picture_count, '[albums]' => $album_count, '[views]' => $hit_count)); } else { $statistics = ''; } } else { // Gather gallery statistics - end $statistics = ''; } }
/** * get_cat_list() * * List all categories * * @param string $breadcrumb * @param array $cat_data * @param string $statistics * @return void **/ function get_cat_list(&$breadcrumb, &$cat_data, &$statistics) { global $CONFIG, $BREADCRUMB_TEXT, $STATS_IN_ALB_LIST, $FORBIDDEN_SET; global $HIDE_USER_CAT, $cpg_show_private_album; global $cat; global $lang_list_categories; // Build the breadcrumb breadcrumb($cat, $breadcrumb, $BREADCRUMB_TEXT); // Build the category list $cat_data = array(); get_subcat_data($cat_data); $album_filter = ''; $pic_filter = ''; $cat = (int) $cat; if (!empty($FORBIDDEN_SET) && !$cpg_show_private_album) { $album_filter = ' ' . str_replace('p.', 'a.', $FORBIDDEN_SET); $pic_filter = $FORBIDDEN_SET; } // Gather gallery statistics - start if ($CONFIG['display_stats_on_index'] != 0) { if ($cat == 0) { $result = cpg_db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_ALBUMS']} AS a WHERE 1 " . $album_filter); $nbEnr = $result->fetchRow(true); $album_count = $nbEnr[0]; $sql = "SELECT COUNT(*) FROM {$CONFIG['TABLE_PICTURES']}"; if ($pic_filter) { $sql .= " AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = p.aid WHERE approved = 'YES' {$pic_filter}"; } else { $sql .= " WHERE approved = 'YES'"; } $result = cpg_db_query($sql); $nbEnr = $result->fetchRow(true); $picture_count = $nbEnr[0]; $sql = "SELECT COUNT(*) FROM {$CONFIG['TABLE_COMMENTS']}"; if ($pic_filter) { $sql .= " AS c INNER JOIN {$CONFIG['TABLE_PICTURES']} AS p ON p.pid = c.pid INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = p.aid WHERE 1 {$pic_filter}"; } if ($CONFIG['comment_approval']) { if ($pic_filter) { $sql .= " AND approval = 'YES'"; } else { $sql .= " WHERE approval = 'YES'"; } } $result = cpg_db_query($sql); $nbEnr = $result->fetchRow(true); $comment_count = $nbEnr[0]; $sql = "SELECT COUNT(*) FROM {$CONFIG['TABLE_CATEGORIES']}"; $result = cpg_db_query($sql); $nbEnr = $result->fetchRow(true); $cat_count = $nbEnr[0] - $HIDE_USER_CAT; $sql = "SELECT SUM(hits) FROM {$CONFIG['TABLE_PICTURES']}"; if ($pic_filter) { $sql .= " AS p INNER JOIN {$CONFIG['TABLE_ALBUMS']} AS a ON a.aid = p.aid WHERE approved = 'YES' {$pic_filter}"; } else { $sql .= " WHERE approved = 'YES'"; } $result = cpg_db_query($sql); $nbEnr = $result->fetchRow(true); $hit_count = (int) $nbEnr[0]; if (count($cat_data)) { $statistics = strtr($lang_list_categories['stat1'], array('[pictures]' => '<strong>' . cpg_float2decimal($picture_count) . '</strong>', '[albums]' => '<strong>' . cpg_float2decimal($album_count) . '</strong>', '[cat]' => '<strong>' . cpg_float2decimal($cat_count) . '</strong>', '[comments]' => '<strong>' . cpg_float2decimal($comment_count) . '</strong>', '[views]' => '<strong>' . cpg_float2decimal($hit_count) . '</strong>')); } else { $STATS_IN_ALB_LIST = true; $statistics = strtr($lang_list_categories['stat3'], array('[pictures]' => '<strong>' . cpg_float2decimal($picture_count) . '</strong>', '[albums]' => '<strong>' . cpg_float2decimal($album_count) . '</strong>', '[comments]' => '<strong>' . cpg_float2decimal($comment_count) . '</strong>', '[views]' => '<strong>' . cpg_float2decimal($hit_count) . '</strong>')); } } else { $statistics = ''; } } else { // Gather gallery statistics - end $statistics = ''; } }
$myConfigFile = fopen($nameConfigFile, 'a'); if (!isset($myConfigFile) || $myConfigFile == FALSE) { $myConfigFile = fopen($nameConfigFile, 'w'); // Try to open if (!isset($myConfigFile)) { print $GLOBALS["I18N"]->get(sprintf('<div class="wrong">%s (%s)</div>',$GLOBALS['strConfigNoOpen'], $nameConfigFile)); } } */ //echo $nameConfigFile; //echo "FILE: $configfile<br/>"; /////// Other definitions //////// if (!isset($page) || $page == "") { $page = isset($_GET["page"]) ? $_GET["page"] : ""; $submited = isset($_GET["submited"]) ? $_GET["submited"] : ""; } ///// Variable usada para controlar que lo ingresado como $page sea numerico $control = $page * 1 . ""; include "pagetop.php"; include "header.inc"; if (!isset($page) || $page == "" || $control != $page) { $page = $control != $page ? "" : $page; include "installer/home.php"; } else { if ($page < 3 || $page == 3 && !$submited) { echo breadcrumb($page); } include "installer/install{$page}.php"; } //include('installer/lib/footer.inc'); include 'footer.inc';
<?php $active = "Database"; breadcrumb($crumbs, $active); ?> <div class="container-fluid v4p-container"> <div class="row"> <div class="col-md-12"> <form action="database" method="post" class="form-inline"> <select class="form-control" name="tbl"> <option value="item">Item</option> <option value="mob">Monster</option> </select> <input type="text" class="form-control" name="query" required /> <input type="submit" class="btn btn-primary" name="submit" value="Search" /> </form> </div> </div> </div>
<?php $data = breadcrumb(); $module_template = get_option('data-template', $params['id']); if ($module_template == false and isset($params['template'])) { $module_template = $params['template']; } if ($module_template != false) { $template_file = module_templates($config['module'], $module_template); } else { $template_file = module_templates($config['module'], 'default'); } if (is_file($template_file) != false) { include $template_file; } else { $template_file = module_templates($config['module'], 'default'); if (is_file($template_file) != false) { include $template_file; } else { print lnotif("No template found. Please choose template."); } }
<div id="content" class="content"> <?php echo breadcrumb(); ?> <div class="row"> <div class="col-md-6"> <div class="panel panel-inverse" data-sortable-id="form-stuff-1"> <div class="panel-heading"> <h4 class="panel-title">Inserir novas páginas</h4> </div> <div class="panel-body"> <?php verifica_msg('paginaok'); verifica_msg('paginaerro'); echo validacao_erros(); echo form_open('paginas/inserir'); ?> <div class="form-group"> <label>Títitulo da páginas</label> <?php echo form_input(array('name' => 'titulo', 'class' => 'form-control input-lg', 'placeholder' => 'Título da página'), set_value('titulo'), 'autofocus'); ?> </div> <div class="form-group"> <label>Slug</label> <?php echo form_input(array('name' => 'slug', 'class' => 'form-control input-lg', 'placeholder' => 'Deixe em branco se não souber'), set_value('slug')); ?> </div> <div class="form-group"> <label>Contéudo</label>
function tpl_header() { global $this_host, $_, $this_folder, $search; $hostlink = "<a href=\"http://{$this_host}/\">{$this_host}</a>/"; if (empty($search)) { $ret = $_["directory_listing_for"]; $ret .= $hostlink; $ret .= breadcrumb($_SERVER['REQUEST_URI']); } else { $ret = sprintf($_["search_for_in"], $search, $hostlink . breadcrumb($_SERVER['REQUEST_URI'])); } return $ret; }