[ PHPXref.com ] [ Generated: Sun Jul 20 20:10:34 2008 ] [ Room Scheduler 2.4.0 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> pri2.php (source)

   1  <?php
   2  // +----------------------------------------------------------------------+

   3  // | RSS Room Scheduler System - (English)                                |

   4  // | SAS Sistema de Agendamento de Salas - (Portuguese)                   |

   5  // | Copyright (C) 2005  Ighor Toth (igtoth@netsite.com.br)               |

   6  // |                                                                      |

   7  // | This program is free software; you can redistribute it and/or        |

   8  // | modify it under the terms of the GNU General Public License          |

   9  // | as published by the Free Software Foundation; either version 2       |

  10  // | of the License, or (at your option) any later version.               |

  11  // |                                                                      |

  12  // | This program is distributed in the hope that it will be useful,      |

  13  // | but WITHOUT ANY WARRANTY; without even the implied warranty of       |

  14  // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |

  15  // | GNU General Public License for more details.                         |

  16  // |                                                                      |

  17  // | You should have received a copy of the GNU General Public License    |

  18  // | along with this program; if not, write to the Free Software          |

  19  // | Foundation, Inc., 51 Franklin Street, Fifth Floor,                   |

  20  // | Boston, MA  02110-1301, USA.                                         |

  21  // +----------------------------------------------------------------------+

  22  // | RSS - Room Scheduler System (English Version)                        |

  23  // | SAS - Sistema de Agendamento de Sala (Portuguese Version)            |

  24  // +----------------------------------------------------------------------+

  25  // | Autor: Ighor Toth (igtoth@netsite.com.br) - http://www.ighor.com     |

  26  // | DEVELOPED IN BRAZIL !!!                                              |

  27  // +----------------------------------------------------------------------+

  28  // | UPDATES:-                                                            |

  29  // +----------------------------------------------------------------------+

  30  // | Pages:                                                               |

  31  // |         Room Scheduler     = http://www.your-site.com/index.php      |

  32  // |             Demo           = http://rss.ighor.com/index.php          |

  33  // |             User           = 999995                                  |

  34  // |             Password       = 123456                                  |

  35  // |         Administrator page = http://www.your-site.com/adm.php        |

  36  // |             Demo           = "Not available yet"                     |

  37  // |             User           = admin                                   |

  38  // |             Password       = abc123                                  |

  39  // +----------------------------------------------------------------------+

  40  // | Configuration file: conf.inc.php                                     |

  41  // | DB structure: rss.sql                                                |

  42  // | Bugs, translations or issues, write to: igtoth@netsite.com.br        |

  43  // +----------------------------------------------------------------------+

  44  
  45  $atu=$_GET['atu'];
  46  $exe=$_GET['exe'];
  47  
  48  if($atu==1){
  49  
  50      include ('conecta.php');
  51  
  52      mysql_select_db("sas");
  53  
  54      $matsup1=$_POST['matsup1'];
  55      $ilha1=$_POST['ilha1'];
  56      $pri1=$_POST['pri1'];
  57      $nome1=$_POST['nome1'];
  58      $senha2=$_POST['senha2'];
  59  
  60      $sql = "UPDATE sups SET matsup='$matsup1',nome_sup='$nome1',senha='$senha2',ilha='$ilha1',pri='$pri1' WHERE matsup=$matsup1";
  61  
  62      if(mysql_query($sql)){
  63      
  64              echo ("<SCRIPT LANGUAGE=\"JavaScript\"> function tela(){ alert(' $L_MENSAGEM_09 '); window.navigate('index.php'); } </SCRIPT> <BODY OnLoad=\"javascript:tela();\" > </body>");
  65          } else {
  66              echo ("<SCRIPT LANGUAGE=\"JavaScript\"> function tela(){ alert(' $L_MENSAGEM_10 '); window.navigate('index.php'); } </SCRIPT> <BODY OnLoad=\"javascript:tela();\" > </body>");
  67          }
  68  }
  69  
  70  if($exe){
  71  
  72      include ('conecta.php');
  73  
  74      $matsup=$_GET['matsup'];
  75  
  76      mysql_select_db("sas");
  77  
  78      $query = "SELECT * FROM sups WHERE matsup = '$matsup'"; 
  79      $result = mysql_query($query) or die(mysql_error());
  80      $linha = mysql_fetch_array($result);
  81      $nome = $linha["nome_sup"];
  82      $ilha = $linha["ilha"];
  83  
  84  
  85                  ?>
  86  
  87                      <SCRIPT LANGUAGE="JavaScript">
  88                      
  89  					function tela(){
  90                          
  91                          form = document.sen
  92                          senha1 = form.senha1.value
  93                          senha2 = form.senha2.value
  94  
  95                          if(senha1 == senha2){
  96                              form.action = 'pri.php?atu=1'
  97                              form.submit();                            
  98                          } else {
  99                              alert("<?php echo $L_MENSAGEM_11; ?>")
 100                              form.senha1.focus()
 101                              return;
 102                          }
 103      
 104                      }
 105                          
 106                      </SCRIPT>
 107  
 108                      
 109                          <form name="sen" method="post" action="pri.php?atu=1">
 110                              <input type="hidden" name="matsup1" border=0 value="<?php echo $matsup; ?>">
 111                              <input type="hidden" name="ilha1" border=0 value="<?php echo $ilha; ?>">
 112                              <input type="hidden" name="pri1" border=0 value="1">
 113                              <input type="hidden" name="nome1" border=0 value="<?php echo $nome; ?>">
 114  
 115                              <table align="center">
 116                                  <tr>
 117                                      <td>
 118                                          <font size="3" face="arial"><b><?php echo $L_MENSAGEM_12; ?><br><br>
 119                                          Usuário: <br> <?php echo $nome; ?>
 120                                      </td>
 121                                  </tr>
 122                              </table>
 123                              <hr>
 124                              <table align="center">
 125                                  <tr>
 126                                      <td>
 127                                          <font size="2" face="arial"><?php echo $L_MENSAGEM_13; ?>
 128                                      </td>
 129                                      <td>
 130                                          <font size="2" face="arial"><?php echo $L_MESANGEM_14; ?>
 131                                      </td>
 132                                  </tr>
 133                                  <tr>
 134                                      <td>
 135                                          <input border="0" class="bordas" type="password" name="senha1" border=0 value="">
 136                                      </td>
 137                                      <td>
 138                                          <input border="0" class="bordas" type="password" name="senha2" border=0 value="">
 139                                      </td>
 140                                  </tr>
 141                                  <tr>
 142                                      <td>
 143                                      </td>
 144                                      <td>
 145                                          <p align="right"><input border="0" class="bordas" type="button" name="enviar" value="<?php echo $L_CRIAR_SENHA; ?>" onClick="javascript:tela();"></p>
 146                                      </td>
 147                                  </tr>
 148                              </table>
 149                          </form>
 150  
 151  <?php
 152          
 153  
 154  }
 155  
 156  
 157  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]