コード例 #1
0
ファイル: Content.php プロジェクト: AgolaPlatform/Facades
 /**
  * ### İçeriğe ait Custom Fields alan verilerini alma
  * Custom fields ile oluşturulan dinamik form bilgilerini görüntüler.
  * İçerik id'sine göre, belirtilen custom field değerini alır.
  * Index sayfalarında content_id değeri belirtilir, show (detay)
  * sayfalarında content_id değeri boş bırakılır.
  * İşlemler için yardımcı fonksiyon olan content_value() kullanılır.
  *
  * @example show page : Content::get('custom_field_name')
  * @example index page : Content::get('custom_field_name', $content_id)
  *
  * @param $key        : Form name adı / anahtarı
  * @param $content_id : içerik id'si
  *
  * @return string
  */
 public function get($key, $content_id = null)
 {
     if ($content_id) {
         return content_value($key, $content_id);
     }
     return content_value($key, content('id'));
 }
コード例 #2
0
 function childs()
 {
     $usable_path = $this->path;
     // if(starts_with($this->path, '.')){
     // 	$usable_path  = $this->file->getRelativePath();
     // }
     return content()->section_menu($usable_path);
 }
コード例 #3
0
ファイル: session.php プロジェクト: aharris88/old-projects
 public function protected_content()
 {
     if ($this->admin) {
         return content();
     } else {
         $session->set_message("You must be an admin to view this page: Click <a href='javascript: history.go(-1)'>here</a> to return to the previous page.");
         $session->output_message();
     }
 }
コード例 #4
0
ファイル: template.php プロジェクト: ras52/geneopedia
function do_page_content()
{
    global $error_page;
    if (isset($error_page)) {
        $error_page();
    } else {
        content();
    }
}
コード例 #5
0
ファイル: UnivModel.php プロジェクト: nandor/kit
 public function search($what)
 {
     $result = DB::query("SELECT `id`, `name`, `picture` " . "FROM `{$this->table_name}` WHERE " . "`name` LIKE '%" . mysql_real_escape_string($what) . "%'\r\n                LIMIT 5", false);
     if (!$result) {
         return false;
     }
     $univ_list = array();
     while ($univ = mysql_fetch_array($result)) {
         $univ_list[$univ['id']] = array('name' => $univ['name'], 'img' => $univ['picture'] ? content($univ['picture']) : url('img/udef.png'));
     }
     return empty($univ_list) ? false : $univ_list;
 }
コード例 #6
0
ファイル: GroupModel.php プロジェクト: nandor/kit
 public function search($what)
 {
     $result = DB::query("SELECT `id`, `name`, `picture` FROM `{$this->group_table}` WHERE\n                `name` LIKE '%" . mysql_real_escape_string($what) . "%'\n                LIMIT 5", false);
     if (!$result) {
         return false;
     }
     $group_list = array();
     while ($group = mysql_fetch_array($result)) {
         $group_list[$group['id']] = array('name' => $group['name'], 'img' => $group['picture'] ? content($group['picture']) : url('img/gdef.png'));
     }
     return empty($group_list) ? false : $group_list;
 }
コード例 #7
0
ファイル: system.php プロジェクト: Arcath/arcath.net-yaml-cms
function content($var)
{
    global $pages, $config;
    if (!isset($var)) {
        $out = content($config['loadedpages'][0]);
    } else {
        if (!is_array($pages[$var]['content']) && $pages[$var]['status'] == 'active') {
            $out = $pages[$var]['content'];
        } elseif (is_array($pages[$var]['content']) && $pages[$var]['status'] == 'active') {
            include $config['pagedir'] . '/' . $pages[$var]['content'][0] . '/' . $pages[$var]['content'][1];
            $out = output();
        } else {
            $out = "<h1>Error 404</h1>Page Not Found!";
        }
    }
    return $out;
}
コード例 #8
0
}
head(1);
// Means we're in the feed
?>
																								

</head>

<body>

<?php 
title();
newsbar(1);
// Means we're in the feed
navbarleft();
content(1, 0, 1, 0, $filename);
// in feed, for the fn entries, filename for echoContent
if (!$_GET["num"]) {
    // Makes $num be the newest news item of any type
    $num = end(getposts(0));
} else {
    $num = $_GET["num"];
}
bottom($num);
?>
			

</body>

