Ejemplo n.º 1
0
 public function getinfoAction()
 {
     $db = front::og('db');
     $one_news = $db->select('SELECT id, title, msg FROM corporative_blog WHERE id = ?n LIMIT 1;', front::$_req['id'])->fetchRow();
     $one_news = front::toUtf($one_news);
     echo json_encode(array('form' => $one_news));
 }
Ejemplo n.º 2
0
 function getinfoAction()
 {
     $db = front::og("db");
     $one_news = $db->select("SELECT id, post_date, header, n_text FROM news WHERE id = ?n LIMIT 1;", front::$_req["id"])->fetchRow();
     $one_news = front::toUtf($one_news);
     echo json_encode(array("form" => $one_news));
 }
Ejemplo n.º 3
0
 function getinfoAction()
 {
     $db = front::og("db");
     $one_news = $db->select("SELECT id, name, login, occupation, email, icq, skype, login, groupid, additional FROM team_people WHERE id = ?n LIMIT 1;", front::$_req["id"])->fetchRow();
     $one_news = front::toUtf($one_news);
     echo json_encode(array("form" => $one_news));
 }
Ejemplo n.º 4
0
 function getlistAction()
 {
     $data[] = array("title" => "Контроллеры", "_is_leaf" => false, "testable" => false, "_parent" => null, "_id" => "1");
     $data = $this->readMap(front::$map, $data);
     $data[] = array("title" => "Модели", "_is_leaf" => false, "_parent" => null, "_id" => "2");
     $dir = opendir(ROOT_DIR . "engine/models/");
     while ($file = readdir($dir)) {
         if ($file != "." && $file != ".." && $file != ".svn") {
             $testable = true;
             $class_name = array_shift(explode(".", $file));
             $test_path = "tests/models/" . $class_name . ".model.test.php";
             if (!file_exists(ROOT_DIR . "engine/" . $test_path)) {
                 $test_path = "<b>Нет " . $test_path . "</b>";
                 $testable = false;
             }
             $data[] = array("title" => $file, "path" => $test_path . "<i> для " . $file . "</i>", "testable" => $testable, "result" => $testable ? 0 : 4, "run_path" => "tests/models/" . $class_name . ".model.test.php", "_is_leaf" => true, "_parent" => "2", "_id" => "3:" . $class_name);
         }
     }
     closedir($dir);
     $data[] = array("title" => "Другие", "_is_leaf" => false, "_parent" => null, "_id" => "3");
     $dir = opendir(ROOT_DIR . "engine/tests/");
     while ($file = readdir($dir)) {
         if ($file != "." && $file != ".." && is_file(ROOT_DIR . "engine/tests/" . $file)) {
             $testable = true;
             $data[] = array("title" => $file, "path" => $file, "testable" => $testable, "result" => $testable ? 0 : 4, "run_path" => "tests/" . $file, "_is_leaf" => true, "_parent" => "3", "_id" => "4:" . $file);
         }
     }
     closedir($dir);
     $data = front::toUtf($data);
     echo json_encode(array("data" => $data));
 }
Ejemplo n.º 5
0
 function getinfoAction()
 {
     $db = front::og("db");
     $one_news = $db->select("SELECT id, title, msg FROM corporative_blog WHERE id = ?n LIMIT 1;", front::$_req["id"])->fetchRow();
     $one_news = front::toUtf($one_news);
     echo json_encode(array("form" => $one_news));
 }
Ejemplo n.º 6
0
 public function getinfoAction()
 {
     $db = front::og('db');
     $one_news = $db->select('SELECT id, post_date, header, n_text FROM news WHERE id = ?n LIMIT 1;', front::$_req['id'])->fetchRow();
     $one_news = front::toUtf($one_news);
     echo json_encode(array('form' => $one_news));
 }
Ejemplo n.º 7
0
 public function getlistAction()
 {
     $data[] = array('title' => 'Контроллеры', '_is_leaf' => false, 'testable' => false, '_parent' => null, '_id' => '1');
     $data = $this->readMap(front::$map, $data);
     $data[] = array('title' => 'Модели', '_is_leaf' => false, '_parent' => null, '_id' => '2');
     $dir = opendir(ROOT_DIR . 'engine/models/');
     while ($file = readdir($dir)) {
         if ($file != '.' && $file != '..' && $file != '.svn') {
             $testable = true;
             $class_name = array_shift(explode('.', $file));
             $test_path = 'tests/models/' . $class_name . '.model.test.php';
             if (!file_exists(ROOT_DIR . 'engine/' . $test_path)) {
                 $test_path = '<b>Нет ' . $test_path . '</b>';
                 $testable = false;
             }
             $data[] = array('title' => $file, 'path' => $test_path . '<i> для ' . $file . '</i>', 'testable' => $testable, 'result' => $testable ? 0 : 4, 'run_path' => 'tests/models/' . $class_name . '.model.test.php', '_is_leaf' => true, '_parent' => '2', '_id' => '3:' . $class_name);
         }
     }
     closedir($dir);
     $data[] = array('title' => 'Другие', '_is_leaf' => false, '_parent' => null, '_id' => '3');
     $dir = opendir(ROOT_DIR . 'engine/tests/');
     while ($file = readdir($dir)) {
         if ($file != '.' && $file != '..' && is_file(ROOT_DIR . 'engine/tests/' . $file)) {
             $testable = true;
             $data[] = array('title' => $file, 'path' => $file, 'testable' => $testable, 'result' => $testable ? 0 : 4, 'run_path' => 'tests/' . $file, '_is_leaf' => true, '_parent' => '3', '_id' => '4:' . $file);
         }
     }
     closedir($dir);
     $data = front::toUtf($data);
     echo json_encode(array('data' => $data));
 }
