Ejemplo n.º 1
0
echo $trash_enabled ? TOOLS_TRASH : NETCAT_TRASH_TRASHBIN_DISABLED;
?>
	</div>
	<?php 
if ($trash_enabled) {
    ?>
		<?php 
    if ($in_trash) {
        ?>
			<dl class="nc-bg-dark nc-position-b nc-text-center nc-info nc--mini">
				<dt><?php 
        echo $in_trash;
        ?>
</dt>
				<dd><?php 
        echo nc_numeral_inclination($in_trash, array(NETCAT_TRASH_MESSAGES_SK1, NETCAT_TRASH_MESSAGES_SK2, NETCAT_TRASH_MESSAGES_SK3));
        ?>
</dd>
			</dl>
		<?php 
    } else {
        ?>
			<div class="nc-bg-dark nc-position-b nc-text-center">
				<?php 
        echo NETCAT_TRASH_NOMESSAGES;
        ?>
			</div>
		<?php 
    }
    ?>
	<?php 
Ejemplo n.º 2
0
 /**
  *
  */
 public function get_schedule_string()
 {
     $intervals = array('hour' => NETCAT_MODULE_SEARCH_ADMIN_RULE_INTERVAL_EVERY_N_HOURS, 'minute' => NETCAT_MODULE_SEARCH_ADMIN_RULE_INTERVAL_EVERY_N_MINUTES, 'day' => NETCAT_MODULE_SEARCH_ADMIN_RULE_INTERVAL_EVERY_N_DAYS, 'day_of_month' => NETCAT_MODULE_SEARCH_ADMIN_RULE_INTERVAL_EVERY_X_DAY);
     $interval = $this->get('interval');
     $type = $this->get('interval_type');
     $time = sprintf("%02d:%02d", $this->get('hour'), $this->get('minute'));
     if ($type == 'on_request') {
         $schedule = NETCAT_MODULE_SEARCH_ADMIN_RULE_INTERVAL_ON_REQUEST;
     } elseif ($type == 'day' && $interval == 1) {
         $schedule = sprintf(NETCAT_MODULE_SEARCH_ADMIN_RULE_INTERVAL_DAILY, $time);
     } elseif (isset($intervals[$type])) {
         $not_dom = $type != 'day_of_month';
         $schedule = sprintf($intervals[$type], $interval == 1 && $not_dom ? '' : $interval, $time);
         // kinda hack, because it  works only for Russian
         if ($not_dom && nc_Core::get_object()->lang->detect_lang(true) == 'ru') {
             // заменить на корректную форму слово "каждые" и название интервала
             $forms = explode(" ", constant("NETCAT_MODULE_SEARCH_ADMIN_RULE_INTERVAL_" . strtoupper($type)));
             $form = nc_numeral_inclination($interval, $forms);
             $schedule = str_replace($forms[1], $form, $schedule);
             if ($form == $forms[0]) {
                 // каждые -> каждую/каждый
                 $schedule = str_replace(NETCAT_MODULE_SEARCH_ADMIN_RULE_EVERY_SEVERAL, $type == 'minute' ? NETCAT_MODULE_SEARCH_ADMIN_RULE_EVERY_SINGLE_FEMININE : NETCAT_MODULE_SEARCH_ADMIN_RULE_EVERY_SINGLE_MASCULINE, $schedule);
             }
         }
         // фуффф, напридумывали блин родов-падежов
     } else {
         $schedule = "???";
     }
     return $schedule;
 }
Ejemplo n.º 3
0
        }
        if ($sub_name) {
            nc_trash_recovery_sub($trash_ids);
            print "<script>top.frames['treeIframe'].window.location.reload(); </script>";
        }
        if ($c = $nc_core->trash->recovery($trash_ids)) {
            nc_print_status(nc_numeral_inclination($c, array(NETCAT_TRASH_RECOVERED_SK1, NETCAT_TRASH_RECOVERED_SK2, NETCAT_TRASH_RECOVERED_SK3)) . " " . $c . " " . nc_numeral_inclination($c, array(NETCAT_TRASH_MESSAGES_SK1, NETCAT_TRASH_MESSAGES_SK2, NETCAT_TRASH_MESSAGES_SK3)), 'ok');
        }
        nc_trash_list();
        break;
    case 3:
        // Удаление из корзины объектов
        BeginHtml(TOOLS_TRASH, $Title2, "http://" . $DOC_DOMAIN . "/tools/trash/");
        require_once $INCLUDE_FOLDER . "s_files.inc.php";
        if ($removed = $nc_core->trash->delete($trash_ids)) {
            nc_print_status($removed . ' ' . nc_numeral_inclination($removed, array(NETCAT_ADMIN_TRASH_OBJECT_HAS_BEEN_REMOVED, NETCAT_ADMIN_TRASH_OBJECTS_REMOVED, NETCAT_ADMIN_TRASH_OBJECT_IS_REMOVED)), 'info');
        }
        nc_trash_list();
        break;
    case 4:
        // очистка корзины
        # Очистка корзины
        $UI_CONFIG = new ui_config_trash(TRASH_TAB_LIST, 'list', TRASH_TAB_TITLE, TRASH_TAB_SETTINGS);
        BeginHtml(TOOLS_TRASH, $Title2, "http://" . $DOC_DOMAIN . "/tools/trash/");
        require_once $INCLUDE_FOLDER . "s_files.inc.php";
        $nc_core->trash->clean();
        nc_print_status(NETCAT_ADMIN_TRASH_TRASH_HAS_BEEN_SUCCESSFULLY_CLEARNED, 'ok');
        nc_trash_list();
        break;
}
EndHtml();