</html>
コード例 #9
0
ファイル: custom-functions.php プロジェクト: xxf1995/alphaV
function testimonials_output_func($atts)
{
    $testimonialoutput = '<div id="testimonials"><div class="quotes">
            <ul>';
    wp_reset_query();
    query_posts('post_type=testimonials');
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $possition = esc_html(get_post_meta(get_the_ID(), 'possition', true));
            $testimonialoutput .= '
  			 <li>			 
			    <div class="tm_thumb">
				' . get_the_post_thumbnail(get_the_ID(), array(80, 80)) . '
				<h6> ' . get_the_title() . '</h6>
				<span>' . $possition . '</span>
				</div>
							 	
				<div class="tm_description">
				  ' . content(60) . '				  
				</div>								
              </li>
			';
        }
        $testimonialoutput .= '</ul></div></div>';
    } else {
        $testimonialoutput = '<div id="testimonials">
          <div class="quotes">
            <ul>
              <li> 			  
			      <div class="tm_thumb">
				    <img src="' . get_template_directory_uri() . "/images/testimonial.jpg" . '" alt="" />
				     <h6>Eficitur Sodale</h6>
				    <span>Web Developer</span>
				  </div> 
				  				                  
                  <div class="tm_description">
				   <p>Aliquam et varius orci, ut ornare justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque augue metus, blandit vel nibh sed, sollicitudin placerat quam. Quisque id scelerisque nibh. Phasellus in orci et felis tristique finibus non quis erat. Quisque nec congue nunc, sagittis aliquet orci. Quisque pulvinar feugiat sodales. Nam fermentum tempus odio sed euismod Quisque pulvinar feugiat sodales. Nam fermentum tempus odio sed euismod.</p>                   
				  </div> 				  			              
              </li>
			  
              <li>                 
                <div class="tm_thumb">
				    <img src="' . get_template_directory_uri() . "/images/testimonial.jpg" . '" alt="" />
				     <h6>Eficitur Sodale</h6>
				    <span>Web Developer</span>
				  </div> 
				  				                  
                  <div class="tm_description">
				   <p>Aliquam et varius orci, ut ornare justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque augue metus, blandit vel nibh sed, sollicitudin placerat quam. Quisque id scelerisque nibh. Phasellus in orci et felis tristique finibus non quis erat. Quisque nec congue nunc, sagittis aliquet orci. Quisque pulvinar feugiat sodales. Nam fermentum tempus odio sed euismod Quisque pulvinar feugiat sodales. Nam fermentum tempus odio sed euismod.</p>                   
				  </div>
              </li>
			               
            </ul>         
    </div>  
  </div> ';
    }
    wp_reset_query();
    $testimonialoutput .= '</div>';
    return $testimonialoutput;
}
コード例 #10
0
session_start();
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
ini_set('error_prepend_string', "<p class=text-error>");
ini_set('error_append_string', "</p>");
if (!isset($_SESSION["uid"])) {
    header("location:miniadm.logon.php");
}
include_once dirname(__FILE__) . "/ressources/class.templates.inc";
include_once dirname(__FILE__) . "/ressources/class.users.menus.inc";
include_once dirname(__FILE__) . "/ressources/class.miniadm.inc";
include_once dirname(__FILE__) . "/ressources/class.mysql.postfix.builder.inc";
include_once dirname(__FILE__) . "/ressources/class.user.inc";
if (isset($_GET["content"])) {
    content();
    exit;
}
if (isset($_GET["tabs"])) {
    tabs();
    exit;
}
if (isset($_GET["master-content"])) {
    master_content();
    exit;
}
if (isset($_GET["graph1"])) {
    graph1();
    exit;
}
if (isset($_GET["graph2"])) {
コード例 #11
0
ファイル: list.php プロジェクト: stonyyi/anahita
	</div>
	
	<h3 class="entity-title">
		<a href="<?php 
echo @route($topic->getURL());
?>
">
            <?php 
echo @escape($topic->title);
?>
        </a>
	</h3>
	
	<div class="entity-description">
	<?php 
echo @helper('text.truncate', @content($topic->body, array('exclude' => 'gist')), array('length' => 200, 'consider_html' => true));
?>
	</div>
	
	<div class="entity-meta">
		<ul class="an-meta inline">	
			<li><?php 
echo sprintf(@text('LIB-AN-MEDIUM-NUMBER-OF-COMMENTS'), $topic->numOfComments);
?>
</li>
		</ul>
		
		<div class="an-meta vote-count-wrapper" id="vote-count-wrapper-<?php 
echo $topic->id;
?>
">
コード例 #12
0
ファイル: custom-functions.php プロジェクト: jep-heroes/wp
function testimonialoutput_func($atts)
{
    $testimonialoutput = '';
    wp_reset_query();
    $n = 0;
    query_posts('post_type=testimonial&posts_per_page=3');
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $n++;
            if ($n % 3 == 0) {
                $nomgn = ' last';
            } else {
                $nomgn = ' ';
            }
            $testimonialoutput .= '<div class="testimonial-box' . $nomgn . '">' . get_the_post_thumbnail(get_the_ID(), array(82, 82)) . '
				<div class="testimonial-post">
                <h4>' . get_the_title() . '</h4>
                <p>' . content(50) . '</p>
                </div>
				</div>';
        }
    }
    wp_reset_query();
    $testimonialoutput .= '<div class="clear"></div>';
    return $testimonialoutput;
}
コード例 #13
0
ファイル: topic.php プロジェクト: walteraries/anahita
			<div class="an-meta"><?php 
echo @date($topic->creationTime);
?>
</div>
		</div>
	</div>
	
	<h3 class="entity-title">
		<?php 
echo @escape($topic->title);
?>
	</h3>	
	
	<div class="entity-description">
		<?php 
echo @content($topic->body);
?>
	</div>
		
	<div class="entity-meta">
		<ul class="an-meta inline">
			<?php 
