コード例 #1
0
ファイル: main.php プロジェクト: blogoosfero/avaliacoes
 } else {
     $db->runINS("usuarios (\"Nome\", \"Mail\", \"ID\") VALUES('" . $_GET['name'] . "', '" . $_GET['email'] . "', '" . $_GET['identifier'] . "' )");
     $chusr = $db->Select("\"Chave\" FROM usuarios WHERE \"ID\" = '" . $_GET['identifier'] . "'");
 }
 $fc = new funcs();
 //$fc->setCurso($_GET['email'],$cur);
 $fc->setCurso($chusr, $cur);
 //$login = $_GET['email'];
 $login = $_GET['identifier'];
 //$res = $db->runSEL("* FROM usuarios WHERE Mail = '$login'");
 $res = $db->Select("* FROM usuarios WHERE \"ID\" = '{$login}'");
 $adm = $db->Select("\"Responsavel\" FROM cursos WHERE \"Chave\" = {$cur}");
 if (empty($res)) {
     include_once 'funcs.php';
     $fc = new funcs();
     $r = $fc->add_new_user($_GET['email'], $_GET['name'], $_GET['identifier'], $_GET['curso']);
     //$fc->setUser($_GET['email']);
     //echo 'setUser';
     //$fc->setUser($_GET['identifier']);
     //$fc->setNomeUser($_GET['email']);
     $fc->setNomeUser($_GET['identifier']);
     //$log = $fc->getLog($_GET['email']);
     // echo 'getLog';
     $log = $fc->getLog($_GET['identifier']);
     //$_SESSION['nomeuser'] = $_GET['name'];
     //$_SESSION['user'] = $r['idUser'];
     include_once 'testes.php';
     $testes = new Testes();
     $testes->Capa($log['user'], $log['nomeuser'], $log['CodCurso']);
 } else {
     //echo "SELECT Chave, Responsavel FROM cursos WHERE Nome = '".$_GET['curso']."'<br>";