function scripts($js = '')
{
    require_once 'lib/functions.lib.php';
    $framework = frameworkDir();
    $return = '';
    if (preg_match('/index.php$/', this_page())) {
        $return .= <<<EOT
<script src="{$framework}/scripts/jquery/jquery.min.js" language="javascript" type="text/javascript"></script>
<script src="{$framework}/scripts/jquery/jquery.pagination.js" language="javascript" type="text/javascript"></script>
<script src="{$framework}/scripts/paginationFrontPage.js" language="javascript" type="text/javascript"></script>
EOT;
    }
    if (preg_match('/viewCommits\\.php$/', this_page())) {
        $return .= <<<EOT
<script src="{$framework}/scripts/jquery/jquery.min.js" language="javascript" type="text/javascript"></script>
<script src="{$framework}/scripts/jquery/jquery.pagination.js" language="javascript" type="text/javascript"></script>
<script src="{$framework}/scripts/pagination.js" language="javascript" type="text/javascript"></script>
EOT;
    }
    $return .= '<script src="' . $framework . '/scripts/script.js" language="javascript" type="text/javascript"></script>';
    if ($js != '') {
        $return .= <<<EOT
<script type="text/javascript" language="javascript">
\t{$js}
</script>
EOT;
    }
    return $return;
    /*
      include relative_address().'/'.frameworkDir().'/scripts/goHome.js';
      include relative_address().'/'.frameworkDir().'/scripts/script.js';*/
}
Beispiel #2
0
function generateOwnerButtons($id, $series)
{
    global $user, $create_by, $status, $area;
    global $PHP_SELF, $reminders_enabled, $last_reminded, $reminder_interval;
    $this_page = this_page();
    // Remind button if you're the owner AND there's a booking awaiting
    // approval AND sufficient time has passed since the last reminder
    // AND we want reminders in the first place
    if ($reminders_enabled && $user == $create_by && $status & STATUS_AWAITING_APPROVAL && working_time_diff(time(), $last_reminded) >= $reminder_interval) {
        echo "<tr>\n";
        echo "<td>&nbsp;</td>\n";
        echo "<td>\n";
        generateButton("approve_entry_handler.php", $id, $series, "remind", $this_page . "?id={$id}&amp;area={$area}", get_vocab("remind_admin"));
        echo "</td>\n";
        echo "</tr>\n";
    }
}
Beispiel #3
0
function refresh($page = 'none', $dbpage = 'none', $seconds = 0)
{
    $address = address();
    switch (TRUE) {
        // refresh page to http://www.example.com/blog.php?page=2
        case $page != 'none' && $dbpage != 'none':
            return header('refresh: ' . $seconds . '; url=' . $address . $page . '?page=' . $dbpage . '');
            break;
            // refresh page to http://www.example.com/blog.php
        // refresh page to http://www.example.com/blog.php
        case $page != 'none':
            return header('refresh: ' . $seconds . '; url=' . $address . $page . '');
            break;
            // refreshes to the same page and sets the variable page to something
        // refreshes to the same page and sets the variable page to something
        case $dbpage != 'none':
            return header('refresh: ' . $seconds . '; url=' . $address . this_page() . '?page=' . $dbpage . '');
            break;
            // refreshes to the same page
        // refreshes to the same page
        case $page == 'none':
            return header('refresh: ' . $seconds . '; url=' . $address . this_page() . '');
            break;
    }
}
            echo "<li>{$conflict}</li>\n";
        }
        echo "</ul>\n";
    }
}
echo "<div id=\"submit_buttons\">\n";
// Back button
echo "<form method=\"post\" action=\"" . htmlspecialchars($returl) . "\">\n";
echo "<fieldset><legend></legend>\n";
echo "<input type=\"submit\" value=\"" . get_vocab("back") . "\">\n";
echo "</fieldset>\n";
echo "</form>\n";
// Skip and Book button (to book the entries that don't conflict)
// Only show this button if there were no policies broken and it's a series
if (empty($result['rules_broken']) && isset($rep_type) && $rep_type != REP_NONE) {
    echo "<form method=\"post\" action=\"" . htmlspecialchars(this_page()) . "\">\n";
    echo "<fieldset><legend></legend>\n";
    // Put the booking data in as hidden inputs
    $skip = 1;
    // Force a skip next time round
    // First the ordinary fields
    foreach ($formvars as $var => $var_type) {
        if ($var_type == 'array') {
            // See the comment at the top of the page about array formats
            foreach (${$var} as $value) {
                if (isset($value)) {
                    echo "<input type=\"hidden\" name=\"{$var}[]\" value=\"" . htmlspecialchars($value) . "\">\n";
                }
            }
        } elseif (isset(${$var})) {
            echo "<input type=\"hidden\" name=\"{$var}\" value=\"" . htmlspecialchars(${$var}) . "\">\n";
Beispiel #5
0
Here goes the best site ever: <strong><?php 
this_page();
?>
</strong>
function refresh($page = 'none', $dbpage = 'none', $seconds = 0)
{
    $address = address();
    switch (TRUE) {
        case $page != 'none' && $dbpage != 'none':
            return header('refresh: ' . $seconds . '; url=' . $address . $page . '?page=' . $dbpage . '');
            break;
        case $page != 'none':
            return header('refresh: ' . $seconds . '; url=' . $address . $page . '');
            break;
        case $dbpage != 'none':
            return header('refresh: ' . $seconds . '; url=' . $address . this_page() . '?page=' . $dbpage . '');
            break;
        case $page == 'none':
            return header('refresh: ' . $seconds . '; url=' . $address . this_page() . '');
            break;
    }
}
Beispiel #7
0
function output_row(&$row)
{
    global $ajax, $json_data;
    global $level, $min_user_editing_level, $user;
    global $fields, $ignore_columns, $select_options;
    $values = array();
    // First column, which is the name
    $html_name = htmlspecialchars($row['name']);
    // You can only edit a user if you have sufficient admin rights, or else if that user is yourself
    if ($level >= $min_user_editing_level || strcasecmp($row['name'], $user) == 0) {
        $link = htmlspecialchars(this_page()) . "?Action=Edit&amp;Id=" . $row['id'];
        $values[] = "<a title=\"{$html_name}\" href=\"{$link}\">{$html_name}</a>";
    } else {
        $values[] = "<span class=\"normal\" title=\"{$html_name}\">{$html_name}</span>";
    }
    // Other columns
    foreach ($fields as $field) {
        $key = $field['name'];
        if (!in_array($key, $ignore_columns)) {
            $col_value = $row[$key];
            switch ($key) {
                // special treatment for some fields
                case 'level':
                    // the level field contains a code and we want to display a string
                    // (but we put the code in a span for sorting)
                    $values[] = "<span title=\"{$col_value}\"></span>" . "<div class=\"string\">" . get_vocab("level_{$col_value}") . "</div>";
                    break;
                case 'email':
                    // we don't want to truncate the email address
                    $values[] = "<div class=\"string\">" . htmlspecialchars($col_value) . "</div>";
                    break;
                default:
                    // Where there's an associative array of options, display
                    // the value rather than the key
                    if (isset($select_options["users.{$key}"]) && is_assoc($select_options["users.{$key}"])) {
                        if (isset($select_options["users.{$key}"][$row[$key]])) {
                            $col_value = $select_options["users.{$key}"][$row[$key]];
                        } else {
                            $col_value = '';
                        }
                        $values[] = "<div class=\"string\">" . htmlspecialchars($col_value) . "</div>";
                    } elseif ($field['nature'] == 'boolean' || $field['nature'] == 'integer' && isset($field['length']) && $field['length'] <= 2) {
                        // booleans: represent by a checkmark
                        $values[] = !empty($col_value) ? "<img src=\"images/check.png\" alt=\"check mark\" width=\"16\" height=\"16\">" : "&nbsp;";
                    } elseif ($field['nature'] == 'integer' && isset($field['length']) && $field['length'] > 2) {
                        // integer values
                        $values[] = $col_value;
                    } else {
                        // strings
                        $values[] = "<div class=\"string\" title=\"" . htmlspecialchars($col_value) . "\">" . htmlspecialchars($col_value) . "</div>";
                    }
                    break;
            }
            // end switch
        }
    }
    // end foreach
    if ($ajax) {
        $json_data['aaData'][] = $values;
    } else {
        echo "<tr>\n<td>\n";
        echo implode("</td>\n<td>", $values);
        echo "</td>\n</tr>\n";
    }
}
    function content_55e44441897a91_94399789($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_date_format')) {
            include '/var/www/includes/smartyv3/plugins/modifier.date_format.php';
        }
        ?>
<!DOCTYPE HTML>

<html>
    <head>
        <?php 
        if (in_dev()) {
            ?>
            <?php 
            if (isset($_smarty_tpl->tpl_vars['cache_buster'])) {
                $_smarty_tpl->tpl_vars['cache_buster'] = clone $_smarty_tpl->tpl_vars['cache_buster'];
                $_smarty_tpl->tpl_vars['cache_buster']->value = microtime(true);
                $_smarty_tpl->tpl_vars['cache_buster']->nocache = null;
                $_smarty_tpl->tpl_vars['cache_buster']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['cache_buster'] = new Smarty_variable(microtime(true), null, 0);
            }
            ?>
        <?php 
        } else {
            ?>
            <?php 
            if (isset($_smarty_tpl->tpl_vars['cache_buster'])) {
                $_smarty_tpl->tpl_vars['cache_buster'] = clone $_smarty_tpl->tpl_vars['cache_buster'];
                $_smarty_tpl->tpl_vars['cache_buster']->value = $_smarty_tpl->tpl_vars['Cbucket']->value->version;
                $_smarty_tpl->tpl_vars['cache_buster']->nocache = null;
                $_smarty_tpl->tpl_vars['cache_buster']->scope = 0;
            } else {
                $_smarty_tpl->tpl_vars['cache_buster'] = new Smarty_variable($_smarty_tpl->tpl_vars['Cbucket']->value->version, null, 0);
            }
            ?>
        <?php 
        }
        ?>

        <script src="//code.jquery.com/jquery-latest.min.js"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script>
            var loading = '<i class="fa fa-spinner fa-spin"></i> <?php 
        echo smarty_lang(array('code' => "loading"), $_smarty_tpl);
        ?>
...';
            var baseurl = "<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
";
            var imageurl = "<?php 
        echo $_smarty_tpl->tpl_vars['imageurl']->value;
        ?>
";
        </script>
      
          <!-- custom scrollbars plugin -->
        <script src="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/js/jquery.mCustomScrollbar.concat.min.js"></script>
        <script>
            (function($){
                $(window).load(function(){
                    $("#content_1").mCustomScrollbar({
                        scrollButtons:{
                            enable:true
                        }
                    });
                });
            })(jQuery);
        </script>

        <!-- ClipBucket v<?php 
        echo $_smarty_tpl->tpl_vars['Cbucket']->value->version;
        ?>
 -->
        <meta name="copyright" content="ClipBucket - Integrated Units 2007 - <?php 
        echo smarty_modifier_date_format(time(), "%Y");
        ?>
" />
        <meta name="author" content="Arslan Hassan - http://clip-bucket.com/arslan-hassan" />
        <meta name="author" content="Fawaz Tahir - http://clip-bucket.com/fawaz-tahir" />
        <link rel="shortcut icon" href="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/favicon.ico">
        <link rel="icon" type="image/ico" href="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/favicon.ico" />

        <!-- RSS FEEDS -->
        <?php 
        echo rss_feeds(array('link_tag' => true), $_smarty_tpl);
        ?>


        <meta name="keywords" content="<?php 
        echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['keywords'];
        ?>
" />
        <meta name="description" content="<?php 
        echo $_smarty_tpl->tpl_vars['Cbucket']->value->configs['description'];
        ?>
" />
        <meta name="distribution" content="global" />


        <title><?php 
        echo cbtitle(array(), $_smarty_tpl);
        ?>
</title>


        <link href='//fonts.googleapis.com/css?family=Rambla:400,700|Roboto:400,700|Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>


        <link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/css/bootstrap.min.css?cache=<?php 
        echo $_smarty_tpl->tpl_vars['cache_buster']->value;
        ?>
" />
        <?php 
        if (this_page('index')) {
            ?>
        <link rel="stylesheet" href="<?php 
            echo $_smarty_tpl->tpl_vars['theme']->value;
            ?>
/css/home.css?cache=<?php 
            echo $_smarty_tpl->tpl_vars['cache_buster']->value;
            ?>
" />
        <?php 
        }
        ?>
        
     
        <link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/css/main.css?cache=<?php 
        echo $_smarty_tpl->tpl_vars['cache_buster']->value;
        ?>
" />
        <link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/css/ClipBucket.css?cache=<?php 
        echo $_smarty_tpl->tpl_vars['cache_buster']->value;
        ?>
" />
        <link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/css/channel.css?cache=<?php 
        echo $_smarty_tpl->tpl_vars['cache_buster']->value;
        ?>
" />
        <link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/css/groups.css?cache=<?php 
        echo $_smarty_tpl->tpl_vars['cache_buster']->value;
        ?>
" />
        <link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/css/header.css?cache=<?php 
        echo $_smarty_tpl->tpl_vars['cache_buster']->value;
        ?>
">

        

        <link href="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/css/jquery.mCustomScrollbar.css" rel="stylesheet" />
        <link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/css/font-awesome.min.css">

        <?php 
        if (this_page('watch_video') || this_page('view_item') || this_page('view_channel')) {
            ?>
        <link rel="stylesheet" href="<?php 
            echo $_smarty_tpl->tpl_vars['theme']->value;
            ?>
/css/watch-video.css">
        
    	<?php 
        }
        ?>

    	<?php 
        if (this_page('view_channel')) {
            ?>
        <link rel="stylesheet" href="<?php 
            echo $_smarty_tpl->tpl_vars['theme']->value;
            ?>
/css/view-channel-header.css">
    	<?php 
        }
        ?>


    	
        <?php 
        if (this_page('photo_upload') || this_page('upload')) {
            ?>
        <link rel="stylesheet" href="<?php 
            echo $_smarty_tpl->tpl_vars['theme']->value;
            ?>
/css/uploader.css">
        <?php 
        }
        ?>
        <?php 
        if (this_page('view_channel')) {
            ?>
         <link rel="stylesheet" href="<?php 
            echo $_smarty_tpl->tpl_vars['theme']->value;
            ?>
/css/view_channel.css">
        <?php 
        }
        ?>

        <?php 
        if (this_page('signup')) {
            ?>
        <link rel="stylesheet" href="<?php 
            echo $_smarty_tpl->tpl_vars['baseurl']->value;
            ?>
/styles/global/jquery_ui.css">
        <?php 
        }
        ?>
       
		<?php 
        if (this_page('index')) {
            ?>
			<script src="<?php 
            echo $_smarty_tpl->tpl_vars['theme']->value;
            ?>
/js/custom-elements.js"></script>
		<?php 
        }
        ?>
        <?php 
        echo ANCHOR(array('place' => 'ajax_data'), $_smarty_tpl);
        ?>

        <script type="text/javascript" src="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/js/functions.js"></script>
        <script type="text/javascript" src="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/js/admin_functions.js"></script>
        
        <script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/js/bootstrap.min.js"></script>
        <script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/js/masonary.desandro.min.js"></script>
        <script src="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/js/clipbucket.js"></script>
        <script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/js/masonary.desandro.min.js"></script>
        <script src='https://www.google.com/recaptcha/api.js'></script



		<!-- Script For Home Page Videos Slider //-->
		<script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/js/jssor.slider.min.js"></script>

        <script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/js/uslider_js/jquery.easing.js"></script>
        <script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/js/uslider_js/jquery.mousewheel.js"></script>
        <script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme']->value;
        ?>
/js/uslider_js/jquery.ulslide.js?v=4"></script>
		<!-- Script For Home Page Videos Slider //-->

        <?php 
        if (isset($_smarty_tpl->tpl_vars['quicklist'])) {
            $_smarty_tpl->tpl_vars['quicklist'] = clone $_smarty_tpl->tpl_vars['quicklist'];
            $_smarty_tpl->tpl_vars['quicklist']->value = json_encode($_smarty_tpl->tpl_vars['cbvid']->value->get_quicklist());
            $_smarty_tpl->tpl_vars['quicklist']->nocache = null;
            $_smarty_tpl->tpl_vars['quicklist']->scope = 0;
        } else {
            $_smarty_tpl->tpl_vars['quicklist'] = new Smarty_variable(json_encode($_smarty_tpl->tpl_vars['cbvid']->value->get_quicklist()), null, 0);
        }
        ?>
        
        <script>
            $(document).ready(function(){
                var quicklist_videos = '<?php 
        echo $_smarty_tpl->tpl_vars['quicklist']->value;
        ?>
';
                if (quicklist_videos)
                quicklist_videos_check(quicklist_videos);

                loading = '<i class="fa fa-spinner fa-spin"></i> <?php 
        echo smarty_lang(array('code' => "loading"), $_smarty_tpl);
        ?>
...';
               /* var container = document.querySelector('.the_');
                var msnry = new Masonry( container, {
                    // options

                    itemSelector: '.the-item',
                    stamp : '.ad-box'

                });
    */
    //            less.watch({
    //            poll : 300
    //            });

            // For changing language on Click in footer
            $( 'ul#photos li:visible' ).each( function( i ){
                $( this )[ (1&i) ? 'addClass' : 'removeClass' ]( 'photo-land-no' );
            });

            // Language change select code
            $('#lang_selector').change(function(){
            var optionSelectedValue = $('#lang_selector option:selected').val();
            if(optionSelectedValue)
                {
                    var $currentLocation = window.location.href,
                            matchedElement = $currentLocation.match(/\?/);
                            
                    if(matchedElement == null)
                    {
                        window.location = "?set_site_lang="+optionSelectedValue;    
                    } else {
                        window.location = window.location+"&set_site_lang="+optionSelectedValue;    
                    }
                }
            });
            
            });

        </script>


        <?php 
        echo include_header(array('file' => 'global_header'), $_smarty_tpl);
        ?>


    </head><?php 
    }
Beispiel #9
0
 // Build an array with the area info and also see if there are going
 // to be any areas to display (in other words rooms if you are not an
 // admin whether any areas are enabled)
 $areas = array();
 $n_displayable_areas = 0;
 for ($i = 0; $row = sql_mysqli_row_keyed($res, $i); $i++) {
     $areas[] = $row;
     if ($is_admin || !$row['disabled']) {
         $n_displayable_areas++;
     }
 }
 if ($n_displayable_areas == 0) {
     echo "<p>" . get_vocab("noareas_enabled") . "</p>\n";
 } else {
     // If there are some areas displayable, then show the area form
     echo "<form id=\"areaChangeForm\" method=\"get\" action=\"" . htmlspecialchars(this_page()) . "\">\n";
     echo "<fieldset>\n";
     echo "<legend></legend>\n";
     // The area selector
     echo "<label id=\"area_label\" for=\"area_select\">" . get_vocab("area") . ":</label>\n";
     echo "<select class=\"room_area_select\" id=\"area_select\" name=\"user\" onchange=\"this.form.submit()\">";
     $is_admin = 1;
     if ($is_admin) {
         if ($areas[0]['disabled']) {
             $done_change = TRUE;
             echo "<optgroup label=\"" . get_vocab("disabled") . "\">\n";
         } else {
             $done_change = FALSE;
             echo "<optgroup label=\"" . get_vocab("enabled") . "\">\n";
         }
     }
    function content_56afd771f0ba60_43988601($_smarty_tpl)
    {
        ?>
<meta charset="UTF-8">
<title><?php 
        echo cbtitle(array(), $_smarty_tpl);
        ?>
</title>

<link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/assets/css/font-awesome.min.css" />
<link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/css/styles.css" />

<!--[if IE 7]>
  <link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/assets/css/font-awesome-ie7.min.css" />
<![endif]-->

<!-- page specific plugin styles -->

<!-- fonts -->

<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400,300" />

<!-- ace styles -->
<?php 
        if (!this_page('admin_login')) {
            ?>
 <!-- these css file not includes in admin area login.html -->
<link rel="stylesheet" href="<?php 
            echo $_smarty_tpl->tpl_vars['theme_url']->value;
            ?>
/assets/css/ace.min.css" />
<link rel="stylesheet" href="<?php 
            echo $_smarty_tpl->tpl_vars['theme_url']->value;
            ?>
/assets/css/ace-rtl.min.css" />
<link rel="stylesheet" href="<?php 
            echo $_smarty_tpl->tpl_vars['theme_url']->value;
            ?>
/assets/css/ace-skins.min.css" />
<?php 
        }
        ?>

<!--[if lte IE 8]>
  <link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/assets/css/ace-ie.min.css" />
<![endif]-->

<!-- inline styles related to this page -->

<script type="text/javascript">
    var baseurl = "<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
";
    var imageurl = "<?php 
        echo $_smarty_tpl->tpl_vars['imageurl']->value;
        ?>
";
</script>





<!-- ace settings handler -->

<script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/assets/js/ace-extra.min.js"></script>
<script src="<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
/js/clipbucket.js"></script>



<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

<!--[if lt IE 9]>
<script src="assets/js/html5shiv.js"></script>
<script src="assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript" src="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/../../../../js/functions.js"></script>
<script type="text/javascript" src="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/../../../../js/admin_functions.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<!-- for bootstrap wysiwyg -->
<link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/css/summernote.css" />


<script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/js/editor.js"></script>
<script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/js/main.js"></script>

<!-- for bootstrap wysiwyg -->

        <!-- for popovers -->
<script>
    $(function (){
        $(".popoverButton").popover();
    });

</script>

<!-- bootstrap x-editable -->
<link rel="stylesheet" href="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/bootstrap-editable/css/bootstrap-editable.css" />
<script src="<?php 
        echo $_smarty_tpl->tpl_vars['theme_url']->value;
        ?>
/bootstrap-editable/js/bootstrap-editable.min.js"></script>


<script type="text/javascript">
    $(document).ready(function() {
        $('.xedit').editable({
            mode: 'inline',
            url:baseurl+'/admin_area/index.php?mode=update_pharse',
            pk: function(){
                var id = $(this).attr("id");
                
                id = id.match(/([0-9]+)$/g);
               return id.pop();
            },
        });
    });



</script>
<script>
$(document).ready(function() {
             $('.edit_lang').editable(baseurl+'/actions/update_phrase.php', {  alert('yu');
            // cancel    : 'Cancel',
            // submit    : 'OK',
             indicator : '<img src="'+baseurl+'/images/icons/progIndicator.gif">',
             tooltip   : 'Click to edit...',
            });
        });
    $(document).ready(function(){
        $(".drop").on({
            click: function(e){
                var ele = $(this).parent().nextAll("#content").get(0);
                $(ele).toggle();
            }
        });
    });


</script>

<script>
    $(document).ready(function() {
        $('#desc').summernote();
    });
</script>





<script>
    $(function(){


        $(".saveTodo").click(function(e){
            var self = this;
             var newVal = $(this).parent().parent().find("input[name='todo']").val();
             if(newVal.length){
                var ajaxCall = $.ajax({
                    url: "<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
" + "/admin_area/index.php",
                    type: "post",
                    data: {
                        val: newVal,
                        mode: "add_todo",
                    },
                });
                ajaxCall.success(function(data){
                    data = $.parseJSON(data);
                    var p = document.createElement("p");
                    p.className = "xedit editable editable-click";
                    var input = document.createElement("input");
                    input.type = "hidden";
                    input.name = "todoid";
                    input.value = data.id;
                    var b = document.createElement("b");
                    b.innerHTML = data.todo;
                    p.appendChild(input);
                    p.appendChild(b);
                    console.log(p);
                    $(self).parents("form").after(p);
                });
             }else{
                alert("Please enter a valid value");
             }
        });


    $("#todolist").on("click", ".editable-clear-x", function(e){
        e.preventDefault();
            var self = this;
            var id = $(this).parents(".editable-container").prev().attr("id");
            id = id.match(/([0-9]+)$/g);
            id = id.pop();
            var ajaxCall = $.ajax({
                url: "<?php 
        echo $_smarty_tpl->tpl_vars['baseurl']->value;
        ?>
" + "/admin_area/index.php",
                type: "post",
                data: {
                    id: id,
                    mode: "delete_todo",
                },
            });
            ajaxCall.success(function(data){
                $(self).parents("p").remove();
                $(self).parents(".editable-container").remove();
            });
            e.stopPropagation();
    });

    });
</script>

<?php 
        if ($_smarty_tpl->tpl_vars['Cbucket']->value->AdminJSArray) {
            ?>
<!-- Including JS Files-->
<?php 
            $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['type']->_loop = false;
            $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->AdminJSArray;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value) {
                $_smarty_tpl->tpl_vars['type']->_loop = true;
                $_smarty_tpl->tpl_vars['file']->value = $_smarty_tpl->tpl_vars['type']->key;
                ?>
    <?php 
                if ($_smarty_tpl->tpl_vars['curActive']->value == $_smarty_tpl->tpl_vars['type']->value || $_smarty_tpl->tpl_vars['type']->value == 'global') {
                    ?>
        <?php 
                    echo include_js(array('type' => $_smarty_tpl->tpl_vars['type']->value, 'file' => $_smarty_tpl->tpl_vars['file']->value), $_smarty_tpl);
                    ?>

    <?php 
                }
            }
            ?>
<!-- Including JS Files-->
<?php 
        }
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['Cbucket']->value->admin_header_files) {
            ?>
    <!-- Including Headers -->
    <?php 
            $_smarty_tpl->tpl_vars['type'] = new Smarty_Variable();
            $_smarty_tpl->tpl_vars['type']->_loop = false;
            $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable();
            $_from = $_smarty_tpl->tpl_vars['Cbucket']->value->admin_header_files;
            if (!is_array($_from) && !is_object($_from)) {
                settype($_from, 'array');
            }
            foreach ($_from as $_smarty_tpl->tpl_vars['type']->key => $_smarty_tpl->tpl_vars['type']->value) {
                $_smarty_tpl->tpl_vars['type']->_loop = true;
                $_smarty_tpl->tpl_vars['file']->value = $_smarty_tpl->tpl_vars['type']->key;
                ?>
        <?php 
                echo include_header(array('type' => $_smarty_tpl->tpl_vars['type']->value, 'file' => $_smarty_tpl->tpl_vars['file']->value), $_smarty_tpl);
                ?>

    <?php 
            }
            ?>
    <!-- Ending Headers -->
<?php 
        }
    }
Beispiel #11
0
function display_buttons($row, $is_series)
{
    global $user, $reminders_enabled, $reminder_interval;
    $last_reminded = empty($row['reminded']) ? $row['last_updated'] : $row['reminded'];
    $returl = this_page();
    $target_id = $is_series ? $row['repeat_id'] : $row['id'];
    // When we're going to view_entry.php we need to pass the id and series
    // in a query string rather than as hidden inputs.   That's because some
    // pages called by view_entry use HTTP_REFERER to form a return URL, and
    // view_entry needs to have a valid id.
    $query_string = "id={$target_id}";
    $query_string .= $is_series ? "&amp;series=1" : "";
    if (auth_book_admin($user, $row['room_id'])) {
        // approve
        echo "<form action=\"approve_entry_handler.php\" method=\"post\">\n";
        echo "<div>\n";
        echo "<input type=\"hidden\" name=\"action\" value=\"approve\">\n";
        echo "<input type=\"hidden\" name=\"id\" value=\"{$target_id}\">\n";
        echo "<input type=\"hidden\" name=\"series\" value=\"{$is_series}\">\n";
        echo "<input type=\"hidden\" name=\"returl\" value=\"" . htmlspecialchars($returl) . "\">\n";
        echo "<input type=\"submit\" value=\"" . get_vocab("approve") . "\">\n";
        echo "</div>\n";
        echo "</form>\n";
        // reject
        echo "<form action=\"view_entry.php?{$query_string}\" method=\"post\">\n";
        echo "<div>\n";
        echo "<input type=\"hidden\" name=\"action\" value=\"reject\">\n";
        echo "<input type=\"hidden\" name=\"returl\" value=\"" . htmlspecialchars($returl) . "\">\n";
        echo "<input type=\"submit\" value=\"" . get_vocab("reject") . "\">\n";
        echo "</div>\n";
        echo "</form>\n";
        // more info
        $info_time = $is_series ? $row['repeat_info_time'] : $row['entry_info_time'];
        $info_user = $is_series ? $row['repeat_info_user'] : $row['entry_info_user'];
        if (empty($info_time)) {
            $info_title = get_vocab("no_request_yet");
        } else {
            $info_title = get_vocab("last_request") . ' ' . time_date_string($info_time);
            if (!empty($info_user)) {
                $info_title .= " " . get_vocab("by") . " {$info_user}";
            }
        }
        echo "<form action=\"view_entry.php?{$query_string}\" method=\"post\">\n";
        echo "<div>\n";
        echo "<input type=\"hidden\" name=\"action\" value=\"more_info\">\n";
        echo "<input type=\"hidden\" name=\"returl\" value=\"" . htmlspecialchars($returl) . "\">\n";
        echo "<input type=\"submit\" title=\"" . htmlspecialchars($info_title) . "\" value=\"" . get_vocab("more_info") . "\">\n";
        echo "</div>\n";
        echo "</form>\n";
    } else {
        // get the area settings for this room
        get_area_settings(get_area($row['room_id']));
        // if enough time has passed since the last reminder
        // output a "Remind Admin" button, otherwise nothing
        if ($reminders_enabled && working_time_diff(time(), $last_reminded) >= $reminder_interval) {
            echo "<form action=\"approve_entry_handler.php\" method=\"post\">\n";
            echo "<div>\n";
            echo "<input type=\"hidden\" name=\"action\" value=\"remind_admin\">\n";
            echo "<input type=\"hidden\" name=\"id\" value=\"" . $row['id'] . "\">\n";
            echo "<input type=\"hidden\" name=\"returl\" value=\"" . htmlspecialchars($returl) . "\">\n";
            echo "<input type=\"submit\" value=\"" . get_vocab("remind_admin") . "\">\n";
            echo "</div>\n";
            echo "</form>\n";
        } else {
            echo "&nbsp";
        }
    }
}
Beispiel #12
0
                    fclose($handle);
                    echo "<p>\n";
                    echo "{$n_success} " . get_vocab("events_imported");
                    if ($n_failure > 0) {
                        echo "<br>\n{$n_failure} " . get_vocab("events_not_imported");
                    }
                    echo "</p>\n";
                }
            }
        }
    }
}
// PHASE 1 - Get the user input
// ----------------------------
$compression_wrappers = get_compression_wrappers();
echo "<form class=\"form_general\" method=\"POST\" enctype=\"multipart/form-data\" action=\"" . htmlspecialchars(this_page()) . "\">\n";
echo "<fieldset class=\"admin\">\n";
echo "<legend>" . get_vocab("import_icalendar") . "</legend>\n";
echo "<p>\n" . get_vocab("import_intro") . "</p>\n";
echo "<p>\n" . get_vocab("supported_file_types") . "</p>\n";
echo "<ul>\n";
echo "<li>" . $wrapper_descriptions['file'] . "</li>\n";
foreach ($compression_wrappers as $compression_wrapper) {
    echo "<li>" . $wrapper_descriptions[$compression_wrapper] . "</li>\n";
}
echo "</ul>\n";
echo "<div>\n";
echo "<label for=\"upload_file\">" . get_vocab("file_name") . ":</label>\n";
$accept_mime_types = array();
foreach ($compression_wrappers as $compression_wrapper) {
    $accept_mime_types[] = $wrapper_mime_types[$compression_wrapper];