if ($topic->numOfComments) {
    ?>
 
			<li><?php 
    echo sprintf(@text('LIB-AN-MEDIUM-NUMBER-OF-COMMENTS'), $topic->numOfComments);
    ?>
</li>
			<li><?php 
    echo sprintf(@text('LIB-AN-MEDIUM-LAST-COMMENT-BY-X'), @name($topic->lastCommenter), @date($topic->lastCommentTime));
コード例 #14
0
ファイル: example.php プロジェクト: rusli-nasir/hospitalPhp
					."<div>Opacity = <i>$opacity%</i></div>"
					."<div align='center' >"
					."<input type='button' id='btn$numb' value='View the effect' /></div>";
		return $content;
	}
	
	// UpdatePannel declare
	$StyleUpdate1 = new UpdatePanel( "StyleUpdate1" );
	$StyleUpdate2 = new UpdatePanel( "StyleUpdate2" );
	$StyleUpdate3 = new UpdatePanel( "StyleUpdate3" );
	$StyleUpdate4 = new UpdatePanel( "StyleUpdate4" );	
	// each panel has its own style to describe in its content .				
	$StyleUpdate1->content = content( "picture #1" , "white"   , 50 , 1 , "green"  );
	$StyleUpdate2->content = content( "picture #4" , "#f4f4f4" , 70 , 2 , "orange" );
	$StyleUpdate3->content = content( "picture #3" , "#f4f599" , 55 , 3 , "blue"   );
	$StyleUpdate4->content = content( "picture #9" , "(blank)" , 25 , 4 , "brown"  );	
	// Add the event update for the button  to 4 updatepanel
	$StyleUpdate1->addTrigger( "btn1" , 'onclick' );
	$StyleUpdate2->addTrigger( "btn2" , 'onclick' );
	$StyleUpdate3->addTrigger( "btn3" , 'onclick' );	
	$StyleUpdate4->addTrigger( "btn4" , 'onclick' );
	// 4 UpdatePanel have the same css style
	$StyleUpdate1->cssclass = $StyleUpdate2->cssclass = $StyleUpdate3->cssclass = $StyleUpdate4->cssclass = "cssStyle";	
	// each loading 
	$StyleUpdate1->setLoading("$KoolControlsFolder/KoolAjax/loading/1.gif" , "white"   , 50 );	
	$StyleUpdate2->setLoading("$KoolControlsFolder/KoolAjax/loading/4.gif" , "#f4f4f4" , 70 );	
	$StyleUpdate3->setLoading("$KoolControlsFolder/KoolAjax/loading/3.gif" , "#fff4f5" , 55 );
	$StyleUpdate4->setLoading("$KoolControlsFolder/KoolAjax/loading/9.gif" , ""        , 75 );
?>
	<?php echo $koolajax->Render();?>
		<style>
コード例 #15
0
ファイル: shop.php プロジェクト: Nightgunner5/Pubcomp-CMS
    
      <!-- 1 -->
      <div class="app-shops">
        <img src="<?php 
            bloginfo('template_directory');
            ?>
/scripts/timthumb.php?src=<?php 
            echo get_post_meta($post->ID, "icon", $single = true);
            ?>
&amp;h=60&amp;w=59" alt="">
        <h1> <?php 
            the_title_limit(30, '...');
            ?>
 </h1>
        <p> <?php 
            content('10');
            ?>
</p>
        <a href="<?php 
            the_permalink();
            ?>
