コード例 #1
0
         }
     }
     break;
 case Direction::$type:
     $assoc = $_POST;
     $assoc['author_id'] = $_POST['id'];
     unset($assoc['id']);
     $direction = Direction::FetchFromAssoc($assoc);
     if ($direction === NULL) {
         $content = AlertMessage('alert-danger', Language::Word('error during direction adding'));
     } else {
         $glob_id = 0;
         if (isset($_POST['glob_id'])) {
             $glob_id = $_POST['glob_id'];
         }
         if (Direction::InsertToDB($direction, $_POST['language'], $glob_id)) {
             $content = AlertMessage('alert-success', Language::Word('direction is successfully added'));
         } else {
             $content = AlertMessage('alert-danger', Language::Word('error during direction inserting'));
         }
     }
     break;
 case Project::$type:
     $assoc = $_POST;
     $assoc['author_id'] = $_POST['id'];
     unset($assoc['id']);
     $project = Project::FetchFromAssoc($assoc);
     if ($project === NULL) {
         $content = AlertMessage('alert-danger', Language::Word('error during project adding'));
     } else {
         $glob_id = 0;