Esempio n. 1
0
                         echo "<a onclick=\"insertData('#" . $from . "', '" . $row[$from] . "');\">" . $row[$from] . "</a><br />";
                         if ($count >= 10) {
                             exit;
                         }
                     }
                 }
             }
         } else {
             //echo $query;
         }
     }
 }
 if ($_POST['act'] == 'get_form_plus' and $privata == 1) {
     if ($_POST['selected_kt_row'] == 0 and $_POST['selected_pz_row'] == 0) {
         $page .= file_get_contents("templates/jurnal_it_invent_plus.html");
         $page = str_replace("{OPTIONS_USERS_ID}", get_users_selection_options(0, 0, "name", "ASC", 0), $page);
         $page = str_replace("{OPTIONS_ROOMS_ID}", get_rooms_selection_options(0, 0, "nom", "ASC"), $page);
         $page = str_replace("{OPTIONS_STATUS_ID}", get_status_selection_options(0, 0, "name", "ASC"), $page);
     } else {
         if ($_POST['selected_kt_row'] != 0) {
             if (preg_match("/^[1-9][0-9]*\$/", $_POST['selected_kt_row'])) {
                 $page .= file_get_contents("templates/jurnal_it_invent_kt_plus.html");
                 $status_2 = get_status_selection_options(0, 0, "name", "ASC");
                 $page = str_replace("{OPTIONS_STATUS_1_ID}", $status_2, $page);
                 $page = str_replace("{OPTIONS_STATUS_2_ID}", $status_2, $page);
             }
         }
         if ($_POST['selected_pz_row'] != 0) {
             if (preg_match("/^[1-9][0-9]*\$/", $_POST['selected_pz_row'])) {
                 $page .= file_get_contents("templates/jurnal_it_invent_pz_plus.html");
                 $status_2 = get_status_selection_options(0, 0, "name", "ASC");
Esempio n. 2
0
             } else {
                 $page .= file_get_contents("templates/information_danger.html");
                 $page = str_replace("{INFORMATION}", "{LANG_JURNAL_IN_EDIT_NOT_AUTHOR}", $page);
             }
         }
     } else {
         $page .= file_get_contents("templates/information_danger.html");
         $page = str_replace("{INFORMATION}", "{LANG_JURNAL_OUT_ID_NOT_FOUND}", $page);
     }
 }
 if (isset($_GET['do']) && $_GET['do'] == 'src') {
     $adres = 'true';
     $page .= file_get_contents("templates/jurnal_in_search.html");
     $page = str_replace("{FORM_DATA_START}", "01.01." . $_SESSION['user_year'], $page);
     $page = str_replace("{FORM_DATA_END}", "31.12." . $_SESSION['user_year'], $page);
     $html_select_users = get_users_selection_options(0, 0, "name", "ASC", 0);
     $queryes_num++;
     $page = str_replace("{USERS}", $html_select_users, $page);
 }
 if (isset($_GET['attach']) && preg_match('/^[1-9][0-9]*$/', $_GET['attach'])) {
     $adres = 'true';
     $query = "SELECT * FROM `db_" . $_SESSION['user_year'] . "_in` WHERE `id`='" . $_GET['attach'] . "' LIMIT 1 ; ";
     $res = mysql_query($query) or die(mysql_error());
     $queryes_num++;
     if (mysql_num_rows($res) == 1) {
         $manage_files = 0;
         $view_files = 0;
         $row = mysql_fetch_assoc($res);
         $page .= file_get_contents("templates/information.html");
         $page = str_replace("{INFORMATION}", "{LANG_FILE_ABOUT_NUM} <strong>" . $row['id'] . "</strong>", $page);
         if ($row['add_user'] == $_SESSION['user_id'] or $user_p_mod == 1) {