示例#1
0
 public static function markReferralAsExchanged($userId)
 {
     if ($userId == null) {
         return false;
     }
     $creditIds = self::checkAvailableReferral($userId);
     if ($creditIds == false) {
         return false;
     }
     $result = updateTable(self::REFERRALS_TABLE, 'exchange_date = \'' . date('Y-m-d H:i:s') . '\', exchanged = true', 'id IN(' . implode(',', $creditIds) . ')');
     return $result;
 }
示例#2
0
<?php

include "connect/database.php";
validaSession();
securityValidation($_COOKIE['id'], "20");
if ($_POST) {
    $we = "value = '" . $_POST['price'] . "'";
    updateTable("varios", $we, "id = 1");
}
$varios = listAll("varios", "WHERE id = 1");
$rs_var = mysql_fetch_object($varios);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Envio | Vaodesign</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="css/ie9.css"/>
<![endif]-->

<!--[if IE 8]>
    <link rel="stylesheet" media="screen" href="css/ie8.css"/>
<![endif]-->

<!--[if IE 7]>
    <link rel="stylesheet" media="screen" href="css/ie7.css"/>
<![endif]-->
<script type="text/javascript" src="js/plugins/jquery-1.7.min.js"></script>
示例#3
0
<?php

include "functions.php";
if (isset($_POST['submit3']) && isset($_POST['answer3'])) {
    $answer3 = $_POST['answer3'];
    updateTable('3', 'answer3');
    if ($answer3 === "Yes") {
        header('Location: doubleConsult.php');
    } elseif ($answer3 === "No") {
        header('Location: question4.php');
    } else {
        echo "error";
    }
}
?>

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    <link rel="stylesheet" href="style.css">
</head>
<body>

<form action="question3.php" name="Questionnaire" method="post" class="col-md-6 col-md-offset-4">
    <h1>PACT</h1>
    <p id="q1">Is it the first appointment of the patient?</p>
    <input class="answers" value="No" name="answer1">
    <p id="q2">How many complaints does the patient have?</p>