" class="mini-red" style="margin-right:4px;">more</a> 
        
        <?php 
            if (get_post_meta($post->ID, 'price', true)) {
                ?>
 
        <a href="<?php 
                the_permalink();
                ?>
" class="mini-yellow"><?php 
コード例 #16
0
function track_delete_confirm($track_id, $album_id)
{
    $album = fetch_album($album_id);
    $track = fetch_track($track_id);
    $a = start_form();
    $a .= heading('Confirm Delete');
    $a .= "<p> Are you sure you want to delete the track \"" . $track['title'] . "\" from the album \"" . $album['title'] . "\"?" . "</p>\n";
    $a .= "<p>\n";
    $a .= button_element('cancel', " Cancel ") . "&nbsp;";
    $a .= button_element('delete_confirm', " Confirm Delete ");
    $a .= "</p>\n";
    $a .= hidden_element('a', 'track_delete_confirm') . hidden_element('id', $track['id']);
    $a .= end_form();
    content($a);
    page('plain');
}
コード例 #17
0
$args = array('post_type' => 'post', 'category_name' => 'blog', 'orderby' => 'post_date', 'posts_per_page' => '1');
query_posts($args);
while (have_posts()) {
    the_post();
    ?>
            	<li><h2 class="three_section">Latest Blog</h2>
                	<h3 class="animated" data-animation="fadeInDown" data-revert="fadeOutDown"><?php 
    echo substr(get_the_title(), 0, 98);
    ?>
...</h3>
                    <p class="animated" data-animation="fadeIn" data-revert="fadeOut">
                    	<?php 
    //echo substr(get_the_content(), 0 , 150);
    ?>
                    	<?php 
    echo content(30);
    ?>
 
                    	</p>
                    	<a class="read-more-post" href="<?php 
    echo get_permalink();
    ?>
">Read more..</a>
                </li>
          <?php 
}
wp_reset_query();
?>
         <?php 
$args = array('category_name' => 'news-page', 'order' => 'DESC', 'posts_per_page' => '1');
$myposts = get_posts($args);
コード例 #18
0
<data name="title">
	<?php 
echo sprintf(@text('COM-TOPICS-STORY-MENTION-COMMENT'), @name($subject), @route($object->getURL() . '&permalink=' . $comment->id));
?>
</data>

<data name="body">
    <h4 class="entity-title">
    	<?php 
echo @link($object);
?>
    </h4>
    <div class="entity-body">
			<blockquote>
        <?php 
$body = @content($object->body, array('exclude' => 'gist'));
?>
        <?php 
echo @helper('text.truncate', $body, array('length' => 200, 'read_more' => true, 'consider_html' => true));
?>
			</blockquote>
		</div>
</data>

<?php 
if ($type == 'notification') {
    $commands->insert('view-comment', array('label' => @text('LIB-AN-VIEW-COMMENT')))->href($object->getURL() . '&permalink=' . $comment->id);
    ?>
<data name="email_body">
    <h4 class="entity-title">
    	<?php 
コード例 #19
0
ファイル: default.php プロジェクト: NicholasJohn16/anahita
echo @escape($location->name);
?>
    </h2>

    <div class="entity-meta">
    <?php 
echo @helper('address', $location);
?>
    </div>

    <?php 
if ($location->description) {
    ?>
    <div class="entity-description">
    <?php 
    echo @helper('text.truncate', @content(nl2br($location->description), array('exclude' => array('syntax', 'video'))), array('length' => 200, 'consider_html' => true));
    ?>
    </div>
    <?php 
}
?>
</div>

<div class="row">
    <div class="span12">
      <div class="btn-toolbar clearfix">
          <div class="pull-right btn-group">
              <a class="btn <?php 
echo $sort != 'top' ? 'disabled' : '';
?>
" href="<?php 
コード例 #20
0
ファイル: actor_mention.php プロジェクト: walteraries/anahita
</data>

<data name="body">
    <h4 class="entity-title">
    	<?php 
echo @link($object);
?>
    </h4>
    <div class="entity-body">
    	<?php 
if ($object->excerpt) {
    ?>
    	<?php 
    echo @helper('text.truncate', @escape($object->excerpt), array('length' => 200));
    ?>
    	<?php 
} else {
    ?>
	    <?php 
    echo @helper('text.truncate', @content(nl2br($object->body), array('exclude' => 'gist')), array('length' => 200, 'read_more' => true, 'consider_html' => true));
    ?>
		<?php 
}
?>
	</div>
</data>

<?php 
if ($type == 'notification') {
    $commands->insert('view-post', array('label' => @text('LIB-AN-MEDIUM-VIEW')))->href($object->getURL());
}
コード例 #21
0
ファイル: set_add.php プロジェクト: stonyyi/anahita
">
    		<?php 
    echo $object->title;
    ?>
    	</a>
    </h4>
	<?php 
}
?>

	<?php 
if ($object->description) {
    ?>
	<div class="entity-description">
	    <?php 
    echo @content(nl2br($object->description), array('exclude' => 'gist'));
    ?>
	</div>
	<?php 
}
?>

	<div class="media-grid">	
		<?php 
$photos = $object->photos->order('photoSets.ordering')->limit(10)->fetchSet();
?>
		<?php 
foreach ($photos as $i => $photo) {
    ?>
		<?php 
    $caption = htmlspecialchars($photo->title, ENT_QUOTES, 'UTF-8');
コード例 #22
0
ファイル: dispatch.php プロジェクト: matthew0x40/apply
function render($view, $locals = null, $layout = null)
{
    if (is_array($locals) && count($locals)) {
        extract($locals, EXTR_SKIP);
    }
    if (($view_root = config('views.root')) == null) {
        error(500, "[views.root] is not set");
    }
    ob_start();
    include "{$view_root}/{$view}.html.php";
    content(trim(ob_get_clean()));
    if ($layout !== false) {
        if ($layout == null) {
            $layout = config('views.layout');
            $layout = $layout == null ? 'layout' : $layout;
        }
        $layout = "{$view_root}/{$layout}.html.php";
        header('Content-type: text/html; charset=utf-8');
        ob_start();
        require $layout;
        echo trim(ob_get_clean());
    } else {
        echo content();
    }
}
コード例 #23
0
ファイル: badge.php プロジェクト: walteraries/anahita
    ?>
</span> 
				
				<?php 
    if ($item->isLeadable()) {
        ?>
				/ <?php 
        echo $item->leaderCount;
        ?>
				<span class="stat-name"><?php 
        echo @text('COM-ACTORS-SOCIALGRAPH-LEADERS');
        ?>
</span>
				<?php 
    }
    ?>
				</div>
			
			</div>
		</div>

		<div class="entity-description">
			<?php 
    echo @helper('text.truncate', @content($item->body, array('exclude' => array('syntax', 'video'))), array('consider_html' => true, 'length' => 150));
    ?>
		</div>
	</div>
<?php 
}
?>
</div>
コード例 #24
0
function rparser($startfile, $default_template, $overwrite_template = "")
{
    global $db, $debugging, $pathvars, $specialvars, $environment, $ausgaben, $element, $lnk, $dataloop, $hidedata, $mapping, $loopcheck;
    if ($overwrite_template == "") {
        if (file_exists($pathvars["templates"] . $startfile)) {
            $template = $pathvars["templates"] . $startfile;
        } else {
            $template = $pathvars["fileroot"] . "templates/default/" . $startfile;
        }
        // wenn es fuer eine unterseite kein eigenes template gibt default.tem.html verwenden.
        if (!file_exists($template) && $default_template != "") {
            if ($startfile == $loopcheck) {
                if ($debugging["html_enable"]) {
                    $debugging["ausgabe"] .= "rparser note: template \"" . $template . "\" not found. Loop detect!!!" . $debugging["char"];
                }
            } else {
                if ($debugging["html_enable"]) {
                    $debugging["ausgabe"] .= "rparser note: template \"" . $template . "\" not found, using: " . $default_template . $debugging["char"];
                }
                if (file_exists($pathvars["templates"] . $default_template)) {
                    $template = $pathvars["templates"] . $default_template;
                } else {
                    $template = $pathvars["fileroot"] . "templates/default/" . $default_template;
                }
            }
            $loopcheck = $startfile;
        } else {
            unset($loopcheck);
        }
    } else {
        if (file_exists($pathvars["templates"] . $overwrite_template)) {
            $template = $pathvars["templates"] . $overwrite_template;
        } else {
            $template = $pathvars["fileroot"] . "templates/default/" . $overwrite_template;
        }
        if ($debugging["html_enable"]) {
            $debugging["ausgabe"] .= "rparser note: template \"" . $startfile . "\" overwrite, using: " . $template . $debugging["char"];
        }
    }
    // reset template overwrite inner recursive procedure
    $overwrite_template = "";
    if (file_exists($template)) {
        $fd = fopen($template, "r");
        while (!feof($fd)) {
            $line = fgets($fd, 1024);
            // alles vor ##begin und nach ##end wird nicht ausgegeben
            if (strpos($line, "##begin") !== false) {
                $begin = "1";
            } else {
                if (strpos($line, "##end") !== false) {
                    $begin = "0";
                } elseif ($begin == "1") {
                    // style path korrektur + dynamic style
                    if (strpos($line, "css/" . $environment["design"] . "/") !== false) {
                        if ($specialvars["dynamiccss"] != "") {
                            $line = str_replace("_default", "_" . $specialvars["dynamiccss"], $line);
                        }
                        $line = str_replace("../../css/", $pathvars["subdir"] . "/css/", $line);
                    } elseif (strpos($line, "../../css/") !== false) {
                        $line = str_replace("../../css/", $pathvars["subdir"] . "/css/", $line);
                    }
                    // image path korrektur (subdir support siehe weiter unten)
                    if (strpos($line, "../../images/") !== false) {
                        $line = str_replace("../../images/", "/images/", $line);
                    }
                    // js path korrektur
                    if (strpos($line, "../../js/") !== false) {
                        $line = str_replace("../../js/", $pathvars["subdir"] . "/js/", $line);
                    }
                    // dynamic bg
                    if (strpos($line, "background=\"!#specialvars_dynamicbg\"") !== false) {
                        if ($specialvars["dynamicbg"] != "") {
                            $line = str_replace("background=\"!#specialvars_dynamicbg\"", "background=\"/images/" . $environment["design"] . "/" . $specialvars["dynamicbg"] . "\"", $line);
                        } else {
                            $line = str_replace("background=\"!#specialvars_dynamicbg\" ", "", $line);
                        }
                    }
                    // image language korrektur
                    if (strpos($line, "_" . $specialvars["default_language"] . ".") !== false && $environment["language"] != $specialvars["default_language"] && $environment["language"] != "") {
                        $line = str_replace("_" . $specialvars["default_language"] . ".", "_" . $environment["language"] . ".", $line);
                    }
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    // language "#(label)" - erster lauf: hier kommt der text anhand von sprache,
                    //                       template und marke aus der datenbank
                    //                       ( der content kann !#ausgaben_xxx enthalten )
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    if (strpos($line, "#(") !== false || strpos($line, "g(") !== false) {
                        // wie heisst das template
                        $tname = substr($startfile, 0, strpos($startfile, ".tem.html"));
                        $line = content($line, $tname);
                    }
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    // variable "!#marke" - hier werden die variablen in die ausgabe eingebaut
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    // !#ausgaben array pruefen und evtl. einsetzen
                    if (strpos($line, "!#ausgaben_") !== false) {
                        foreach ($ausgaben as $name => $value) {
                            // php5 only
                            //                             $line = str_replace("!#ausgaben_$name", $value, $line, &$count);
                            //                             if ( $count > 0 ) {
                            //                                 if ( $debugging["html_enable"] ) $debugging["ausgabe"] .= "parser info (ausgaben): ".$name.$debugging["char"];
                            //                             }
                            $line = str_replace("!#ausgaben_{$name}", $value, $line);
                            #if ( $debugging["html_enable"] ) $debugging["ausgabe"] .= "parser info (ausgaben): ".$name.$debugging["char"];
                        }
                    }
                    // !#element array pruefen und evtl. einsetzen
                    if (strpos($line, "!#element_") !== false) {
                        foreach ((array) $element as $name => $value) {
                            $line = str_replace("!#element_{$name}", $value, $line);
                            #if ( $debugging["html_enable"] ) $debugging["ausgabe"] .= "parser info (element): ".$name." : ".$element[$name].$debugging["char"];
                        }
                    }
                    // !#environment array pruefen und evtl. einsetzen
                    if (strpos($line, "!#environment_") !== false) {
                        foreach ((array) $environment as $name => $value) {
                            $line = str_replace("!#environment_{$name}", $value, $line);
                            #if ( $debugging["html_enable"] ) $debugging["ausgabe"] .= "parser info (environment): ".$name." : ".$environment[$name].$debugging["char"];
                        }
                    }
                    // !#pathvars array pruefen und evtl. einsetzen
                    if (strpos($line, "!#pathvars_") !== false) {
                        foreach ((array) $pathvars as $name => $value) {
                            $line = str_replace("!#pathvars_{$name}", $value, $line);
                            #if ( $debugging["html_enable"] ) $debugging["ausgabe"] .= "parser info (pathvars): ".$name." : ".$pathvars[$name].$debugging["char"];
                        }
                    }
                    // !#lnk array pruefen und evtl. einsetzen
                    // $lnk wird in kekse.inc.php erstellt
                    if (strpos($line, "!#lnk_") !== false) {
                        foreach ((array) $lnk as $name => $value) {
                            $line = str_replace("!#lnk_{$name}", $value, $line);
                            #if ( $debugging["html_enable"] ) $debugging["ausgabe"] .= "parser info (lnk): ".$name." : ".$lnk[$name].$debugging["char"];
                        }
                    }
                    // ##loop-??? -> ##cont bereich bearbeiten
                    // und inhalte aus $dataloop array einbauen
                    if (strpos($line, "##loop") !== false) {
                        $loop = "1";
                        $loop_mark = explode("-", strstr($line, "##loop"), 3);
                        $loop_label = $loop_mark[1];
                        $loop_buffer = "";
                    } else {
                        if (strpos($line, "##cont") !== false) {
                            $loop = "0";
                            $loop_block = "";
                            $labelloop = $dataloop[$loop_label];
                            foreach ((array) $labelloop as $data) {
                                $loop_work = $loop_buffer;
                                foreach ((array) $data as $name => $value) {
                                    $loop_work = str_replace("!{" . $name . "}", $value, $loop_work);
                                }
                                $loop_work = preg_replace("/!\\{[0-9a-zA-Z]+\\}/", "&nbsp;", $loop_work);
                                $loop_block .= $loop_work;
                            }
                            $line = $loop_block . trim($line) . "\n";
                        } elseif ($loop == "1") {
                            $loop_buffer .= trim($line) . "\n";
                            continue;
                        }
                    }
                    // ##hide-??? - ##show bereich bearbeiten
                    // nur wenn $hidedata["???"] verfuegbar ist einblenden
                    if (strpos($line, "##hide") !== false) {
                        $hide = "1";
                        $hide_mark = explode("-", strstr($line, "##hide"), 3);
                        $hide_label = $hide_mark[1];
                        $hide_buffer = "";
                        continue;
                        // marke ebenfalls kicken!
                    } else {
                        if (strpos($line, "##show") !== false) {
                            $hide = "0";
                            $hide_block = "";
                            if (is_array($hidedata[$hide_label])) {
                                foreach ($hidedata[$hide_label] as $name => $value) {
                                    $hide_buffer = str_replace("!{" . $name . "}", $value, $hide_buffer);
                                }
                                $hide_block = preg_replace("/!\\{[0-9a-zA-Z]+\\}/", "&nbsp;", $hide_buffer);
                            }
                            #$line = $block.trim($line)."\n";
                            $line = $hide_block;
                            // marke ebenfalls kicken!
                        } elseif ($hide == "1") {
                            $hide_buffer .= trim($line) . "\n";
                            continue;
                        }
                    }
                    if (strpos($line, "!#") !== false && strpos($line, "<textarea") === false) {
                        $line = str_replace("!#date", gerdate(), $line);
                        $line = str_replace("!#specialvars_pagetitle", $specialvars["pagetitle"], $line);
                        $line = str_replace("!#specialvars_phpsessid", $specialvars["phpsessid"], $line);
                    }
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    // language "#(label)" - zweiter lauf: hier kommt der text anhand von sprache,
                    //                       template und marke aus der datenbank
                    //                       ( wurde bei !#ausgaben_xxx ein #(label) eingebaut
                    //                       wird auch dieses mit content versehen )
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    if (strpos($line, "#(") !== false || strpos($line, "g(") !== false) {
                        // wie heisst das template
                        $tname = substr($startfile, 0, strpos($startfile, ".tem.html"));
                        $line = content($line, $tname);
                    }
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    // subdir support images
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    if ($pathvars["subdir"] != "") {
                        // images in templates + funktionen
                        $line = str_replace("/images/", $pathvars["subdir"] . "/images/", $line);
                        // images im content aber nur bei der ausgabe (nicht im cms editor und im filesystem (magic.php))
                        #                        if ( strpos($line,"=".$cfg["file"]["base"]["webdir"]) === false && strpos($line,$cfg["file"]["base"]["maindir"]) === false ) {
                        if (strpos($line, "textarea") === false && strpos($line, $cfg["file"]["base"]["maindir"]) === false) {
                            $line = str_replace($cfg["file"]["base"]["webdir"], $pathvars["subdir"] . $cfg["file"]["base"]["webdir"], $line);
                        }
                        #else {
                        #    echo "####".$line."####";
                        #}
                    }
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    // automatic "#{marke}" - rekursives !!!, automatisches einparsen von sub templates
                    //////////////////////////////////////////////////////////////////////////////////////////////
                    if (strpos($line, "#{") !== false) {
                        // tausche wenn nötig die inhalte aus
                        if (isset($mapping)) {
                            foreach ($mapping as $name => $value) {
                                #if ( $debugging["html_enable"] ) $debugging["ausgabe"] .= "parser info: #{".$name."}:"."#{".$value."}".$debugging["char"];
                                // evtl. globaler print button
                                #if ( strstr($line,"#{main") ) {
                                #  global $HTTP_GET_VARS;
                                #  if ( $HTTP_GET_VARS["print"] != true ) $print = "<table cellpadding=\"0\" cellspacing=\"0\" width=\"660\"><tr><td width=\"16\">&nbsp;</td><td width=\"628\" align=\"right\"><a href=\"".$pathvars["uri"]."?print=true\">Print Ausgabe</a></td><td width=\"16\">&nbsp;</td></tr></table>";
                                #  if ( $debugging["html_enable"] ) $debugging["ausgabe"] .= "print schalter: ".$environment["template"].$debugging["char"];
                                #}
                                #$line = str_replace("#{".$name."}","#{".$value."}".$print,$line);
                                #if ( strstr($line,"#{main}") ) {
                                // datenbank wechseln -> variablen in menuctrl.inc.php
                                if (strpos($line, "#{main}") !== false && $specialvars["dynlock"] == "") {
                                    if ($environment["fqdn"][0] == $specialvars["dyndb"]) {
                                        $db->selectDb($specialvars["dyndb"], FALSE);
                                        #echo "1: ".$db->getDb();
                                        $specialvars["changed"] = "###switchback###";
                                    }
                                }
                                $line = str_replace("#{" . $name . "}", "#{" . $value . "}" . $specialvars["changed"], $line);
                            }
                        }
                        // marke aus der zeile schneiden und anfang und ende merken
                        while (strpos($line, "#{") !== false) {
                            // wo beginnt die marke
                            $tokenbeg = strpos($line, "#{");
                            // wo endet die marke
                            $tokenend = strpos($line, "}", $tokenbeg);
                            // loopfix
                            // wie lang ist die marke
                            $tokenlen = $tokenend - $tokenbeg;
                            // anfang der zeile merken
                            $lline = substr($line, 0, $tokenbeg);
                            // ende der zeile merken
                            $rline = substr($line, $tokenend + 1);
                            // token name extrahieren
                            $token_name = substr($line, $tokenbeg + 2, $tokenlen - 2);
                            // den token aus der zeile loeschen
                            $token_replace = "#{" . $token_name . "}";
                            $line = str_replace($token_replace, "", $line);
                            if ($specialvars["crc32"] == -1) {
                                if ($environment["ebene"] != "" && $token_name == $environment["kategorie"]) {
                                    // das normale template ist!
                                    $newstartfile = eCRC($environment["ebene"]) . "." . $token_name . ".tem.html";
                                    if ($debugging["html_enable"]) {
                                        $debugging["ausgabe"] .= "crc32 template/content basis: " . $newstartfile . " for ebene (" . $environment["ebene"] . ")" . $debugging["char"];
                                    }
                                    // gibt es ein overwrite template?
                                    $path_element = explode("/", substr($environment["ebene"] . "/", 1) . $environment["kategorie"]);
                                    foreach ($path_element as $value) {
                                        $find_kategorie = array_pop($path_element);
                                        if ($value != "") {
                                            $find_ebene = "/" . implode("/", $path_element);
                                            if ($find_ebene != "/") {
                                                $overwrite_template = eCRC($find_ebene) . "." . $find_kategorie . ".tem.html";
                                            } else {
                                                $overwrite_template = $find_kategorie . ".tem.html";
                                            }
                                            if (!file_exists($pathvars["templates"] . $overwrite_template)) {
                                                if ($debugging["html_enable"]) {
                                                    $debugging["ausgabe"] .= "crc32 overwrite template search: " . $overwrite_template . " for ebene (" . $find_ebene . ")" . $debugging["char"];
                                                }
                                                $overwrite_template = "";
                                            } else {
                                                if ($debugging["html_enable"]) {
                                                    $debugging["ausgabe"] .= "crc32 overwrite template found: " . $overwrite_template . " for ebene (" . $find_ebene . ")" . $debugging["char"];
                                                }
                                                break;
                                            }
                                        }
                                    }
                                } else {
                                    // token name und template endung zusammen bauen
                                    $newstartfile = $token_name . ".tem.html";
                                }
                            } else {
                                // ist das eine sub kategorie ?
                                if ($token_name == $environment["katid"] && $environment["subkatid"] != "") {
                                    // token name und template endung zusammen bauen
                                    $newstartfile = $token_name . "." . $environment["subkatid"] . ".tem.html";
                                    // es gibt kein besonderes template
                                    if (!file_exists($pathvars["templates"] . $newstartfile)) {
                                        if ($debugging["html_enable"]) {
                                            $debugging["ausgabe"] .= "no " . $newstartfile . " template found using " . $token_name . ".tem.html" . $debugging["char"];
                                        }
                                        $newstartfile = $token_name . ".tem.html";
                                    }
                                } else {
                                    // token name und template endung zusammen bauen
                                    $newstartfile = $token_name . ".tem.html";
                                }
                            }
                            // gemerkten zeilen anfang ausgeben
                            echo ltrim($lline);
                            // parser nochmal aufrufen um untertemplate mit dem namen: "$token".tem.html zu parsen
                            rparser($newstartfile, $default_template, $overwrite_template);
                            // reset template overwrite outer recursive procedure
                            $overwrite_template = "";
                            if (strpos($rline, "###switchback###") !== false) {
                                $db->selectDb(DATABASE, FALSE);
                                #echo "<br />2: ".$db->getDb();
                                unset($specialvars["changed"]);
                                $rline = str_replace("###switchback###", "", $rline);
                            }
                            // gemerktes zeilen ende ausgeben
                            echo rtrim($rline) . "\n";
                        }
                    } else {
                        // eWeBuKi tag schutz part 4
                        $mark_o = array("#(", "g(", "#{", "!#");
                        $hide_o = array("::1::", "::2::", "::3::", "::4::");
                        $line = str_replace($hide_o, $mark_o, $line);
                        // da keine marken fuer sub templates da waren zeile unveraendert ausgeben
                        echo trim($line) . "\n";
                    }
                    # ende automatic "#{marke}"
                }
                # hier passiert alles bevor ##end
            }
            # ende zeile enthaelt kein ##begin
        }
        # ende der file while schleife
        fclose($fd);
    } else {
        if ($debugging["html_enable"]) {
            $debugging["ausgabe"] .= "rparser error: template " . $template . " not found!!!" . $debugging["char"];
        }
    }
    # ende der file existenz pruefung
}
コード例 #25
0
    /**
     * Front-end display of widget.
     *
     * @see WP_Widget::widget()
     *
     * @param array $args     Widget arguments.
     * @param array $instance Saved values from database.
     */
    function widget($args, $instance)
    {
        extract($args);
        global $interval;
        // User-selected settings
        $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
        $category = $instance['category'];
        $post_count = $instance['post_count'];
        $post_desc = $instance['post_desc'];
        $post_desc_limit = $instance['post_desc_limit'];
        $date = $instance['date'];
        $t_height = $instance['t_height'];
        $t_width = $instance['t_width'];
        echo $before_widget;
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        ?>
        	<?php 
        global $wp_query, $paged, $post;
        $temp = $wp_query;
        $wp_query = null;
        $wp_query = new WP_Query();
        if (!empty($category)) {
            $args .= '&category_name=' . $category;
        }
        if (!empty($post_count)) {
            $args .= '&showposts=' . $post_count;
        } else {
            $args .= '&showposts=4';
        }
        if (!empty($args)) {
            $args .= $args;
        }
        $wp_query->query($args);
        ?>
            	<ul class="loop_blog_widget">
				<?php 
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            unset($img);
            if (current_theme_supports('post-thumbnails') && has_post_thumbnail()) {
                $customloop_thumb_image_url = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
                $url = $customloop_thumb_image_url[0];
            }
            ?>
                <li><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark"><?php 
            if ($url) {
                ?>
<figure class="custom_img_b_thin alignleft"><img src="<?php 
                echo get_template_directory_uri();
                ?>
/inc/timthumb.php?src=<?php 
                echo $url;
                ?>
&amp;<?php 
                if ($t_width) {
                    echo 'w=' . $t_width;
                } else {
                    echo 'w=60';
                }
                ?>
&amp;<?php 
                if ($t_height) {
                    echo 'h=' . $t_height;
                } else {
                    echo 'h=60';
                }
                ?>
&amp;zc=1" alt="<?php 
                the_title();
                ?>
" title="<?php 
                the_title();
                ?>
" height="<?php 
                if ($t_height) {
                    echo $t_height;
                } else {
                    echo '60';
                }
                ?>
" width="<?php 
                if ($t_width) {
                    echo $t_width;
                } else {
                    echo '60';
                }
                ?>
" /></figure><?php 
            }
            ?>
<div><p class="sh_title"><?php 
            the_title();
            ?>
</p>
            <?php 
            if ($date) {
                ?>
<span class="entry-date"><i class="icon-calendar"></i> <?php 
                the_time('M jS, Y');
                ?>
</span></div><?php 
            }
            if ($post_desc == true && $post_desc_limit) {
                content($post_desc_limit);
            }
            ?>
<div class="clear"></div></a></li>
                <?php 
        }
        wp_reset_query();
        ?>
                </ul>
                <div class="clear"></div>
			
		<?php 
        echo $after_widget;
    }
