Exemplo n.º 1
0
<?php

$cid = isset($_POST['cid']) ? $_POST['cid'] : 0;
print select_course('cid', $cid);
print '<div id="admin_archive_section">';
print list_archives($cid, 10, 1);
print '</div>';
?>
<script type="text/javascript">
$("select#cid").change(function(){
	$("#admin_archive_section").load("triggers/admin_archive.php",{cid:$(this).val(),count:10,page:1});
});
</script>
Exemplo n.º 2
0
<?php

//List posts by courses
require_once '../includes/functions.inc.php';
require_once '../includes/admin.inc.php';
$cid = isset($_POST['cid']) ? $_POST['cid'] : 0;
$count = isset($_POST['count']) ? $_POST['count'] : 10;
$page = isset($_POST['page']) ? $_POST['page'] : 1;
print list_archives($cid, $count, $page);
?>
<script type="text/javascript">
$("a.button.disabled").click(function(){
	openLogin();
});
$('#admin_archive_section [title]').qtip({
	style: {
		padding: 7,
		background: '#404041',
		color: 'white',
		fontSize: '10px',
		textAlign: 'center',
		border: {
			width: 2,
			color: 'white'
		},
		tip: 'topLeft',
		name: 'dark' // Inherit the rest of the attributes from the preset dark style
	},
	position: {
		corner: {
		target: 'bottomMiddle',
Exemplo n.º 3
0
function collapsArch($args = '')
{
    global $collapsArchItems, $wpdb, $month;
    include 'defaults.php';
    $options = wp_parse_args($args, $defaults);
    if (!is_admin()) {
        if (!$options['number'] || $options['number'] == '') {
            $options['number'] = 1;
        }
        $archives = list_archives($options);
        $archives .= "<li style='display:none'><script type=\"text/javascript\">\n";
        $archives .= "// <![CDATA[\n";
        $archives .= '/* These variables are part of the Moo Collapsing Archives Plugin
   * version: 0.5.5
   * Copyright 2010 3DO lab (3dolab.net)
           */' . "\n";
        extract($options);
        $post_attrs = "post_date != '0000-00-00 00:00:00' AND post_status = 'publish'";
        if ($expand == 1) {
            $expandSym = '+';
            $collapseSym = '—';
        } elseif ($expand == 2) {
            $expandSym = '[+]';
            $collapseSym = '[—]';
        } elseif ($expand == 3) {
            $expandSym = "<img src='" . $url . "/wp-content/plugins/mootools-collapsing-archives/" . "img/expand.gif' alt='expand' />";
            $collapseSym = "<img src='" . $url . "/wp-content/plugins/mootools-collapsing-archives/" . "img/collapse.gif' alt='collapse' />";
        } elseif ($expand == 4) {
            $expandSym = htmlentities($customExpand);
            $collapseSym = htmlentities($customCollapse);
        } else {
            $expandSym = '&#9658;';
            $collapseSym = '&#9660;';
        }
        if ($expand == 3) {
            $expandSymJS = 'expandImg';
            $collapseSymJS = 'collapseImg';
        } else {
            $expandSymJS = $expandSym;
            $collapseSymJS = $collapseSym;
        }
        if ($expandCurrentYear) {
            $expandCookieYear = "if (!Cookie.read('collapsArch-" . date('Y') . ":" . $number . "')){Cookie.write('collapsArch-" . date('Y') . ":" . $number . "', 'inline');}";
            $archives .= $expandCookieYear;
        }
        if ($expandCurrentMonth) {
            $expandCookieMonth = "if (!Cookie.read('collapsArch-" . date('Y') . "-" . date('n') . ":" . $number . "')){Cookie.write('collapsArch-" . date('Y') . "-" . date('n') . ":" . $number . "', 'inline');}";
            $archives .= $expandCookieMonth;
        }
        $expandText = __('click to expand', 'moo-collapsing-arc');
        $collapseText = __('click to collapse', 'moo-collapsing-arc');
        $archives .= "var expand=\"{$expandSymJS}\";";
        $archives .= "var collapse=\"{$collapseSymJS}\";";
        $archives .= "var animate=\"{$animate}\";";
        $archives .= "var expandSym=\"{$expandSym}\";\n";
        $archives .= "var collapseSym=\"{$collapseSym}\";\n";
        $archives .= "var expandText=\"{$expandText}\";\n";
        $archives .= "var collapseText=\"{$collapseText}\";\n";
        $archives .= "var useCookies=\"{$useCookies}\";";
        print $archives;
        // now we create an array indexed by the id of the ul for posts
        collapsArch::phpArrayToJS($collapsArchItems, 'collapsItems', $options);
        print "// ]]>\n</script></li>\n";
    }
}