示例#4
0
             // a realizar nuestro proceso ya sea de login o registro.
             $user = $fbme['email'];
             $query_login = mysql_query("SELECT * FROM user WHERE user = '******'");
             $num_login = mysql_num_rows($query_login);
             if ($num_login < 1) {
                 $login_resp = 'window.location="registroFacebook";';
             } else {
                 $rs_user = mysql_fetch_object($query_login);
                 $name = $rs_user->name . " " . $rs_user->lastname;
                 $login_date = explode("-", $rs_user->last_login);
                 if ($login_date[0] == "0000") {
                     $login_resp = 'window.location="completarPerfil";';
                     setcookie("user", $name, 0);
                     setcookie("id", $rs_user->id, 0);
                 } else {
                     updateTable("user", "last_login=NOW()", "id={$rs_user->id}");
                     $login_resp = 'window.location="perfil";';
                     setcookie("user", $name, 0);
                     setcookie("id", $rs_user->id, 0);
                 }
             }
             echo "<script>" . $login_resp . "</script>";
         }
     }
 }
 if ($_POST) {
     $user_user = $_REQUEST['user_user'];
     $user_pass = $_REQUEST['user_password'];
     $login = login($user_user, $user_pass);
     if ($login == false) {
         $app->addError("La combinación de Correo y Contrase&ntilde;a son incorrectos.");
示例#5
0
                $fileNameUnique = $fileName . "_" . $photo_id . "." . $extension;
                updateTable("albumes_det", "ad_url = '" . $fileNameUnique . "'", "ad_id = " . $photo_id);
                $pathFile = '../profiles/' . $perfilSha1 . '/' . $albumSha1 . '/' . $fileNameUnique;
                move_uploaded_file($file['tmp_name'], $pathFile);
                // Event: Fotos subidas álbumes
                $events = FAnalytics::getInstance();
                $events->trackEvent('Album - Fotos subidas', 'Foto subida al album ' . $albumId, $user->id);
                return 'success';
            } else {
                return 'error';
            }
        }
        if ($act == "principalFoto") {
            $foto = $_REQUEST['ad_id'];
            updateTable("albumes_det", "ad_is_principal = false", "ad_a_id = '{$_REQUEST['album']}'");
            updateTable("albumes_det", "ad_is_principal = true", "ad_a_id = '{$_REQUEST['album']}' AND ad_id = '{$foto}'");
        }
    }
    if ($act == "buscarFoto") {
        $foto = $_REQUEST['foto'];
        $limit = $foto - 1;
        $foto = listAll("albumes_det", "WHERE ad_a_id = '{$_REQUEST['a_id']}' AND ad_status='S' LIMIT {$limit},{$foto}");
        $rs_foto = mysql_fetch_object($foto);
        $url_img = "profiles/" . sha1($rs_foto->ad_user_id) . "/" . sha1($rs_foto->ad_a_id) . "/" . $rs_foto->ad_url;
        $fecha = explode(" ", dateField($rs_foto->ad_cdate));
        $desc = $fecha[0];
        $arreglo[] = array('img' => $url_img, 'desc' => $desc);
        echo json_encode($arreglo);
    }
} else {
    $app->redirect($app->getConfig()->getUrl('perfil'));
示例#6
0
<?php

require "../include/init/init.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 1;
// 查询数据
$dataselect = editTable("SELECT * FROM jl_document WHERE document_id={$id}");
if ($_POST) {
    $name = trim($_POST["name"]) ? $_POST["name"] : "";
    $content = trim($_POST["content"]) ? $_POST["content"] : "";
    updateTable("UPDATE jl_document SET \n      document_name='{$name}',\n      document_content='{$content}' WHERE document_id={$id}", "./document.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
require "../include/admin_header.php";
?>
  <div class="col-sm-12 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <!-- 更改即可 -->
示例#7
0
<?php

require "../include/init/init.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 1;
// 查询数据
$dataselect = editTable("SELECT * FROM jl_friend WHERE friend_id={$id}");
if ($_POST) {
    $name = trim($_POST["name"]) ? $_POST["name"] : "";
    $link = trim($_POST["link"]) ? $_POST["link"] : "";
    updateTable("UPDATE jl_friend SET \r\n      friend_name='{$name}',\r\n      friend_link='{$link}' WHERE friend_id={$id}", "./friend.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
require "../include/admin_header.php";
?>
  <div class="col-sm-12 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <!-- 更改即可 -->
示例#8
0
<?php

require "../include/init/init.php";
$optiondata = select_row("SELECT * FROM jl_option");
// 修改数据
if ($_POST) {
    $keyword = $_POST["keyword"];
    $description = $_POST["description"];
    $address = $_POST["address"];
    $contact = $_POST["contact"];
    $copyright = $_POST["copyright"];
    updateTable("UPDATE `jl_option` SET `keyword`='{$keyword}',`description`='{$description}',`address`='{$address}',`contact`='{$contact}',`copyright`='{$copyright}'", "./option.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
require "../include/admin_header.php";
?>
示例#9
0
         $_SESSION["lastpage"] = "index.php";
     } else {
         $_SESSION["message"] = "Delete failed";
         $_SESSION["message"] = "edit.php";
     }
     $_SESSION['loggedin'] = 'FALSE';
     $_SESSION['message'] = "Account Successfully Deleted!";
     header("Location: messages.php");
     break;
 case 'edit':
     header("Location: edit.php");
     break;
     //submits the users edit to the database and sets new session variables.
 //submits the users edit to the database and sets new session variables.
 case 'editted':
     $success = updateTable('customers', $_REQUEST, 'CustomerId');
     $success ? $_SESSION["message"] = "Update Successful!" : ($_SESSION["message"] = "Update Failed!");
     $success ? $_SESSION["lastpage"] = "index.php" : ($_SESSION["lastpage"] = "edit.php");
     $success ? $_SESSION["userfirstname"] = $_POST['CustFirstName'] : $_POST['CustFirstName'];
     $success ? $_SESSION["userlastname"] = $_POST['CustLastName'] : $_POST['CustLastName'];
     print "<br /><br /><br /><br />";
     print $success;
     header("Location: messages.php");
     break;
     //submits the users account to the database and sets session variables.
 //submits the users account to the database and sets session variables.
 case 'Register':
     $customer = new Customer("null", $_REQUEST["CustFirstName"], $_REQUEST["CustLastName"], $_REQUEST["CustAddress"], $_REQUEST["CustCity"], $_REQUEST["CustProv"], $_REQUEST["CustPostal"], $_REQUEST["CustCountry"], $_REQUEST["CustHomePhone"], $_REQUEST["CustBusPhone"], $_REQUEST["CustEmail"], 0, $_REQUEST["CustUsername"], $_REQUEST["CustPassword"]);
     if ($customer->customerAdd()) {
         #The user will be redirected to the index page if they've been added to the database.
         $_SESSION["loggedin"] = "TRUE";
 */
require "../include/inic.php";
// 接收url参数
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 0;
$id_data = editTable("SELECT * FROM wd_case WHERE case_id={$id}");
if ($_POST) {
    $caseName = $_POST["caseName"];
    $caseLink = $_POST["caseLink"];
    $caseDescription = $_POST["caseDescription"];
    $caseTime = strtotime($_POST["caseTime"]);
    if ($_FILES) {
        upload_file("caseFileImg");
        $caseFileImg = $_FILES["caseFileImg"]["name"];
    }
    //插入sql语句
    updateTable("UPDATE `wd_case` SET \n\t\t`case_title`='{$caseName}',\n\t\t`case_link`='{$caseLink}',\n\t\t`case_add_time`='{$caseTime}',\n\t\t`case_img_url`='{$caseFileImg}',\n\t\t`case_description`='{$caseDescription}' WHERE case_id={$id}", "./products.php");
}
?>
<!doctype html>
<html lang="zh-ch">
	<!-- container-fluid -->
	<head>
		<title>文豆-后台管理</title>
		<meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="; charset=utf-8" />
		<link rel="stylesheet" href="bootstrap.min.css" />
		<link rel="stylesheet" href="../css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="../css/unicorn.main.css" />
		<link rel="stylesheet" href="../css/uniform.css" />
		<link rel="stylesheet" href="../css/unicorn.grey.css" class="skin-color" />
示例#11
0
function loginFb($user)
{
    $query_login = mysql_query("SELECT * FROM user WHERE user = '******'");
    $num_login = mysql_num_rows($query_login);
    if ($num_login < 1) {
        $login_resp = 'window.location="../login";';
        return $login_resp;
    } else {
        $rs_user = mysql_fetch_object($query_login);
        $name = $rs_user->name . " " . $rs_user->lastname;
        setcookie("user", $name, 0);
        setcookie("id", $rs_user->id, 0);
        $login_date = explode("-", $rs_user->last_login);
        if ($login_date[0] == "0000") {
            $login_resp = 'window.location="../completarPerfil";';
            return $login_resp;
        } else {
            updateTable("user", "last_login=NOW()", "id={$rs_user->id}");
            $login_resp = 'window.location="../miHome";';
            return $login_resp;
        }
    }
}
示例#12
0
    $tel = $_REQUEST['phone'];
    $movil = $_REQUEST['mobile'];
    $city = $_REQUEST['city'];
    $id_user = $_GET['i'];
    $user_data = updateTable("user", "name = '{$name}',lastname= '{$lastname}',dob='{$dob}',act='{$user_act}',gender='{$gender}'", "id = '{$_GET['i']}'");
    updateTable("user_det", "description = '{$desc}'", "id_user = '******' AND id_data = '2'");
    updateTable("user_det", "description = '{$direccion}'", "id_user = '******' AND id_data = '3'");
    updateTable("user_det", "description = '{$cp}'", "id_user = '******' AND id_data = '4'");
    updateTable("user_det", "description = '{$pais}'", "id_user = '******' AND id_data = '5'");
    updateTable("user_det", "description = '{$tel}'", "id_user = '******' AND id_data = '6'");
    updateTable("user_det", "description = '{$city}'", "id_user = '******' AND id_data = '10'");
    $md = getUserData($id_user, "7");
    if (empty($md)) {
        insertTable("user_det", "'',{$id_user},'7','{$movil}'");
    } else {
        updateTable("user_det", "description = '{$movil}'", "id_user = '******' AND id_data = '7'");
    }
    if ($user_data != false) {
        ?>
<script>
	alert("Se ha modificado el usuario correctamente.");
	window.location="usuarios.php";
	</script>
    <?php 
    } else {
        ?>
    <script>
	alert("No se ha  podido modificar el usuario correctamente.");
	window.history.back();
	</script>
    <?php 
    $mySqlStmt = "Delete From " . $inTableName;
    $mySqlStmt .= " Where ";
    foreach ($myKeys as $myKey) {
        $myDataValue = $inRowNode->xpath($myKey);
        $mySqlStmt .= $mySep . $myKey . " = '" . $myDataValue[0] . "'";
        $mySep = " AND ";
    }
    $result = mysql_query($mySqlStmt);
    if (mysql_error()) {
        printf("\n Errors detected on update %s ", mysql_error());
        return false;
    } else {
        printf("\n Delete successful %d ", $result);
        mysql_info();
        return true;
    }
}
/* ****************************************
Get input stream
**************************************** */
$xml = file_get_contents('php://input');
$xmlDoc = simplexml_load_string($xml);
/* ****************************************
Process input requests
**************************************** */
echo "\n------------------------------";
$myTables = $xmlDoc->xpath('//Table');
foreach ($myTables as $myTable) {
    updateTable($myTable);
}
include_once "WfwTerm.php";
示例#14
0
/**
 * wengdo后台添加导航
 * author: Jeffery
 * create time: 2015-09-08
 */
require "../include/inic.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 0;
$id_data = editTable("SELECT * FROM wd_nav WHERE nav_id={$id}");
// 表单接收
if ($_POST) {
    $navName = $_POST["navName"];
    $navLink = $_POST["navLink"];
    $nav_pid = $_POST["nav_pid"];
    // 修改sql语句
    updateTable("UPDATE `wd_nav` SET \n\t\t`nav_name`='{$navName}',\n\t\t`nav_pid`='{$navLink}',\n\t\t`nav_links`='{$nav_pid}' WHERE nav_id={$id}", "./nav.php");
}
$navpiddata = selectDb("SELECT * FROM wd_nav WHERE nav_pid=0");
// var_dump($id_data);
?>
	

<!doctype html>
<html lang="zh-ch">
	<!-- container-fluid -->
	<head>
		<title>文豆-后台管理</title>
		<meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="; charset=utf-8" />
		<link rel="stylesheet" href="bootstrap.min.css" />
示例#15
0
function userAccoutUpdate($user_code, $data)
{
    $condition["user_code"] = $user_code;
    // 更新用户基本信息表(追加数据)
    if (updateTable(TB_BAS_USER_ACCOUT, $data, $condition, 'add')) {
        return true;
    } else {
        return false;
    }
}
示例#16
0
<html>
<body>

<?php 
$teamCollections = array($_POST['club'], $_POST['club1'], $_POST['club2'], $_POST['club3'], $_POST['club4'], $_POST['club5'], $_POST['club6'], $_POST['club7'], $_POST['club8'], $_POST['club9'], $_POST['club10'], $_POST['club11'], $_POST['club12'], $_POST['club13']);
$scoresCollection = array($_POST['goals1'], $_POST['goals2'], $_POST['goals3'], $_POST['goals4'], $_POST['goals5'], $_POST['goals6'], $_POST['goals7'], $_POST['goals8'], $_POST['goals9'], $_POST['goals10'], $_POST['goals11'], $_POST['goals12'], $_POST['goals13'], $_POST['goals14']);
updateTable($teamCollections, $scoresCollection);
function updateTable($teamCollections, $scoresCollection)
{
    if (!scoresAreOK($scoresCollection)) {
        echo '<span style="color:red;text-align:center;">Scorurile trebuie sa fie intre 0 - 9!</span>';
    } else {
        if (!teamsAreUnique($teamCollections)) {
            echo '<span style="color:red;text-align:center;">Intr-o etapa o echipa joaca un singur meci impotriva oricarei alte echipe!</span>';
        } else {
            for ($count = 0; $count < 14; $count = $count + 2) {
                if ($scoresCollection[$count] == $scoresCollection[$count + 1]) {
                    resolveDrawn($teamCollections[$count], $scoresCollection[$count], $teamCollections[$count + 1]);
                } else {
                    if ($scoresCollection[$count] > $scoresCollection[$count + 1]) {
                        resolveWin($teamCollections[$count], $scoresCollection[$count], $scoresCollection[$count + 1], $teamCollections[$count + 1]);
                    } else {
                        resolveWin($teamCollections[$count + 1], $scoresCollection[$count + 1], $scoresCollection[$count], $teamCollections[$count]);
                    }
                }
            }
        }
    }
}
function resolveDrawn($team1, $goals, $team2)
{
示例#17
0
<?php

require "../include/init/init.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 1;
// 查询数据
$dataselect = editTable("SELECT * FROM jl_products WHERE products_id={$id}");
if ($_POST) {
    $name = trim($_POST["name"]) ? $_POST["name"] : "";
    $content = trim($_POST["products_content"]) ? $_POST["products_content"] : "";
    if ($_FILES) {
        upload_file("img");
        $img = $_FILES["img"]["name"];
    }
    updateTable("UPDATE jl_products SET \r\n     products_name='{$name}',\r\n      products_img='{$img}',\r\n      products_content='{$content}' WHERE products_id={$id}", "./products.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
            case 'Equipos':
                updateTable("UPDATE equipo SET Nombre = 'Team code' WHERE Id_Equipo = 1");
                updateTable("UPDATE equipo SET Nombre = 'and play' WHERE Id_Equipo = 2");
                updateTable("UPDATE equipo SET Puntos = 0 WHERE Id_Equipo = 1 OR Id_Equipo = 2");
                break;
            case 'Respuestas':
                updateTable("UPDATE respuestas SET Oculto = 0 WHERE Oculto = 1");
                break;
            case 'Preguntas':
                updateTable("UPDATE preguntas SET Usado = 0 WHERE Usado = 1");
                break;
            case 'Todo':
                updateTable("UPDATE equipo SET Puntos = 0 WHERE Id_Equipo = 1 OR Id_Equipo = 2");
                updateTable("UPDATE respuestas SET Oculto = 0 WHERE Oculto = 1");
                updateTable("UPDATE preguntas SET Usado = 0 WHERE Usado = 1");
                updateTable("UPDATE equipo SET Nombre = 'Team' WHERE Id_Equipo = 1 OR Id_Equipo = 2");
                break;
            default:
                # code...
                break;
        }
    }
}
//GETS
if (isset($_GET['z'])) {
    if ($_GET['z'] == "NewPreg") {
        // Tomar los valores Cadena y la pregunta
        $str = $_GET['Str'];
        $Pregunta = $_GET['Pregunta'];
        //Insertar la pregunta a la BD
        insertData("INSERT INTO preguntas(Pregunta) VALUES ('" . $Pregunta . "')");
示例#19
0
<?php

require "../include/init/init.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 1;
// 查询数据
$dataselect = editTable("SELECT * FROM jl_news WHERE news_id={$id}");
if ($_POST) {
    $name = trim($_POST["name"]) ? $_POST["name"] : "";
    $link = trim($_POST["link"]) ? $_POST["link"] : "";
    $description = trim($_POST["description"]) ? $_POST["description"] : "";
    $time = strtotime($_POST["time"]);
    updateTable("UPDATE jl_news SET \n      news_name='{$name}',\n      news_link='{$link}',\n      news_time='{$time}',\n      news_description='{$description}' WHERE news_id={$id}", "./news.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
require "../include/admin_header.php";
?>
示例#20
0
use Fototea\Config\FConfig;
use Fototea\Util\FMailer;
require '../vendor/autoload.php';
include_once '../scripts/libSM.php';
$user_email = $_REQUEST['user'];
$act_code = $_REQUEST['act-code'];
//action recover password
if ($_REQUEST['act'] == "recuperar") {
    $rs_user = mysql_fetch_object(listAll("user", "WHERE user = '******'"));
    $to = $rs_user->user;
    $toName = $rs_user->name . ' ' . $rs_user->lastname;
    $asunto = "Recuperar contraseña";
    $params = array('site_url' => FConfig::getUrl(), 'logo_url' => FConfig::getUrl('images/logo_footer.png'), 'nombre' => $toName, 'recuperar_url' => FConfig::getUrl('reinicia-contrasena') . '?c=' . $rs_user->act_code);
    $body = FMailer::replaceParameters($params, file_get_contents('../views/emails/recuperarContrasenaEmail.html'));
    $mailer = new FMailer();
    $receivers = array(array('email' => $to, 'name' => $toName));
    $mailer->setReceivers($receivers);
    $mailer->sendEmail($asunto, $body);
    $arreglo[] = array('resp' => "Se ha enviado la información");
    echo json_encode($arreglo);
}
//action rest password
if ($_REQUEST['act'] == "reset") {
    $pass = sha1($_REQUEST['pass']);
    $rs_user2 = mysql_fetch_object(listAll("user", "WHERE act_code = '{$act_code}'"));
    $salt = $rs_user2->salt;
    $newPass = sha1($salt . $pass);
    updateTable("user", "password = '******'", "act_code = '{$act_code}'");
    $arreglo[] = array('resp' => "Se ha enviado la información");
    echo json_encode($arreglo);
}
示例#21
0
/**
 * wengdo后台编辑友链
 * author: Jeffery
 * create time: 2015-09-09
 */
require "../include/inic.php";
// 接收url参数
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 0;
$id_data = editTable("SELECT * FROM wd_friend_links WHERE friend_links_id={$id}");
// 表单接收
if ($_POST) {
    $friendName = $_POST["friendName"];
    $friendDescription = $_POST["friendDescription"];
    $friendLink = $_POST["friendLink"];
    updateTable("UPDATE `wd_friend_links` SET \n\t\t`friend_title`='{$friendName}',\n\t\t`friend_description`='{$friendDescription}',\n\t\t`friend_links`='{$friendLink}' WHERE friend_links_id={$id}", "./friend_links.php");
}
?>
	

<!doctype html>
<html lang="zh-ch">
	<!-- container-fluid -->
	<head>
		<title>文豆-后台管理</title>
		<meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="; charset=utf-8" />
		<link rel="stylesheet" href="bootstrap.min.css" />
		<link rel="stylesheet" href="../css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="../css/unicorn.main.css" />
示例#22
0
<?php

require "../include/init/init.php";
$id = isset($_GET["id"]) ? (int) $_GET["id"] : 1;
// 查询数据
$dataselect = editTable("SELECT * FROM jl_notice WHERE notice_id={$id}");
if ($_POST) {
    $name = trim($_POST["name"]) ? $_POST["name"] : "";
    $content = trim($_POST["content"]) ? $_POST["content"] : "";
    $time = strtotime($_POST["time"]);
    updateTable("UPDATE jl_notice SET \r\n      notice_name='{$name}',\r\n      notice_time='{$time}',\r\n      notice_content='{$content}' WHERE notice_id={$id}", "./notice.php");
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="content" content="">
  <meta name="author" content="">
  <link rel="icon" href="">
  <title>金陵后台管理</title>
  <link href="../css/bootstrap.min.css" rel="stylesheet">
  <link href="../css/dashboard.css" rel="stylesheet">
</head>
<body>
  <?php 
require "../include/admin_header.php";
?>
  <div class="col-sm-12 col-sm-offset-3 col-md-10 col-md-offset-2 main">
示例#23
0
<?php

include "functions.php";
if (isset($_POST['submit2']) && isset($_POST['answer2'])) {
    $answer2 = $_POST['answer2'];
    updateTable('2', 'answer2');
    echo "test";
    if ($answer2 === "1") {
        header('Location: question3.php');
    } elseif ($answer2 === "2") {
        header('Location: question3.php');
    } elseif ($answer2 === "3 or more") {
        header('Location: doubleConsult.php');
    } else {
        echo "error";
    }
}
?>

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <form action="question2.php" name="Questionnaire" method="post" class="col-md-6 col-md-offset-4">
        <h1>PACT</h1>
        <p id="q1">Is it the first appointment of the patient?</p>
示例#24
0
         $user->new_email_code = null;
         $user->save();
         $app->addMessage("Tu correo electrónico ha sido cambiado exitosamente. Tu nueva cuenta de correo electrónico es <b>" . $user->user . "</b>");
     }
     $app->redirect(UrlHelper::getUrl('editarPerfil'));
     return;
 }
 //marcar notificaciones como leidas
 if ($action == "notificationAct") {
     $id = intval($_REQUEST['id']);
     //Update nice version
     //        $notificacion = \ORM::for_table('notificaciones')->find_one($id);
     //        $notificacion->set('leido', 'S');
     //        $notificacion->save();
     //Update old version
     updateTable("notificaciones", "leido='S'", "id = {$id}");
     $redirectUrl = $_REQUEST['url'];
     //        $redirectUrl = FConfig::getUrl($redirectUrl);
     header('Location: ' . $redirectUrl);
     die;
 }
 /**
  * Crop the temp image and generate the preview
  */
 if ($action == "cropImage") {
     $response = new stdClass();
     //TODO validate user, if there is an error append to json response
     //TODO validate login
     $user = getCurrentUser();
     $folder_id = sha1($user->id);
     $baseProfileUrl = 'profiles' . '/' . $folder_id . '/';
        echo "checked";
    }
    ?>
 /><i class="glyphicon glyphicon-book" style="padding:1px; margin:1px;color:#8b7765" dir="ltr"></i></span> 
</center>
</div>
<?php 
    $q = "SELECT * FROM `classic_words` where TRIM(word)='" . addslashes($word) . "' or TRIM(word)='" . addslashes($word) . "\n'";
    $res = $con->query($q);
    $morph = array("", "");
    if ($row = $res->fetch_array()) {
        if ($row['morph'] == "Not Found") {
            $morph = array('', '');
        } else {
            if ($row['morph'] == "") {
                $morph = updateTable($row['word']);
            } else {
                $morph = parseXML($row['morph']);
            }
        }
    } else {
        // try to get it from Buck Walter
        $morph = getMorph($row['word']);
    }
    ?>
<br/><br /> <span class="subtitle">Word Stem:<span> <br /> 
<?php 
    echo '<input class="form-control stem" type="text" dir="rtl" id="stem' . $block . '" value="' . $info['stem'] . '" >';
    if ($morph[0] != '') {
        echo $morph[0];
    } else {
示例#26
0
$sql = "SELECT * FROM `wd_ad` WHERE ad_id={$id}";
$res = mysql_query($sql);
$id_data = array();
if (mysql_num_rows($res) > 0) {
    $id_data = mysql_fetch_assoc($res);
}
if ($_POST) {
    $adName = $_POST["adName"];
    $adLink = $_POST["adLink"];
    $adDescription = $_POST["adDescription"];
    $adTime = strtotime($_POST["adTime"]);
    if ($_FILES) {
        upload_file("adFileImg", "./adImg/");
        $adFileImg = $_FILES["adFileImg"]["name"];
    }
    updateTable("UPDATE `wd_ad` SET \n\t\t`ad_title`='{$adName}',\n\t\t`ad_links`='{$adLink}',\n\t\t`ad_description`='{$adDescription}',\n\t\t`ad_add_time`='{$adTime}',\n\t\t`ad_img_url`='{$adFileImg}' WHERE ad_id={$id}", "./ad_list.php");
}
?>
<!doctype html>
<html lang="zh-ch">
	<!-- container-fluid -->
	<head>
		<title>文豆-后台管理</title>
		<meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Content-Type" content="; charset=utf-8" />
		<link rel="stylesheet" href="bootstrap.min.css" />
		<link rel="stylesheet" href="../css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="../css/unicorn.main.css" />
		<link rel="stylesheet" href="../css/uniform.css" />
		<link rel="stylesheet" href="../css/unicorn.grey.css" class="skin-color" />
示例#27
0
<?php

use Fototea\Models\Referral;
use Fototea\Models\User;
use Fototea\Models\Credit;
use Fototea\Util\FAnalytics;
$user_code = $_REQUEST['c'];
$list = listAll("user", "WHERE act_code='{$user_code}'");
@($val = mysql_num_rows($list));
if ($val > 0) {
    $user = mysql_fetch_object($list);
    $user_update = updateTable("user", "act='S'", "act_code='{$user_code}'");
    $mss = '&iexcl;Tu cuenta ha sido activada con &eacute;xito!<br><br><a href="login" class="txtAzul">Entrar a tu cuenta</a>.';
    // Create user profile folder
    $folder_id = sha1($user->id);
    $dir = "../profiles/" . $folder_id;
    $dir2 = $dir . "/";
    @mkdir($dir2, 0777, true);
    // Event = Confirmacion de registro
    $events = FAnalytics::getInstance();
    if ($user->user_type == User::USER_TYPE_PHOTOGRAPHER) {
        $events->trackEvent('Usuario - Confirmaciones de registro', 'Confirmación de fotógrafo', $user->user_type);
    } else {
        $events->trackEvent('Usuario - Confirmaciones de registro', 'Confirmación de cliente', $user->user_type);
    }
    // Add referral to referring user if exists
    if (isset($_GET['ru']) && isset($_GET['ru'])) {
        $referringUserId = $_GET['ru'];
        $media = $_GET['rm'];
        if ($referringUserId != null) {
            $referral = new Referral();
示例#28
0
<?php

include "connect/database.php";
validaSession();
securityValidation($_COOKIE['id'], "13");
if (isset($_GET['i'])) {
    $values = "act = 'N'";
    $bannerIn = updateTable("user", $values, "id = {$_GET['i']}");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Usuarios Registrados</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<!--[if IE 9]>
    <link rel="stylesheet" media="screen" href="css/ie9.css"/>
<![endif]-->

<!--[if IE 8]>
    <link rel="stylesheet" media="screen" href="css/ie8.css"/>
<![endif]-->

<!--[if IE 7]>
    <link rel="stylesheet" media="screen" href="css/ie7.css"/>
<![endif]-->
<script type="text/javascript" src="js/plugins/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery.flot.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery.flot.resize.min.js"></script>
示例#29
0
    $body = FMailer::replaceParameters($params, file_get_contents('../views/emails/recibidoCalificacionDeUsuarioEmail.html'));
    $mailer = new FMailer();
    $receivers = array(array('email' => $to));
    $mailer->setReceivers($receivers);
    $mailer->sendEmail($asunto, $body);
    $arreglo[] = array('resp' => "Se ha enviado la información");
    echo json_encode($arreglo);
}
//update bid
if ($act == "upt_bid") {
    $oferta = listAll("ofertas", "WHERE id = {$_REQUEST['o_id']}");
    $rs_oferta = mysql_fetch_object($oferta);
    $old_bid = $rs_oferta->bid;
    $new_bid = $_REQUEST['bid'];
    if ($rs_oferta->bid != $new_bid) {
        $bid = updateTable("ofertas", "bid='{$_REQUEST['bid']}'", "id={$_REQUEST['o_id']}");
        if ($bid) {
            $proj = listAll("proyectos,user,ofertas", "WHERE proyectos.pro_id = ofertas.pro_id AND user.id = proyectos.user_id");
            $rs_proj = mysql_fetch_object($proj);
            $to = $rs_proj->user;
            $user = getUserInfo($_COOKIE['id']);
            $pro_not = listAll("proyectos", " WHERE pro_id = '{$rs_oferta->pro_id}'");
            $rs_pro_not = mysql_fetch_object($pro_not);
            $notificationData = new stdClass();
            $notificationData->offer_id = $rs_oferta->id;
            $notificationData->project_id = $rs_oferta->pro_id;
            if ($new_bid < $old_bid) {
                $not_user = Notification::create($rs_pro_not->user_id, $user['full_name'] . ' ha reducido el precio de su oferta en el proyecto ' . $rs_pro_not->pro_tit . ' - ¡Revisalo!', Notification::TYPE_MODIFIED_OFFER, json_encode($notificationData));
            } else {
                $not_user = Notification::create($rs_pro_not->user_id, $user['full_name'] . ' ha modificado el precio de su oferta en el proyecto ' . $rs_pro_not->pro_tit, Notification::TYPE_MODIFIED_OFFER, json_encode($notificationData));
            }
示例#30
0
}
// endif post submit
if ($submitOK && $configArray['rightWrite']) {
    $updateUserANCS = "UPDATE conturi_admin SET " . "nume = '" . mysql_escape_string($nume) . "', " . "prenume = '" . mysql_escape_string($prenume) . "', " . "email = '" . mysql_escape_string($email) . "', " . "parola = '" . mysql_escape_string($parola) . "', " . "cont_tip = '" . mysql_escape_string($cont_tip) . "' " . "WHERE id = " . $_ID . "";
    //echo $updateUserANCS; exit();
    if (!mysql_query($updateUserANCS, $configArray['dbcnx'])) {
        echo 'eroare la update 1';
    } else {
        echo '';
    }
    $accesModules = getQueryInArray("SELECT * FROM mm_cont_modul cm WHERE cm.id_cont = " . intval($_ID) . " ORDER BY id_modul ASC");
    for ($i = 0; $i < count($modules); $i++) {
        eval("\$" . "cur_r = \$" . "r_" . $modules[$i]['module_id'] . ";");
        eval("\$" . "cur_w = \$" . "w_" . $modules[$i]['module_id'] . ";");
        if (checkArrayValue($accesModules, 'id_modul', $modules[$i]['module_id'])) {
            updateTable("UPDATE mm_cont_modul SET r = " . intval($cur_r) . ", w = " . intval($cur_w) . " WHERE id_cont = " . intval($_ID) . " AND id_modul = " . intval($modules[$i]['module_id']) . "");
        } else {
            insertIntoTable("INSERT INTO mm_cont_modul SET r = " . intval($cur_r) . ", w = " . intval($cur_w) . ", id_cont = " . intval($_ID) . ", id_modul = " . intval($modules[$i]['module_id']) . "");
        }
    }
    //endfor
    $insertLog = "INSERT INTO log SET " . "data = NOW(), " . "obs = 'ACTUALIZARE CONT - DUPA AUTENTIFICARE', " . "ip = '" . get_ip_address() . "', " . "query = '" . mysql_real_escape_string($updateUserANCS) . "' " . "";
    if (!mysql_query($insertLog, $configArray['dbcnx'])) {
        echo $insertLog . ' &nbsp; eroare la adaugare 2';
    } else {
        echo '';
    }
    redirect('conturi_edit.php?id=' . intval($_ID) . '&msg=5');
} else {
    ?>
                                    <form method="post" id="detaliiForm" name="detaliiForm" enctype="multipart/form-data" action="<?php