Exemplo n.º 1
0
 function dt_services_columns_display($columns, $id)
 {
     global $post;
     switch ($columns) {
         case 'details':
             $info = get_post_meta($post->ID, "_info", true);
             $info = is_array($info) ? $info : array();
             $price = array_key_exists('price', $info) ? $info['price'] : "";
             $price = !empty($price) ? dt_currency_symbol(dttheme_option('company', 'currency')) . ' ' . $price : "";
             $price = !empty($price) ? '<p>' . __("Price", "dt_themes") . ' - ' . $price . '</p>' : "";
             echo $price;
             $duration = array_key_exists('duration', $info) ? $info['duration'] : "";
             $duration = !empty($duration) ? '<p>' . __("Duration", 'dt_themes') . ' - ' . durationToString($duration) . '</p>' : "";
             echo $duration;
             break;
     }
 }
Exemplo n.º 2
0
">
		<?php 
echo dt_currency_symbol(dttheme_option('company', 'currency'));
?>
	</div>
</div>

<div class="custom-box">
	<div class="column one-sixth"><?php 
_e('Duration', 'dt_themes');
?>
</div>
	<div class="column five-sixth last">
		<select name="_info[duration]">
			<option value=""><?php 
_e('Select', 'dt_themes');
?>
</option><?php 
$current = array_key_exists('duration', $info) ? $info['duration'] : "";
for ($i = 0; $i < 12; $i++) {
    for ($j = 15; $j <= 60; $j += 15) {
        $duration = $i * 3600 + $j * 60;
        $duration_output = durationToString($duration);
        $selected = $current == $duration ? ' selected="selected"' : '';
        echo "<option value='{$duration}' {$selected}>{$duration_output}</option>";
    }
}
?>
		</select>
	</div>
</div>
Exemplo n.º 3
0
 function dt_load_services()
 {
     $out = "<option value=''>" . __('Select Service', 'dt_themes') . "</option>";
     $current = "";
     if (!empty($_REQUEST['option'])) {
         if (!get_option($_REQUEST['option'] . '_agenda')) {
             $option = get_option($_REQUEST['option']);
         } else {
             $option = get_option($_REQUEST['option'] . '_agenda');
         }
         $current = $option['service'];
     }
     if (!empty($_REQUEST['memberid'])) {
         $services = get_post_meta($_REQUEST['memberid'], "_services", true);
         $services = is_array($services) ? $services : array();
         if (!empty($services)) {
             $services = implode(",", $services);
             $cp_services = get_posts(array('post_type' => 'dt_services', 'posts_per_page' => '-1', 'order' => 'ASC', 'orderby' => 'title', 'include' => $services));
             foreach ($cp_services as $cp_service) {
                 $id = $cp_service->ID;
                 $title = $cp_service->post_title;
                 $info = get_post_meta($id, "_info", true);
                 $info = is_array($info) ? $info : array();
                 $duration = array_key_exists('duration', $info) ? durationToString($info['duration']) : "";
                 $selected = $current == $id ? " selected='selected' " : "";
                 $out .= "<option value='{$id}' {$selected}>{$title} ( {$duration} ) </option>";
             }
         }
     }
     echo $out;
     die('');
 }
<?php

define( 'MEDIAWIKI', true );

require_once( "../../../../LocalSettings.php" );
require_once( "../../php-tools/ProgressBar.php" );
require_once( "DatabaseUtilities.php" );
require_once( "Setup.php" );

ob_end_flush();

global
	$beginTime, $wgCommandLineMode;

$beginTime = time();
$wgCommandLineMode = true;

for ( $i = 1; $i < $argc; $i++ ) {
	$tableName = $argv[$i];
	echo "\nDropping indices from table: " . $tableName . "\n";
	dropAllIndicesFromTable( $tableName );
}

$endTime = time();
echo( "\n\nTime elapsed: " . durationToString( $endTime - $beginTime ) );


Exemplo n.º 5
0
$statistic['config']['visitors_month_enabled'] = (int) $config->get('stat', 'show-visitors-this-month');
$statistic['config']['visitors_year_enabled'] = (int) $config->get('stat', 'show-visitors-this-year');
$statistic['config']['browseragent'] = (int) $config->get('stat', 'show-browseragent');
$statistic['config']['os'] = (int) $config->get('stat', 'show-os');
$statistic['config']['referer'] = (int) $config->get('stat', 'show-referer');
$statistic['running_since'] = $stat->runningSince();
$statistic['user_online'] = $stat->userOnline();
$statistic['visitors_today'] = $stat->visitorsToday();
$statistic['visitors_yesterday'] = $stat->visitorsYesterday();
$statistic['visitors_this_month'] = $stat->visitorsThisMonth();
$statistic['visitors_overall'] = $stat->visitorsOverall();
$visitorList = $stat->listOnline();
if (count($visitorList) > 0) {
    foreach ($visitorList as $i => $v) {
        $visitorList[$i]['url'] = makeURL('profile', array('userid' => $v['userid']));
        @($visitorList[$i]['duration_str'] = durationToString($v['duration']));
    }
}
$statistic['visitor_list'] = $visitorList;
$lastSeenList = $stat->lastSeen();
if (count($lastSeenList) > 0) {
    foreach ($lastSeenList as $i => $v) {
        $lastSeenList[$i]['url'] = makeURL('profile', array('userid' => $v['userid']));
        $lastSeenList[$i]['timeelapsed'] = timeElapsed($v['lastaction']);
    }
}
$statistic['lastseen'] = $lastSeenList;
$statistic['visitors_per_day'] = $stat->visitorsPerDay();
$month = date("n");
$year = date("Y");
if (isset($_POST['btnChangeYearAndMonth'])) {