-
Notifications
You must be signed in to change notification settings - Fork 0
/
unlock.php
38 lines (31 loc) · 959 Bytes
/
unlock.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("tasks") or die(mysql_error());
mysql_query("set character_set_client=utf8");
mysql_query("set character_set_connection=utf8");
mysql_query("set collation_connection=utf8");
mysql_query("set character_set_results=utf8");
$taskid=0;
$kodikos='';
$sql="select kodikos from tasks where taskid=".$_REQUEST['taskid'];
$data = mysql_query($sql)
or die(mysql_error());
$passed=false;
while($info = mysql_fetch_array( $data ))
{
$kodikos=$info['kodikos'];
if ($_REQUEST['kodikos']=="'".$info['kodikos']."'") $passed=true;
}
//print "PERASE?".$_REQUEST['kodikos']."-";
if ($passed==true)
{
$sql="UPDATE tasks set kodikos='' ";
$sql=$sql."where taskid=".$_REQUEST['taskid'];
//print $sql;
$data = mysql_query($sql)
or die(mysql_error());
print 'Σ';
}
if ($passed==false) print 'Λ';
?>