} foreach ($jobs as $id) { $count = $dbase->SelectOne('auto_images', array("count" => "COUNT(*)"), array('auto_id' => $id)); $dbase->Update('auto_autos', array('photo_count' => $count['count']), array('id' => $id)); } $tpl->msg($job->lang['rebuildcounter'], $job->lang['rebuildcounter_ok'], true); break;*/ default: $stats = $job->Stats(); $tpl->header($job->lang['stats'], true); $tpl->OpenTable(); $tpl->OpenSubtable($job->lang['stats']); $tpl->stats(array($job->lang['vacancy_all'] => $stats['vacancy_all'], $job->lang['vacancy_today'] => $stats['vacancy_today'], $job->lang['vacancy_on_site'] => $stats['vacancy_on_site'], $job->lang['vacancy_no_noder'] => $stats['vacancy_no_noder'], $job->lang['vacancy_no_noder'] => $stats['vacancy_no_noder'], $job->lang['vacancy_max'] => $stats['vacancy_max'], $job->lang['resume_all'] => $stats['resume_all'], $job->lang['resume_today'] => $stats['resume_today'], $job->lang['resume_on_site'] => $stats['resume_on_site'], $job->lang['resume_no_moder'] => $stats['resume_no_moder'], $job->lang['resume_max'] => $stats['resume_max'], $job->lang['company_all'] => $stats['company_all'], $job->lang['company_today'] => $stats['company_today'], $tpl->line => $tpl->line, "Версия используемого модуля" => VERSION, "Модуль зарегистрирован на" => "<b><a href=\"http://www." . LIC_DOMAIN . "\" >" . LIC_DOMAIN . "<a/></b>", "Страничка поддержки модуля" => "<a href=\"http://www.kaliostro.net/\" ><b><font color=\"green\" >www.kaliostro.net</font><b></a>")); $tpl->OTable(); $tpl->OpenForm('', $hidden_array + array('action' => 'clearcache')); $tpl->echo = FALSE; echo $tpl->row(array($tpl->InputSubmit($job->lang['clearcache']) . $tpl->CloseForm(), $tpl->OpenForm('', $hidden_array + array('action' => 'cron')) . $tpl->InputSubmit($job->lang['action_cron_btn']) . $tpl->CloseForm()), false); $tpl->echo = TRUE; $tpl->CTable(); $tpl->CloseSubtable(); $tpl->CloseTable(); } } catch (Exception $e) { $tpl->msg($job->lang['error'], $e->getMessage(), $MAIN_URL); } $tpl->footer(true, 2007); } catch (Exception $e) { echoheader(); msg('error', 'Error', $e->getMessage()); echofooter();
break; default: $all_auto = $base->SelectOne('auto_autos', array('count' => 'COUNT(*)')); $auto_on_site = $base->SelectOne('auto_autos', array('count' => 'COUNT(*)'), array('allow_site' => 1)); $base->SetWhere('add_date', $timer->cur_time - 24 * 60 * 60, ">"); $today = $base->SelectOne('auto_autos', array('count' => 'COUNT(*)')); $auto_reg = $base->SelectOne('auto_autos', array('max' => 'MAX(id)')); $base->SetBeginBlockWhere(); $base->SetWhere("exp_date", $timer->cur_time, '>'); $base->SetWhere("exp_date", '', "=", 'auto_autos', 'OR'); $base->SetEndBlockWhere(); $auto_no_moder = $base->SelectOne("auto_autos", array("count" => "COUNT(*)"), array('allow_site' => 0)); $tpl->header($auto->lang['stats'], true); $tpl->OpenTable(); $tpl->OpenSubtable($auto->lang['stats']); $tpl->stats(array($auto->lang['all_auto'] => $all_auto['count'], $auto->lang['auto_on_site'] => $auto_on_site['count'], $auto->lang['auto_today'] => $today['count'], $auto->lang['all_auto_reg'] => $auto_reg['max'] ? $auto_reg['max'] : 0, $auto->lang['no_moder_auto'] => $auto_no_moder['count'], $tpl->line => $tpl->line, "Версия используемого модуля" => $auto->config['version_id'], "Модуль зарегистрирован на" => "<b><a href=\"http://www." . LIC_DOMAIN . "\" >" . LIC_DOMAIN . "<a/></b>", "Страничка поддержки модуля" => "<a href=\"http://www.kaliostro.net/\" ><b><font color=\"green\" >www.kaliostro.net</font><b></a>")); $tpl->OTable(); $tpl->OpenForm('', $hidden_array + array('action' => 'clearcache')); $tpl->echo = FALSE; echo $tpl->row(array($tpl->InputSubmit($auto->lang['clear_cache']) . $tpl->CloseForm(), $tpl->OpenForm('', $hidden_array + array('action' => 'rebuildcounter')) . $tpl->InputSubmit($auto->lang['rebuildcounter']) . $tpl->CloseForm(), $tpl->OpenForm('', $hidden_array + array('action' => 'rebuildphotocount')) . $tpl->InputSubmit($auto->lang['rebuildphotocount']) . $tpl->CloseForm()), false); $tpl->echo = TRUE; $tpl->CTable(); $tpl->CloseSubtable(); $tpl->CloseTable(); } $tpl->footer(true, 2007); } catch (Exception $e) { echoheader(); echo $e->getMessage(); echofooter(); }