Ejemplo n.º 8
0
 public function getinfoAction()
 {
     $db = front::og('db');
     $one_news = $db->select('SELECT id, name, login, occupation, email, icq, skype, login, groupid, additional FROM team_people WHERE id = ?n LIMIT 1;', front::$_req['id'])->fetchRow();
     $one_news = front::toUtf($one_news);
     echo json_encode(array('form' => $one_news));
 }
 function getinfoAction()
 {
     $db = front::og("db");
     $one_page = $db->select("SELECT * FROM static_pages WHERE alias = ? LIMIT 1;", front::$_req["id"])->fetchRow();
     $one_page = front::toUtf($one_page);
     $one_page["n_text"] = $this->nl2br2($one_page["n_text"]);
     echo json_encode(array("form" => $one_page));
 }
Ejemplo n.º 10
0
 function getCategsAction()
 {
     $db = front::og("db");
     //   ,
     $all = $db->select("SELECT id, name FROM faq_category f WHERE (f.name ILIKE ?);", "%" . trim(front::toWin(front::$_req["query"])) . "%")->fetchAll();
     $all = front::toUtf($all);
     echo json_encode(array("data" => $all));
 }
Ejemplo n.º 11
0
 public function getCategsAction()
 {
     $db = front::og('db');
     //   ,
     $all = $db->select('SELECT id, name FROM faq_category f WHERE (f.name ILIKE ?);', '%' . trim(front::toWin(front::$_req['query'])) . '%')->fetchAll();
     $all = front::toUtf($all);
     echo json_encode(array('data' => $all));
 }
 function getinfoAction()
 {
     $db = front::og("db");
     $one_news = $db->select("SELECT * FROM sopinions WHERE id = ?n LIMIT 1;", front::$_req["id"])->fetchRow();
     $one_news = front::toUtf($one_news);
     //  foreach($one_news as &$one) { $one = br2nl($one);}
     echo json_encode(array("form" => $one_news));
 }
 public function getinfoAction()
 {
     $db = front::og('db');
     $one_news = $db->select('SELECT * FROM sopinions WHERE id = ?n LIMIT 1;', front::$_req['id'])->fetchRow();
     $one_news = front::toUtf($one_news);
     //  foreach($one_news as &$one) { $one = br2nl($one);}
     echo json_encode(array('form' => $one_news));
 }
Ejemplo n.º 14
0
 public function getinfoAction()
 {
     $db = front::og('db');
     $one_news = $db->select('SELECT tp.*, tg.title as group_name FROM team_people tp JOIN team_groups tg on tg.id = tp.groupid WHERE tp.id = ?n LIMIT 1;', front::$_req['id'])->fetchRow();
     $one_news = front::toUtf($one_news);
     $one_news['additional'] = br2nl($one_news['additional']);
     echo json_encode(array('form' => $one_news));
 }
Ejemplo n.º 15
0
 function getinfoAction()
 {
     $db = front::og("db");
     $one_news = $db->select("SELECT tp.*, tg.title as group_name FROM team_people tp JOIN team_groups tg on tg.id = tp.groupid WHERE tp.id = ?n LIMIT 1;", front::$_req["id"])->fetchRow();
     $one_news = front::toUtf($one_news);
     $one_news["additional"] = br2nl($one_news["additional"]);
     echo json_encode(array("form" => $one_news));
 }
 public function getinfoAction()
 {
     $db = front::og('db');
     $one_page = $db->select('SELECT * FROM static_pages WHERE alias = ? LIMIT 1;', front::$_req['id'])->fetchRow();
     $one_page = front::toUtf($one_page);
     $one_page['n_text'] = $this->nl2br2($one_page['n_text']);
     echo json_encode(array('form' => $one_page));
 }
Ejemplo n.º 17
0
 function getinfoAction()
 {
     $db = front::og("db");
     $one_news = $db->select("SELECT id, title, msg, yt_link, id_user FROM corporative_blog WHERE id = ?n LIMIT 1;", front::$_req["id"])->fetchRow();
     $user = front::og("db")->select("SELECT login FROM users WHERE uid = ?n", $one_news['id_user'])->fetchRow();
     $attach = front::og("db")->select("SELECT * FROM corporative_blog_attach WHERE msg_id = ?n", front::$_req["id"])->fetchAll();
     if ($attach) {
         foreach ($attach as $key => $val) {
             $res_attach[] = array("db_id" => $val["id"], "id" => $val["name"], "path" => WDCPREFIX . "/users/" . $user["login"] . "/upload" . "/" . $val["name"]);
         }
         $one_news["files"] = json_encode($res_attach);
     }
     $one_news = front::toUtf($one_news);
     echo json_encode(array("form" => $one_news));
 }
Ejemplo n.º 18
0
 public function getinfoAction()
 {
     $db = front::og('db');
     $one_news = $db->select('SELECT id, title, msg, yt_link, id_user FROM corporative_blog WHERE id = ?n LIMIT 1;', front::$_req['id'])->fetchRow();
     $user = front::og('db')->select('SELECT login FROM users WHERE uid = ?n', $one_news['id_user'])->fetchRow();
     $attach = front::og('db')->select('SELECT * FROM corporative_blog_attach WHERE msg_id = ?n', front::$_req['id'])->fetchAll();
     if ($attach) {
         foreach ($attach as $key => $val) {
             $res_attach[] = array('db_id' => $val['id'], 'id' => $val['name'], 'path' => WDCPREFIX . '/users/' . $user['login'] . '/upload' . '/' . $val['name']);
         }
         $one_news['files'] = json_encode($res_attach);
     }
     $one_news = front::toUtf($one_news);
     echo json_encode(array('form' => $one_news));
 }