コード例 #26
0
ファイル: default.php プロジェクト: walteraries/anahita
</dd>

            <dt><?php 
    echo @text('COM-SUBSCRIPTIONS-PACKAGE-PRICE');
    ?>
:</dt> 
            <dd><?php 
    echo $package->price . ' ' . get_config_value('subscriptions.currency', 'US');
    ?>
</dd>
        </dl>
    </div>
    
    <div class="entity-description">
        <?php 
    echo @content($package->description);
    ?>
    
        <?php 
    if (!$package->recurring && $package->authorize('upgradepackage')) {
        ?>
        <p>
            <a href="<?php 
        echo @route(array('view' => 'signup', 'id' => $package->id));
        ?>
" class="btn">
                <?php 
        echo @text('COM-SUBSCRIPTIONS-PACKAGE-ACTION-UPGRADE-NOW');
        ?>
            </a>
        </p>
コード例 #27
0
        echo $user->user_firstname . ' ' . $user->user_lastname;
        ?>
 " /></div>
					<span class="day"><?php 
        the_time('d.m.y');
        ?>
</span>
					<h3><a href="<?php 
        the_permalink();
        ?>
"> <?php 
        the_title();
        ?>
</a></h3>
					<?php 
        echo content(50);
        ?>
					<div class="clearfix"></div>
					<?php 
        if (function_exists('dynamic_sidebar')) {
            dynamic_sidebar('share-sidebar');
        }
        ?>
	
					<div class="more"><a href="<?php 
        the_permalink();
        ?>
"><i class="sprite-arrow-right"></i><?php 
        echo _e('[:ua]Детальніше [:en]More');
        ?>
</a></div>
コード例 #28
0
<?php

include "layout.inc.php";
head();
content("Type 1");
footer();
コード例 #29
0
                                </form>
                            </div>
                        </li><!-- /.searchbox -->
                    </ul>
                    <?php 
echo menu('navbar-nav navbar-right');
?>
                </div>
            </nav>
        </div><!--//container-->
    </header><!--//header-->
    <div class="container sections-wrapper">
        <div class="row">
            <div class="primary col-md-8 col-sm-12 col-xs-12">
            <?php 
echo content();
?>
            </div><!--//primary-->
            <div class="secondary col-md-4 col-sm-12 col-xs-12">
                <aside class="aside section">
                    <div class="section-inner">
                        <h2 class="heading">About</h2>
                        <div class="content">
                         <?php 
echo blog_description();
?>
                                  
                        </div><!--//content-->  
                    </div><!--//section-inner-->                 
                </aside><!--//section-->
                <aside class="recent-posts aside section">
コード例 #30
0
ファイル: rules.php プロジェクト: justinmc/turkiball.com
<?php 
include $_SERVER['DOCUMENT_ROOT'] . '/beta/scripts/functions_page.php';
$filename = "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"];
// Removes the slash if there is one
if (substr($filename, strlen($filename) - 1, 1) == '/') {
    $filename = substr($filename, 0, strlen($filename) - 1);
}
head(0);
// Means we're in home
?>
																								

</head>

<body>

<?php 
title();
newsbar(0);
// Means we're in home
navbarleft();
content(0, 0, 0, 0, $filename);
// in home, filename for echoContent, rest for the fn entries
bottom();
?>
			

</body>

</html>