コード例 #1
0
				<h1><a href="<?php 
echo get_option('home');
?>
"><?php 
bloginfo('name');
?>
</a></h1>
				<h2><?php 
bloginfo('description');
?>
</h2>
			</hgroup>

			<nav id="primary">
				<?php 
wp_nav_menu(array('menu' => 'Primary Navigation'));
?>
				<?php 
if (show_search_form()) {
    include TEMPLATEPATH . "/searchform.php";
}
?>
			</nav>

			<nav id="utility">
				<?php 
// If you have navigation created called "Utility Navigation", uncomment this for it to show up
// wp_nav_menu( array('menu' => 'Utility Navigation' ));
?>
			</nav>
		</header>
コード例 #2
0
ファイル: budgets.inc.php プロジェクト: hogsim/PMB
function show_bud($id_bibli = 0, $id_bud = 0)
{
    global $dbh, $msg, $charset;
    global $view_bud_form;
    global $view_lig_rub_form, $lig_rub_img, $view_tot_rub_form;
    global $pmb_gestion_devise;
    global $acquisition_gestion_tva;
    if (!$id_bibli || !$id_bud) {
        return;
    }
    show_search_form($id_bibli);
    //Recuperation budget
    $bud = new budgets($id_bud);
    $lib_bud = htmlentities($bud->libelle, ENT_QUOTES, $charset);
    $mnt_bud = $bud->montant_global;
    $devise = $pmb_gestion_devise;
    switch ($acquisition_gestion_tva) {
        case '0':
        case '2':
            $htttc = htmlentities($msg['acquisition_ttc'], ENT_QUOTES, $charset);
            $k_htttc = 'ttc';
            $k_htttc_autre = 'ht';
            break;
        default:
            $htttc = htmlentities($msg['acquisition_ht'], ENT_QUOTES, $charset);
            $k_htttc = 'ht';
            $k_htttc_autre = 'ttc';
            break;
    }
    if (!$bud->type_budget) {
        $typ_bud = htmlentities($msg['acquisition_budg_aff_rub'], ENT_QUOTES, $charset);
    } else {
        $typ_bud = htmlentities($msg['acquisition_budg_aff_glo'], ENT_QUOTES, $charset);
    }
    //montant total pour budget par rubriques
    if ($bud->type_budget == TYP_BUD_GLO) {
        $mnt['tot'][$k_htttc] = $bud->montant_global;
        $totaux = array('tot' => $mnt['tot'][$k_htttc], 'ava' => 0, 'eng' => 0, 'fac' => 0, 'pay' => 0, 'sol' => 0);
        $totaux_autre = array('tot' => 0, 'ava' => 0, 'eng' => 0, 'fac' => 0, 'pay' => 0, 'sol' => 0);
    } else {
        $totaux = array('tot' => 0, 'ava' => 0, 'eng' => 0, 'fac' => 0, 'pay' => 0, 'sol' => 0);
        $totaux_autre = array('tot' => 0, 'ava' => 0, 'eng' => 0, 'fac' => 0, 'pay' => 0, 'sol' => 0);
    }
    switch ($bud->statut) {
        case STA_BUD_VAL:
            $sta_bud = htmlentities($msg['acquisition_statut_actif'], ENT_QUOTES, $charset);
            break;
        case STA_BUD_CLO:
            $sta_bud = htmlentities($msg['acquisition_statut_clot'], ENT_QUOTES, $charset);
            break;
        case STA_BUD_PRE:
        default:
            $sta_bud = htmlentities($msg['acquisition_budg_pre'], ENT_QUOTES, $charset);
            break;
    }
    $seu_bud = $bud->seuil_alerte;
    //Recuperation exercice
    $exer = new exercices($bud->num_exercice);
    $lib_exer = htmlentities($exer->libelle, ENT_QUOTES, $charset);
    $form = $view_bud_form;
    $lib_mnt_bud = number_format($mnt_bud, '2', '.', ' ');
    $form = str_replace('!!lib_bud!!', $lib_bud, $form);
    $form = str_replace('!!lib_exer!!', $lib_exer, $form);
    $form = str_replace('!!mnt_bud!!', $lib_mnt_bud, $form);
    $form = str_replace('!!devise!!', $devise, $form);
    $form = str_replace('!!htttc!!', $htttc, $form);
    $form = str_replace('!!typ_bud!!', $typ_bud, $form);
    $form = str_replace('!!sta_bud!!', $sta_bud, $form);
    $form = str_replace('!!seu_bud!!', $seu_bud, $form);
    //recuperation de la liste complete des rubriques
    $q = budgets::listRubriques($id_bud, 0);
    $list_n1 = pmb_mysql_query($q, $dbh);
    while ($row = pmb_mysql_fetch_object($list_n1)) {
        $form = str_replace('<!-- rubriques -->', $view_lig_rub_form . '<!-- rubriques -->', $form);
        $form = str_replace('<!-- marge -->', '', $form);
        $nb_sr = rubriques::countChilds($row->id_rubrique);
        if ($nb_sr) {
            $form = str_replace('<!-- img_plus -->', $lig_rub_img, $form);
        } else {
            $form = str_replace('<!-- img_plus -->', '', $form);
        }
        $form = str_replace('!!id_rub!!', $row->id_rubrique, $form);
        $form = str_replace('!!id_parent!!', $row->num_parent, $form);
        $libelle = htmlentities($row->libelle, ENT_QUOTES, $charset);
        $form = str_replace('!!lib_rub!!', $libelle, $form);
        //montant total pour budget par rubriques
        $mnt['tot'][$k_htttc] = $row->montant;
        //montant a valider
        $mnt['ava'] = rubriques::calcAValider($row->id_rubrique);
        //montant engage
        $mnt['eng'] = rubriques::calcEngage($row->id_rubrique);
        //montant facture
        $mnt['fac'] = rubriques::calcFacture($row->id_rubrique);
        //montant paye
        $mnt['pay'] = rubriques::calcPaye($row->id_rubrique);
        //solde
        $mnt['sol'][$k_htttc] = $mnt['tot'][$k_htttc] - $mnt['eng'][$k_htttc];
        foreach ($totaux as $k => $v) {
            $totaux[$k] = $v + $mnt[$k][$k_htttc];
        }
        foreach ($totaux_autre as $k => $v) {
            $totaux_autre[$k] = $v + $mnt[$k][$k_htttc_autre];
        }
        $lib_mnt = array();
        foreach ($mnt as $k => $v) {
            $lib_mnt[$k] = number_format($mnt[$k][$k_htttc], 2, '.', ' ');
            if ($acquisition_gestion_tva && $k != "tot" && $k != "sol") {
                $lib_mnt_autre[$k] = number_format($mnt[$k][$k_htttc_autre], 2, '.', ' ');
            }
        }
        if ($bud->type_budget == TYP_BUD_GLO) {
            $lib_mnt['tot'] = '&nbsp;';
            $lib_mnt['sol'] = '&nbsp;';
        }
        foreach ($lib_mnt as $k => $v) {
            if (!$acquisition_gestion_tva || !$lib_mnt_autre[$k]) {
                $form = str_replace('!!mnt_' . $k . '!!', $lib_mnt[$k], $form);
            } elseif ($acquisition_gestion_tva) {
                $form = str_replace('!!mnt_' . $k . '!!', $lib_mnt[$k] . "<br />" . $lib_mnt_autre[$k], $form);
            }
        }
        if ($nb_sr) {
            $form = str_replace('<!-- sous_rub -->', '<!-- sous_rub' . $row->id_rubrique . ' -->', $form);
            afficheSousRubriques($bud, $row->id_rubrique, $form, 1);
        } else {
            $form = str_replace('<!-- sous_rub -->', '', $form);
        }
    }
    $form = str_replace('<!-- totaux -->', $view_tot_rub_form, $form);
    if ($bud->type_budget == TYP_BUD_GLO) {
        $totaux['tot'] = $bud->montant_global;
        $totaux['sol'] = $totaux['tot'] - $totaux['eng'];
    }
    foreach ($totaux as $k => $v) {
        if (is_numeric($v)) {
            $totaux[$k] = number_format($v, 2, '.', ' ');
        } else {
            $totaux[$k] = '&nbsp;';
        }
    }
    foreach ($totaux_autre as $k => $v) {
        if (is_numeric($v) && $k != 'tot' && $k != 'sol') {
            $totaux_autre[$k] = number_format($v, 2, '.', ' ');
        } else {
            $totaux_autre[$k] = '&nbsp;';
        }
    }
    foreach ($totaux as $k => $v) {
        $form = str_replace('!!mnt_' . $k . '!!', $totaux[$k] . ($acquisition_gestion_tva ? '<br />' . $totaux_autre[$k] : ''), $form);
    }
    $form = str_replace('!!id_bibli!!', $id_bibli, $form);
    $form = str_replace('!!id_bud!!', $id_bud, $form);
    print $form;
}
コード例 #3
0
ファイル: book_list.php プロジェクト: paulshannon/scalar
						<?php 
                }
            }
        }
        break;
    default:
        $book_json = json_encode($other_stripped);
        if ($login->is_logged_in) {
            ?>
					<h3>Your Books</h3>
				<?php 
            if (count($user_books) > 0) {
                print_books($user_books, 6, 4, 2, $login->user_id);
            } else {
                ?>
						<div class="row">
							<div class="col-xs-12">
								It doesn't look like you have any books at this time. Please <a href="./?action=join">Join</a>, <a href="./?action=clone">Clone</a>, or <a href="./?action=create">Create</a> one!
							</div>
						</div>
					<?php 
            }
        }
        show_search_form(array_merge($featured_books, $other_books), 'All Books', $login->is_logged_in ? $login->user_id : null);
}
echo '<script> var book_list = ', $book_json, '; </script>';
//Some closing DIVs left over from the cover
?>
</div>
</div>
</div>
コード例 #4
0
ファイル: registrer_donasjon.php プロジェクト: Kuzat/kofradia
        while ($row = $result->fetch()) {
            echo '
				<tr' . (++$i % 2 == 0 ? ' class="color"' : '') . '>
					<td>' . game::profile_link($row['up_id'], $row['up_name'], $row['up_access_level']) . '</td>
					<td>' . htmlspecialchars($row['u_email']) . '</td>
					<td>' . $_base->date->get($row['up_last_online'])->format(date::FORMAT_SEC) . '</td>
					<td><form action="" method="post"><input type="hidden" name="up_id" value="' . $row['up_id'] . '" />' . show_sbutton("Velg") . '</form></td>
				</tr>';
        }
        echo '
			</tbody>
		</table>';
    }
    echo box_end();
}
show_search_form();
$_base->page->load();
function like_search($value)
{
    return strtr($value, array('_' => '\\_', '%' => '\\%', '*' => '%', '?' => '_'));
}
function show_search_form()
{
    echo box_start("Registrer donasjon - Søk etter bruker", "small") . '
		<form action="" method="post">
			<dl class="dd_right">
				<dt><input type="text" class="styled w150" name="value" value="' . htmlspecialchars(postval("value")) . '" /></dt>
				<dd>' . show_sbutton("ID", 'name="id"') . ' ' . show_sbutton("Bruker", 'name="user"') . ' ' . show_sbutton("E-post", 'name="email"') . '</dd>
			</dl>
		</form>' . box_end();
}
コード例 #5
0
function editglobalcustomfields()
{
    $sidebar_left_status = show_sidebar_at('left') ? "checked=\"yes\"" : "";
    $sidebar_right_status = show_sidebar_at('right') == "1" ? "checked=\"yes\"" : "";
    $sidebar_footer_status = show_sidebar_at('footer') == "1" ? "checked=\"yes\"" : "";
    $use_grid = use_grid() == "1" ? "checked=\"yes\"" : "";
    ?>
	<style type="text/css" media="screen">
	
		#theme_options label { font-weight:bold; font-size: 13px; display: block; }
		#theme_options fieldset { border:solid 1px #ccc; padding: 0 10px; margin-top: 10px; margin-bottom: 20px;  }
		#theme_options fieldset legend { 
			padding: 0 10px; 
			font: italic 16px/20px Georgia,"Times New Roman","Bitstream Charter",Times,serif;
			color: #464646;
		}
		#theme_options .extra_info { display: block; font-size:11px; color:#999;}

		#options_general_site_information strong {
			display: block;
			margin-bottom: 10px;
		}
		#options_general_site_information .dev		input,
		#options_general_site_information .sidebars input { float: left; margin-right:5px; }
		#options_general_site_information .dev      label,
		#options_general_site_information .sidebars label {
			clear: right;
			display: block;
			margin-bottom: 10px;
		}
	</style>
	<div class='wrap'>
		<h2>Theme Options</h2>
  		<form method="post" action="options.php" id="theme_options">
	  	  	<input type="hidden" name="action" value="update" />
			<input type="hidden" name="page_options" value="company_name,site_credit,use_grid,sidebar_left,sidebar_right,sidebar_footer,show_search,show_footer_title,show_footer_meta,custom_menus" />
			<?php 
    wp_nonce_field('update-options');
    ?>


			<fieldset id="options_general_site_information" class="">
				<legend>General Site Information</legend>
				
				<p>
					<label for="company_name">Your company name</label>
					<input type="text" name="company_name" value="<?php 
    echo htmlspecialchars(get_option('company_name'));
    ?>
