public function action_commentupdate($coment_id) { $operationid = $_REQUEST[idstr]; $operations = multibyte::Json_decode(sqltable_model::getComment($coment_id)); $coment_id = $operations[$operationid][comment_id]; $out = sqltable_model::getComment($coment_id); $date = ajaxform::date2datepicker($operations[$operationid][date]); $out .= "<script>\$(\"*[datepicker='1']\").val('{$date}')</script>"; return $out; }
public function action_captha() { $form = new ajaxform($_REQUEST[formName]); $form->initConfirm(); $form->confirmGenerate(); $out = $form->confirmImage(); $form->sessionSet(); return $out; }
public function action_processingform() { // хидер переключим ajaxform_recieve::init(); $form = new ajaxform($this->getName()); $form->initBackend(); if (!$form->errors) { // сохранение $res = $this->model->setRecord(array_merge($form->request, array("files" => $form->files))); if (!is_array($res) && $res == 0 || is_array($res) && !$res[affected]) { $alert = empty($res[alert]) ? "Не обработано ни одной записи" : $res[alert]; $form->alert($alert); $form->processed(); } else { // удачное завернение с закрытием диалога $form->processed("\$('#dialog').dialog('close').remove();reload_table();"); } } else { // foreach ($form->errors as $err) { // if ($err[type]=='obligatory') { // //$form->html("Поле {$err[name]} обязательно"); // $form->errorHTML($err["name"]); // } else { // $form->alert(print_r($err, true)); // } // } // в случае ошибок обработка без закрытия $form->processed(''); } return ''; }