~bruno-fullcontent/+junk/TVDPLUS

« back to all changes in this revision

Viewing changes to calendar/admin/index.php

  • Committer: Bruno Carvalho
  • Date: 2013-12-06 08:15:57 UTC
  • Revision ID: bruno@fullcontent.com.br-20131206081557-royrvr4voupvx0d4
Versao Inicial

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?
 
2
include ("../cal_config.inc.php");
 
3
 
 
4
if ($calauth == "1"){
 
5
  if (isset($_COOKIE["extcallogin"])){
 
6
    $clogin = $_COOKIE["extcallogin"];
 
7
    $clogin = explode("|",$clogin);
 
8
    $callogin = $clogin[0] ;
 
9
    $calpass = $clogin[1] ;
 
10
    $query = "select login,paswoord from calendar_admins where login='".$callogin."' AND paswoord='".$calpass."'";
 
11
    $result = mysql_query($query);
 
12
    $row = mysql_fetch_object($result);
 
13
    if (!$row)
 
14
        header ("location: cal_login.php");
 
15
    else
 
16
        header ("location: calendar.php");
 
17
  }
 
18
  else
 
19
    header ("location: cal_login.php");
 
20
}
 
21
else
 
22
  header ("location: cal_login.php?op=loginok&cookie=login|ok");
 
23
?>