" id="company_name" size="40" />
				</p>

				<p>
					<label for="company_name">Site Credit</label>
					<input type="text" name="site_credit" value="<?php 
    echo htmlspecialchars(get_option('site_credit'));
    ?>
" id="site_credit" size="40" />
				</p>

				<p class="dev">
					<strong>Would you like to use the 960px grid in your theme?</strong>
					
					<input type="checkbox" name="use_grid" value="1" id="use_grid" <?php 
    echo $use_grid;
    ?>
 /> <label for="use_grid">Yes</label>
				</p>

				<p class="sidebars">
					<strong>Which sidebars would you like to see?</strong>

					<input type="checkbox" name="sidebar_left" value="1" id="sidebar_left" <?php 
    echo $sidebar_left_status;
    ?>
 /> <label for="sidebar_left">Left Sidebar</label>

					<input type="checkbox" name="sidebar_right" value="1" id="sidebar_right" <?php 
    echo $sidebar_right_status;
    ?>
 /> <label for="sidebar_right">Right Sidebar</label>

					<input type="checkbox" name="sidebar_footer" value="1" id="sidebar_footer" <?php 
    echo $sidebar_footer_status;
    ?>
 /> <label for="sidebar_footer">Footer Sidebar</label>
				</p>
				
			</fieldset>

			<fieldset id="options_header" class="">
				<legend>Header</legend>
				
				<p>
					<label for="">Show search form in the header?</label>
					<select name="show_search" id="show_search">
					<?php 
    if (show_search_form()) {
        ?>
						<option value="1" selected="selected">Yes</option>
						<option value="0">No</option>
					<?php 
    } else {
        ?>
						<option value="1">Yes</option>
						<option value="0" selected="selected">No</option>
					<?php 
    }
    ?>
					</select>
				</p>
				
			</fieldset>

			<fieldset id="options_footer" class="">
				<legend>Footer</legend>
				
				<p>
					<label for="show_footer_title">Show website title?</label>
					<select name="show_footer_title" id="show_footer_title">
						<?php 
    if (show_footer_title()) {
        ?>
							<option value="1" selected="selected">Yes</option>
							<option value="0">No</option>
						<?php 
    } else {
        ?>
							<option value="1">Yes</option>
							<option value="0" selected="selected">No</option>
						<?php 
    }
    ?>
					</select>
				</p>
				
				<p>
					<label for="show_footer_meta">Show Meta Links?</label>
					<select name="show_footer_meta" id="show_footer_meta">
						<?php 
    if (show_footer_meta()) {
        ?>
							<option value="1" selected="selected">Yes</option>
							<option value="0">No</option>
						<?php 
    } else {
        ?>
							<option value="1">Yes</option>
							<option value="0" selected="selected">No</option>
						<?php 
    }
    ?>
					</select>
				</p>
				
				<p>
					<label for="custom_menus_to_include">Custom Menus to Include</label>
					<span class="extra_info">
						Place the titles of the custom menus in the following form field delimited by commas.  
						Menus will then be included in the theme footer.
					</span>
					<input type="text" name="custom_menus" value="<?php 
    echo strip_tags(get_option('custom_menus'));
    ?>
" id="custom_menus" size="40" />
					
				</p>
				
			</fieldset>

			<p><input type="submit" name="Submit" value="Update Options" /></p>

	  	</form>
	</div>
	<?php 
}
コード例 #6
0
ファイル: blog_view.php プロジェクト: remoharsono/No-CMS
					            }
					        }
				        });
				        LOADING = false;
				    }
				    
				}
			});
			
		</script>
	<?php 
    }
}
// MAIN PROGRAM ================================================================
if (!$only_show_article) {
    show_search_form($cms, $available_category, $category, $search);
    if ($allow_edit) {
        echo '<p>';
        echo anchor($cms['module_path'] . '/blog/article/add/', 'Add New Article', array("class" => "btn"));
        echo '</p>';
    }
}
if (!$single_article) {
    if (!$only_show_article) {
        echo '<div id="blog_content">';
    }
    // blog content
    if ($articles !== FALSE) {
        foreach ($articles as $article) {
            show_article($cms, $article, false, $allow_edit);
        }