View Issue Details

IDProjectCategoryView StatusLast Update
0001442Main CAcert Websitemiscpublic2021-08-07 21:32
ReporterTed Assigned ToGuKKDevel  
PriorityhighSeverityminorReproducibilityN/A
Status needs review & testingResolutionduplicate 
PlatformDefaultOSanyOS Versionany
Summary0001442: Rewrite code to use ext/mysqli API (or PDO_MySQL) instead of ext/mysql
DescriptionAs reported by Wytze in https://wiki.cacert.org/AGM/TeamReports/2018 :

[...] An upgrade to Debian Stable is not possible with the current PHP code base, due to its dependency on an obsolete mySQL database interface layer, which is not supported anymore in the PHP version bundled with Debian Stretch, the current Debian Stable.

Without the ability to upgrade the application platform to a well-maintained version of Debian, the Critical System Administrator Team will be unable to take responsibility in the near future for the safe and correct operation of CAcert's main server, the web application and database server.
Additional InformationCurrently ext/mysql is used. A look at https://secure.php.net/manual/en/mysqlinfo.api.choosing.php seems to imply that ext/mysqli is more closely related to ext/mysql than the alternative PDO_MySQL.

If you think that migrating to PDO_MySQL is less work, you're welcome to do it, I've no strong feelings about this.
TagsNo tags attached.
Attached Files
diff-release-bug1442 (361,098 bytes)
Reviewed by
Test Instructions

Relationships

related to 0001031 fix availablePatrick Disable use of insecure function mysql_escape_string() 
child of 0001260 needs workBenBE Make the source compatible with recent PHP versions 

Activities

GuKKDevel

2018-10-26 17:56

updater   ~0005615

I did a text-check for "mysql_" on the CAcert-devel-directory with release checked out and a text-check for "mysqli_" with bug-1260 checked out.
origin_release (88,558 bytes)   

/home/gitRepos/CAcert/CAcert-devel/pages/advertising/0.php

27->		$res = mysql_query($query);
28->		if(mysql_num_rows($res) > 0)
30->			$row = mysql_fetch_assoc($res);
33->			mysql_query($query);
41->		$res = mysql_query($query);
42->		if(mysql_num_rows($res) > 0)
44->			$row = mysql_fetch_assoc($res);
47->			mysql_query($query);
72->	$res = mysql_query($query);
73->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/3.php

41->	$res = mysql_query($query);
42->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/15.php

24->	$res = mysql_query($query);
25->	if(mysql_num_rows($res) <= 0)
31->	$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/27.php

19->	$row = mysql_fetch_assoc(mysql_query("select * from `orginfo` where `id`='".intval($_REQUEST['orgid'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/59.php

24->if (mysql_num_rows($res) <= 0)
30->$user = mysql_fetch_assoc($res);
162->if (mysql_num_rows($dres) > 0) {
164->    while ($drow = mysql_fetch_assoc($dres))
188->if (mysql_num_rows($dres) > 0) {
190->    while ($drow = mysql_fetch_assoc($dres))
214->if (mysql_num_rows($dres) > 0) {
216->    while ($drow = mysql_fetch_assoc($dres))
240->if (mysql_num_rows($dres) > 0) {
242->    while ($drow = mysql_fetch_assoc($dres))
270->if (mysql_num_rows($dres) > 0) {
272->    while ($drow = mysql_fetch_assoc($dres))
300->if (mysql_num_rows($dres) > 0) {
302->    while ($drow = mysql_fetch_assoc($dres))
330->if (mysql_num_rows($dres) > 0) {
332->    while ($drow = mysql_fetch_assoc($dres))
365->if (mysql_num_rows($dres) > 0) {
367->    while ($drow = mysql_fetch_assoc($dres))


/home/gitRepos/CAcert/CAcert-devel/pages/account/35.php

27->$res = mysql_query($query);
28->while($row = mysql_fetch_assoc($res))
58->	$res1 = mysql_query($query);
59->	while($domain = mysql_fetch_assoc($res1))
79->	$res2 = mysql_query($query);
80->	while($org = mysql_fetch_assoc($res2))
82->		$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($org['memid'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/33.php

20->	$row = mysql_fetch_assoc(mysql_query($query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/19.php

24->	$res = mysql_query($query);
25->	if(mysql_num_rows($res) <= 0)
32->	$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/41.php

57->	$res = mysql_query($query);
58->	while($row = mysql_fetch_assoc($res))
60->		$lang = mysql_fetch_assoc(mysql_query("select * from `languages` where `locale`='".mysql_escape_string($row['lang'])."'"));
73->	$res = mysql_query($query);
74->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/34.php

20->	$row = mysql_fetch_assoc(mysql_query($query));
22->	$org = mysql_fetch_assoc(mysql_query($query));
24->	$user = mysql_fetch_assoc(mysql_query($query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/28.php

20->	$row = mysql_fetch_assoc(mysql_query($query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/5.php

56->	$res = mysql_query($query);
57->	if(mysql_num_rows($res) <= 0)
64->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/53.php

19->	$town = array_key_exists('town',$_REQUEST)?mysql_escape_string(stripslashes($_REQUEST['town'])):"";
32->		$reg = mysql_fetch_assoc(mysql_query("select * from `regions` where `id`='$regid'"));
41->		$cnt = mysql_fetch_assoc(mysql_query("select * from `countries` where `id`='$ccid'"));
54->		$res = mysql_query($query);
55->		while($row = mysql_fetch_assoc($res))
62->		$res = mysql_query($query);
63->		while($row = mysql_fetch_assoc($res))
77->			$start = mysql_num_rows(mysql_query($query));
80->		$res = mysql_query($query);
81->		while($row = mysql_fetch_assoc($res))
92->		$rc = mysql_num_rows(mysql_query("select * from `locations` where `regid`='$regid'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/23.php

24->	$res = mysql_query($query);
25->	if(mysql_num_rows($res) <= 0)
31->	$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/6.php

42->$res = mysql_query($query);
43->if(mysql_num_rows($res) <= 0) {
49->$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/18.php

40->    $reso = mysql_query($query);
41->    if(mysql_num_rows($reso) >= 1){
42->      while($row = mysql_fetch_assoc($reso)){
109->  $res = mysql_query($query);
110->  if(mysql_num_rows($res) <= 0)
119->  while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/54.php

22->	$name = array_key_exists('name',$_REQUEST)?mysql_escape_string($_REQUEST['name']):"";
44->	$row = mysql_fetch_assoc(mysql_query($query));
92->	$row = mysql_fetch_assoc(mysql_query($query));
128->	$res = mysql_query($query);
129->	$rc = mysql_num_rows($res);
146->	while($row = mysql_fetch_assoc($res))
172->	$row = mysql_fetch_assoc(mysql_query($query));
189->	$res = mysql_query($query);
190->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/12.php

52->	$res = mysql_query($query);
53->	if(mysql_num_rows($res) <= 0)
60->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/51.php

22->	$res = mysql_query($query);
23->	if(mysql_num_rows($res) > 0) { ?>
27->        $res = mysql_query($query);
28->        if(mysql_num_rows($res) > 0)


/home/gitRepos/CAcert/CAcert-devel/pages/account/58.php

24->	$res = mysql_query($query);
25->	if(mysql_num_rows($res) != 1){
28->		if ($row = mysql_fetch_assoc($res)){
34->			$res1 = mysql_query($query);?>
36->			if (mysql_num_rows($res1) <= 0) {?>
48->				while($drow = mysql_fetch_assoc($res1)){?>


/home/gitRepos/CAcert/CAcert-devel/pages/account/9.php

30->	$res = mysql_query($query);
31->	if(mysql_num_rows($res) <= 0)
38->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/55.php

34->    $res = mysql_query($query);
35->    if(mysql_num_rows($res) <= 0)
39->      $row = mysql_fetch_assoc($res);
64->        $res = mysql_query($query);
67->        while($row = mysql_fetch_array($res, MYSQL_NUM))
102->        $res = mysql_query($query);
106->          $row = mysql_fetch_array($res, MYSQL_NUM);


/home/gitRepos/CAcert/CAcert-devel/pages/account/43.php

40->    $emailsearch = $email = mysql_real_escape_string(stripslashes($_REQUEST['email']));
66->    $res = mysql_query($query);
67->    if(mysql_num_rows($res) > 1) {
78->        while($row = mysql_fetch_assoc($res))
88->        if(mysql_num_rows($res) >= 100) {
97->                <td class="DataTD" colspan="2"><? printf(_("%s rows displayed."), mysql_num_rows($res)); ?></td>
104->    } elseif(mysql_num_rows($res) == 1) {
105->        $row = mysql_fetch_assoc($res);
116->    if(mysql_num_rows($res) <= 0) {
119->        $row = mysql_fetch_assoc($res);
121->        $dres = mysql_query($query);
122->        $drow = mysql_fetch_assoc($dres);
135->                $res = mysql_query("select `to` from `notary` where `id`='".intval($assurance)."' and `deleted` = 0");
137->                    $trow = mysql_fetch_assoc($res);
139->                        mysql_query("update `notary` set `deleted`=NOW() where `id`='".intval($assurance)."'");
406->                if(mysql_num_rows($dres) > 0) {
413->                    while($drow = mysql_fetch_assoc($dres)) {
429->                if(mysql_num_rows($dres) > 0) {
436->                    while($drow = mysql_fetch_assoc($dres)) {
491->                select * from `users` where `email`='".mysql_real_escape_string(stripslashes($_POST['email']))."'
530->                $dres = mysql_query($query);
531->                $drow = mysql_fetch_assoc($dres);
541->                $dres = mysql_query($query);
542->                if ($drow = mysql_fetch_assoc($dres)) {
549->                    $dres = mysql_query($query);
550->                    $drow = mysql_fetch_assoc($dres);
629->                $dres = mysql_query($query);
630->                $drow = mysql_fetch_assoc($dres);
647->                    $dres = mysql_query($query);
648->                    $drow = mysql_fetch_assoc($dres);
658->                    $dres = mysql_query($query);
659->                    $drow = mysql_fetch_assoc($dres);
669->                    $dres = mysql_query($query);
670->                    $drow = mysql_fetch_assoc($dres);
695->                $dres = mysql_query($query);
696->                $drow = mysql_fetch_assoc($dres);
712->                    $dres = mysql_query($query);
713->                    $drow = mysql_fetch_assoc($dres);
722->                    $dres = mysql_query($query);
723->                    $drow = mysql_fetch_assoc($dres);
732->                    $dres = mysql_query($query);
733->                    $drow = mysql_fetch_assoc($dres);
758->                $dres = mysql_query($query);
759->                $drow = mysql_fetch_assoc($dres);
774->                    $dres = mysql_query($query);
775->                    $drow = mysql_fetch_assoc($dres);
784->                    $dres = mysql_query($query);
785->                    $drow = mysql_fetch_assoc($dres);
812->                $dres = mysql_query($query);
813->                $drow = mysql_fetch_assoc($dres);
830->                    $dres = mysql_query($query);
831->                    $drow = mysql_fetch_assoc($dres);
841->                    $dres = mysql_query($query);
842->                    $drow = mysql_fetch_assoc($dres);
852->                    $dres = mysql_query($query);
853->                    $drow = mysql_fetch_assoc($dres);
880->                $dres = mysql_query($query);
881->                $drow = mysql_fetch_assoc($dres);
898->                    $dres = mysql_query($query);
899->                    $drow = mysql_fetch_assoc($dres);
909->                    $dres = mysql_query($query);
910->                    $drow = mysql_fetch_assoc($dres);
920->                    $dres = mysql_query($query);
921->                    $drow = mysql_fetch_assoc($dres);
988->        $dres = mysql_query($query);
990->        while($drow = mysql_fetch_assoc($dres)) {
991->            $fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($drow['from'])."'"));
1035->        $dres = mysql_query($query);
1037->        while($drow = mysql_fetch_assoc($dres)) {
1038->            $fromuser = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($drow['to'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/52.php

24->	$res = mysql_query($query);
25->	if(mysql_num_rows($res) > 0) {
26->		$row = mysql_fetch_assoc($res);
30->		$rc2 = mysql_num_rows(mysql_query($query2));
39->		$notary = mysql_fetch_assoc(mysql_query($query));
41->		$user = mysql_fetch_assoc(mysql_query($query));
77->		$res = mysql_query($query);
78->		if(mysql_num_rows($res) > 0) {
86->		$res = mysql_query($query);
87->		if(mysql_num_rows($res) > 0) {
89->			while($row = mysql_fetch_assoc($res)) {
92->				$rc3 = mysql_num_rows(mysql_query($query3));


/home/gitRepos/CAcert/CAcert-devel/pages/account/49.php

22->		$domainsearch = $domain = mysql_escape_string(stripslashes($_POST['domain']));
33->		$res = mysql_query($query);
34->		if(mysql_num_rows($res) >= 1) { ?>
40->	while($row = mysql_fetch_assoc($res))
47-><? } if(mysql_num_rows($res) >= 100) { ?>
53->    <td class="DataTD" colspan="3"><? printf(_("%s rows displayed."), mysql_num_rows($res)); ?></td>
57-><?		} elseif(mysql_num_rows($res) == 1) {
58->			$row = mysql_fetch_assoc($res);
69->		$res = mysql_query($query);
70->		if(mysql_num_rows($res) >= 1) { ?>
76->	while($row = mysql_fetch_assoc($res))
83-><? } if(mysql_num_rows($res) >= 100) { ?>
89->    <td class="DataTD" colspan="3"><? printf(_("%s rows displayed."), mysql_num_rows($res)); ?></td>
93-><?		} elseif(mysql_num_rows($res) == 1) {
94->			$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/13.php

20->  $res = mysql_query($query);
21->  $user = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/32.php

20->	$row = mysql_fetch_assoc(mysql_query($query));
35->	$res = mysql_query($query);
36->	while($row = mysql_fetch_assoc($res))
38->		$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($row['memid'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/29.php

20->	$row = mysql_fetch_assoc(mysql_query($query));
22->	$org = mysql_fetch_assoc(mysql_query($query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/22.php

40->    $reso = mysql_query($query);
41->    if(mysql_num_rows($reso) >= 1){
42->      while($row = mysql_fetch_assoc($reso)){
112->  $res = mysql_query($query);
113->  if(mysql_num_rows($res) <= 0)
121->  while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/2.php

31->	$res = mysql_query($query);
32->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/31.php

20->	$org = mysql_fetch_assoc(mysql_query($query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/57.php

28->    $res = mysql_query($query);
29->    if(mysql_num_rows($res) <= 0)
33->      $row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/25.php

57->	$res = mysql_query($query);
58->	while($row = mysql_fetch_assoc($res))
60->		$r2 = mysql_query("select * from `org` where `orgid`='".intval($row['id'])."'");
61->		$admincount = mysql_num_rows($r2);
62->		$r2 = mysql_query("select * from `orgdomains` where `orgid`='".intval($row['id'])."'");
63->		$domcount = mysql_num_rows($r2);


/home/gitRepos/CAcert/CAcert-devel/pages/account/56.php

28->    $res = mysql_query($query);
29->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/26.php

20->	$row = mysql_fetch_assoc(mysql_query($query));
33->	$res = mysql_query($query);
34->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/30.php

20->	$row = mysql_fetch_assoc(mysql_query($query));
22->	$org = mysql_fetch_assoc(mysql_query($query));


/home/gitRepos/CAcert/CAcert-devel/pages/wot/1.php

19->	$res=mysql_fetch_assoc(mysql_query("select sum(acount) as summe from countries"));
32->		$loc = mysql_fetch_assoc(mysql_query("select * from `locations` where `id`='".$locid."'"));
41->		$reg = mysql_fetch_assoc(mysql_query("select * from `regions` where `id`='".$regid."'"));
50->		$cnt = mysql_fetch_assoc(mysql_query("select * from `countries` where `id`='".$ccid."'"));
63->		$res = mysql_query($query);
64->		while($row = mysql_fetch_assoc($res))
72->		$res = mysql_query($query);
73->		while($row = mysql_fetch_assoc($res))
81->		$res = mysql_query($query);
82->		while($row = mysql_fetch_assoc($res))
96->	$list = mysql_query($query);
97->	if(mysql_num_rows($list) > 0)
109-><?		while($row = mysql_fetch_assoc($list)) { ?>


/home/gitRepos/CAcert/CAcert-devel/pages/wot/10.php

31->	$res = mysql_query($query);
32->	$row = mysql_fetch_assoc($res);
43->	$rank = mysql_num_rows(mysql_query($query)) + 1;
68->	$res = mysql_query($query);
69->	while($row = mysql_fetch_assoc($res))
71->		$fromuser = mysql_fetch_assoc(mysql_query("select `fname`, `lname` from `users` where `id`='".intval($row['from'])."'"));
118->	$res = mysql_query($query);
119->	while($row = mysql_fetch_assoc($res))
121->		$fromuser = mysql_fetch_assoc(mysql_query("select `fname`, `lname` from `users` where `id`='".intval($row['to'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/wot/12.php

68->		$loc = trim(mysql_escape_string($bits['0']));
69->		$reg = ""; if(array_key_exists('1',$bits)) $reg=trim(mysql_escape_string($bits['1']));
70->		$ccname = ""; if(array_key_exists('2',$bits)) $ccname=trim(mysql_escape_string($bits['2']));
76->		$res = mysql_query($query);
77->		if($reg != "" && $ccname == "" && mysql_num_rows($res) <= 0)
83->			$res = mysql_query($query);
85->		if(mysql_num_rows($res) <= 0)
87->		$row = mysql_fetch_assoc($res);
95->	$loc = mysql_fetch_assoc(mysql_query($query));
111->	$res = mysql_query($query);
120-><?	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/wot/9.php

22->	$res = mysql_query("select * from `users` where `id`='".intval($_REQUEST['userid'])."' and `listme`='1'");
23->	if(mysql_num_rows($res) <= 0)
28->		$user = mysql_fetch_array($res);
30->		$points = mysql_num_rows(mysql_query("select sum(`points`) as `total` from `notary`
57->	$res = mysql_query($query);
58->	while($row = mysql_fetch_assoc($res))
60->		$lang = mysql_fetch_assoc(mysql_query("select * from `languages` where `locale`='".mysql_real_escape_string($row['lang'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/wot/13.php

24->		$loc = trim(mysql_escape_string($bits['0']));
25->		$reg = ''; if(array_key_exists('1',$bits)) $reg=trim(mysql_escape_string($bits['1']));
26->		$ccname = ''; if(array_key_exists('2',$bits)) $ccname=trim(mysql_escape_string($bits['2']));
31->		$res = mysql_query($query);
32->                if($reg != "" && $ccname == "" && mysql_num_rows($res) <= 0)
38->                        $res = mysql_query($query);
40->                if(mysql_num_rows($res) <= 0)
43->		$row = mysql_fetch_assoc($res);
49->	$res = mysql_query($query);
50->	if(mysql_num_rows($res) > 0)
52->		$loc = mysql_fetch_assoc($res);
57->		mysql_query($query);
65->	$res = mysql_query($query);
66->	$loc = mysql_fetch_assoc($res);
68->	$res = mysql_query($query);
69->	$reg = mysql_fetch_assoc($res);
71->	$res = mysql_query($query);
72->	$cc = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/gpg/3.php

21->	$res = mysql_query($query);
22->	if(mysql_num_rows($res) <= 0)
28->	$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/gpg/2.php

36->	$res = mysql_query($query);
37->	if(mysql_num_rows($res) <= 0)
44->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/CommModule/usbclient.pl

101->my $password="";$password=$1 if($content=~m/mysql_connect\("[^"]+",\s*"\w+",\s*"(\w+)"/);
136->sub mysql_query($)


/home/gitRepos/CAcert/CAcert-devel/CommModule/client.pl

71->$password=$1 if($content=~m/mysql_connect\s*\("[^"]+",\s*"\w+",\s*"(\w+)"/);
136->sub mysql_query($)


/home/gitRepos/CAcert/CAcert-devel/stamp/report.php

18->	$arr = explode("//", mysql_real_escape_string(trim($_SESSION['_stamp']['ref'])), 2);
22->	$refer = mysql_real_escape_string(strip_tags(trim($_SESSION['_stamp']['ref'])));
55->		$IP = mysql_real_escape_string(trim($_SERVER['REMOTE_ADDR']));
57->		mysql_query("insert into `abusereports` set `when`=NOW(), `IP`='$iplong', `url`='$refer', `name`='$name', `email`='$email',
59->		$id = mysql_insert_id();


/home/gitRepos/CAcert/CAcert-devel/stamp/common.php

23->		return(mysql_real_escape_string(strip_tags(trim($_REQUEST[$key]))));
34->		$res = mysql_query($query);
35->		if(mysql_num_rows($res) > 0)
37->			$row = mysql_fetch_assoc($res);
49->					$res = mysql_query($query);
50->					if(mysql_num_rows($res) > 0)
55->						mysql_query($query);
71->		$res = mysql_query($query);
72->		if(mysql_num_rows($res) <= 0)
91->			$res = mysql_query($query);
92->			if(mysql_num_rows($res) <= 0)
104->				$res = mysql_query($query);
105->				if(mysql_num_rows($res) <= 0)
116->			$cert = mysql_fetch_assoc($res);
121->				$user = mysql_fetch_assoc(mysql_query($query));
124->				$orgi = mysql_fetch_assoc(mysql_query($query));
137->			mysql_query($query);
139->			mysql_query("update `stampcache` set `cacheexpire`='".(date("U")+600)."' where `id`='$stampid'");
142->			mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/stamp/certdet.php

22->	$arr = explode("//", mysql_real_escape_string(trim($_REQUEST['refer'])), 2);
26->        $arr = explode("//", mysql_real_escape_string(trim($_SERVER['HTTP_REFERER'])), 2);


/home/gitRepos/CAcert/CAcert-devel/stamp/displogo.php

19->	$arr = explode("//", mysql_real_escape_string(trim($_REQUEST['refer'])), 2);
23->	$arr = explode("//", mysql_real_escape_string(trim($_SERVER['HTTP_REFERER'])), 2);


/home/gitRepos/CAcert/CAcert-devel/includes/lib/general.php

35->			`serial`='".mysql_escape_string($serial)."' and
37->				`Cert_Text`='".mysql_escape_string($issuer_cn)."') and
40->	$res = mysql_query($query);
41->	if(mysql_num_rows($res) > 0)
43->		$row = mysql_fetch_assoc($res);
142->		$query = mysql_query('SELECT * FROM `cats_passed` AS `tp`, `cats_variant` AS `cv` '.
144->		if(mysql_num_rows($query) < 1)
149->		$query = mysql_query('SELECT SUM(`points`) AS `points` FROM `notary` AS `n` WHERE `n`.`to` = \''.(int)intval($userID).'\' AND `n`.`expire` < now() and `deleted` = 0');
150->		$row = mysql_fetch_assoc($query);
155->		$query = mysql_query('SELECT `assurer_blocked` FROM `users` WHERE `id` = \''.(int)intval($userID).'\'');
156->		$row = mysql_fetch_assoc($query);


/home/gitRepos/CAcert/CAcert-devel/includes/lib/l10n.php

173->			// mysql_real_escape() or escapeshellarg(), but take care of
363->		$res = mysql_query($query);
364->		if (mysql_num_rows($res)>=0) {
365->			$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/includes/lib/account.php

58->	$query = mysql_query($sql);
94->	$query = mysql_query($sql);


/home/gitRepos/CAcert/CAcert-devel/includes/general_stuff.php

72->	$res = mysql_query($query);
73->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/includes/loggedin.php

47->		$_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($uid)."'"));
73->			$_SESSION['profile'] = mysql_fetch_assoc(mysql_query(
106->		$res = mysql_query($query);
107->		$row = mysql_fetch_assoc($res);
114->			mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/includes/mysql.php.sample

19->	$_SESSION['mconn'] = mysql_connect("127.0.0.1", "username", "password");
22->		mysql_select_db("database");


/home/gitRepos/CAcert/CAcert-devel/includes/notary.inc.php

24->		return mysql_query($query);
29->		$row1 = mysql_fetch_assoc($res);
35->		return intval(mysql_num_rows($resultset));
128->		return mysql_fetch_assoc($res);
136->		return mysql_num_rows($res);
590->		while($row = mysql_fetch_assoc($res))
620->		while($row = mysql_fetch_assoc($res))
664->		while($row = mysql_fetch_assoc($res))
677->		while($row = mysql_fetch_assoc($res))
863->			",`document`='".mysql_real_escape_string($document)."',`date`=NOW(), `active`=".intval($active).",`method`='".mysql_real_escape_string($method)."',`comment`='".mysql_real_escape_string($comment)."'" ;
864->		$res = mysql_query($query);
876->			WHERE u.`document` = '" . mysql_real_escape_string($type) . "' AND u.`memid`=" . intval($memid) ;
877->		$res = mysql_query($query);
878->		if(mysql_num_rows($res) <=0){
900->			$filter .= " AND u.`document` = '".mysql_real_escape_string($type)."'";
911->		$res = mysql_query($query);
912->		if(mysql_num_rows($res) >0){
913->			$rec = mysql_fetch_assoc($res);
935->			$filter .= " AND u.`document` = '".mysql_real_escape_string($type)."'";
946->		$res = mysql_query($query);
947->		if(mysql_num_rows($res) >0){
948->			$rec = mysql_fetch_assoc($res);
969->		$filter .= " AND u.`document` = '".mysql_real_escape_string($type)."'";
980->	return mysql_query($query);
994->			$filter = " and `document` = '" . mysql_real_escape_string($type) . "'";
996->		mysql_query("delete from `user_agreements` where `memid`=" . intval($memid) . $filter );
1098->		mysql_query($query);
1109->		mysql_query(
1120->		$arbno = mysql_real_escape_string($arbno);
1131->		mysql_query("update `users` set `password`=sha1('".$password."') where `id`='".$id."'");
1135->		mysql_query($query);
1136->		$emailid = mysql_insert_id();
1140->		mysql_query($query);
1144->		$res=mysql_query($query);
1145->		while($row = mysql_fetch_assoc($res)){
1151->		$res=mysql_query($query);
1152->		while($row = mysql_fetch_assoc($res)){
1157->		mysql_query(
1167->		mysql_query($query);
1171->		mysql_query($query);
1175->		mysql_query("update `users` set `language`='en_AU' where `id`='".$id."'");
1177->		mysql_query("delete from `addlang` where `userid`='".$id."'");
1189->			mysql_query($query);
1199->		mysql_query($query);
1202->		mysql_query(
1217->		mysql_query("update `users` set `locked`='1' where `id`='$id'");  //, `deleted`=Now()
1224->		$email = mysql_real_escape_string($email);
1226->		$res = mysql_query($query);
1227->		return mysql_num_rows($res) > 0;
1239->		$res = mysql_query($query);
1240->		return mysql_num_rows($res) > 0;
1254->		$res = mysql_query($query1);
1255->		$r1 = mysql_num_rows($res)>0;
1256->		$res = mysql_query($query2);
1257->		$r2 = mysql_num_rows($res)>0;
1290->		$res = mysql_query($query1);
1291->		$r1 = mysql_num_rows($res)>0;
1292->		$res = mysql_query($query2);
1293->		$r2 = mysql_num_rows($res)>0;
1301->		$res = mysql_query($query);
1302->		return mysql_num_rows($res) > 0;
1314->		$dres = mysql_query($query);
1315->		while($drow = mysql_fetch_assoc($dres)){
1316->			mysql_query("update `emailcerts` set `revoked`='1970-01-01 10:00:01', `disablelogin`=1 where `id`='".$drow['id']."'");
1332->		$dres = mysql_query($query);
1333->		while($drow = mysql_fetch_assoc($dres))
1335->			mysql_query(
1348->		$res=mysql_query($query);
1349->		while($row = mysql_fetch_assoc($res)){
1355->		$res=mysql_query($query);
1356->		while($row = mysql_fetch_assoc($res)){
1418->	$type = mysql_real_escape_string($type);
1419->	$info = mysql_real_escape_string($info);
1422->	return mysql_query($query);
1456->	return mysql_query($query);
1465->	return mysql_fetch_assoc(mysql_query("select * from `alerts` where `memid`='".intval($userid)."'"));
1483->		$filter .= " and `email`!='".mysql_real_escape_string($exclude)."'";
1486->	return mysql_query($query);
1503->	return mysql_query($query);
1518->	return mysql_query($query);
1532->	return mysql_query($query);
1563->	return mysql_query($query);
1593->	return mysql_query($query);
1614->	return mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/includes/account_stuff.php

209-><? if(mysql_num_rows(mysql_query("select * from `org` where `memid`='".intval($_SESSION['profile']['id'])."'")) > 0 || $_SESSION['profile']['orgadmin'] == 1) { ?>
219-><? if(mysql_num_rows(mysql_query("select * from `org` where `memid`='".intval($_SESSION['profile']['id'])."'")) > 0 || $_SESSION['profile']['orgadmin'] == 1) { ?>


/home/gitRepos/CAcert/CAcert-devel/includes/general.php

82->		$locked = mysql_fetch_assoc(mysql_query("select `locked` from `users` where `id`='".intval($_SESSION['profile']['id'])."'"));
86->			$res = mysql_query($query);
87->			$row = mysql_fetch_assoc($res);
289->				$dom = mysql_real_escape_string($dom);
291->				$res = mysql_query($query);
292->				if(mysql_num_rows($res) > 0)
295->					$_SESSION['_config']['row'] = mysql_fetch_assoc($res);
347->				$dom = mysql_real_escape_string($dom);
349->				$res = mysql_query($query);
350->				if(mysql_num_rows($res) > 0)
353->					$_SESSION['_config']['altrow'] = mysql_fetch_assoc($res);
391->				$dom = mysql_real_escape_string($dom);
397->				$res = mysql_query($query);
398->				if(mysql_num_rows($res) > 0)
400->					$_SESSION['_config']['row'] = mysql_fetch_assoc($res);
443->				$dom = mysql_real_escape_string($dom);
449->				$res = mysql_query($query);
450->				if(mysql_num_rows($res) > 0)
452->					$_SESSION['_config']['altrow'] = mysql_fetch_assoc($res);
479->			$dom = mysql_real_escape_string($dom);
485->			$res = mysql_query($query);
486->			if(mysql_num_rows($res) > 0)
488->				$_SESSION['_config']['row'] = mysql_fetch_assoc($res);
501->		$row = mysql_fetch_assoc(mysql_query($query));
506->		if(mysql_num_rows(mysql_query($query)) < 1)
557->		$myemail = mysql_real_escape_string($email);
667->					$line = mysql_real_escape_string(trim(strip_tags($line)));
670->					mysql_query($query);
681->		mysql_query($query);
702->			$res = mysql_query($query);
703->			if(mysql_num_rows($res) > 0)
715->			$res = mysql_query($query);
718->			if(mysql_num_rows($res) > 0)
745->		mysql_query($query);
746->		$ticket = mysql_insert_id();
874->	  * The resource returned by mysql_query is
877->	  * It should be safe to replace every mysql_query
878->	  * call by a mysql_extended_query call.
880->	function mysql_timed_query($sql)
884->		$res = mysql_query($sql);


/home/gitRepos/CAcert/CAcert-devel/includes/account.php

123->		if(trim(mysql_real_escape_string(stripslashes($_REQUEST['newemail']))) == "")
131->		$_REQUEST['email'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['newemail'])));
155->		mysql_query($query);
156->		$emailid = mysql_insert_id();
175->		$res = mysql_query($query);
176->		if(mysql_num_rows($res) <= 0)
183->		$row = mysql_fetch_assoc($res);
194->		$query = "update `users` set `email`='".mysql_real_escape_string($row['email'])."' where `id`='".intval($_SESSION['profile']['id'])."'";
195->		mysql_query($query);
219->						`email`!='".mysql_real_escape_string($_SESSION['profile']['email'])."'";
220->				$res = mysql_query($query);
221->				if(mysql_num_rows($res) > 0)
223->					$row = mysql_fetch_assoc($res);
329->				$res = mysql_query("select * from `email` where `memid`='".intval($_SESSION['profile']['id'])."' and `id`='".intval($id)."'");
330->				if(mysql_num_rows($res) > 0)
332->					$row = mysql_fetch_assoc($res);
348->			$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($_SESSION['profile']['id'])."'"));
392->						`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
393->						`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
394->			mysql_query($query);
395->			$emailid = mysql_insert_id();
398->				mysql_query("insert into `emaillink` set `emailcertsid`='$emailid', `emailid`='$addy'");
414->			mysql_query("update `emailcerts` set `csr_name`='$CSRname' where `id`='".intval($emailid)."'");
437->			$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($_SESSION['profile']['id'])."'"));
453->				$res = mysql_query("select * from `email` where `memid`='".intval($_SESSION['profile']['id'])."' and `id`='".intval($id)."'");
454->				if(mysql_num_rows($res) > 0)
456->					$row = mysql_fetch_assoc($res);
493->						`subject`='".mysql_real_escape_string($csrsubject)."',
497->						`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
498->						`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
499->			mysql_query($query);
500->			$emailid = mysql_insert_id();
503->				mysql_query("insert into `emaillink` set `emailcertsid`='$emailid', `emailid`='".mysql_real_escape_string($addy)."'");
508->			mysql_query("update `emailcerts` set `csr_name`='$CSRname' where `id`='$emailid'");
512->		$res = mysql_query($query);
513->		if(mysql_num_rows($res) <= 0)
550->		$newdomain = mysql_real_escape_string(trim($newdomain));
552->		$res1 = mysql_query("select * from `orgdomains` where `domain`='$newdomain'");
554->		$res2 = mysql_query($query);
555->		if(mysql_num_rows($res1) > 0 || mysql_num_rows($res2))
582->					$addy[] = trim(mysql_real_escape_string(stripslashes($line)));
600->					$addy[] = trim(mysql_real_escape_string(stripslashes($line)));
609->		$_SESSION['_config']['domain'] = mysql_real_escape_string($newdomain);
618->		$authaddy = trim(mysql_real_escape_string(stripslashes($_REQUEST['authaddy'])));
636->		$query = "select * from `domains` where `domain`='".mysql_real_escape_string($_SESSION['_config']['domain'])."' and `deleted`=0";
637->		$res = mysql_query($query);
638->		if(mysql_num_rows($res) > 0)
662->		$query = "insert into `domains` set `domain`='".mysql_real_escape_string($_SESSION['_config']['domain'])."',
664->		mysql_query($query);
665->		$domainid = mysql_insert_id();
692->				$res = mysql_query($query);
693->				if(mysql_num_rows($res) > 0)
695->					$row = mysql_fetch_assoc($res);
813->						`CN`='".mysql_real_escape_string($_SESSION['_config']['rows']['0'])."',
814->						`domid`='".mysql_real_escape_string($_SESSION['_config']['rowid']['0'])."',
815->						`created`=NOW(),`subject`='".mysql_real_escape_string($subject)."',
816->						`rootcert`='".mysql_real_escape_string($_SESSION['_config']['rootcert'])."',
817->						`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
818->						`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
821->						`CN`='".mysql_real_escape_string($_SESSION['_config']['altrows']['0'])."',
822->						`domid`='".mysql_real_escape_string($_SESSION['_config']['altid']['0'])."',
823->						`created`=NOW(),`subject`='".mysql_real_escape_string($subject)."',
824->						`rootcert`='".mysql_real_escape_string($_SESSION['_config']['rootcert'])."',
825->						`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
826->						`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
834->		mysql_query($query);
835->		$CSRid = mysql_insert_id();
839->				mysql_query("insert into `domlink` set `certid`='$CSRid', `domid`='$dom'");
842->			mysql_query("insert into `domlink` set `certid`='$CSRid', `domid`='$dom'");
847->		mysql_query("update `domaincerts` set `CSR_name`='$CSRname' where `id`='$CSRid'");
850->		$res = mysql_query($query);
851->		if(mysql_num_rows($res) <= 0)
881->				$res = mysql_query($query);
882->				if(mysql_num_rows($res) <= 0)
888->				$row = mysql_fetch_assoc($res);
897->				mysql_query("update `domaincerts` set `renewed`='1' where `id`='$id'");
900->						`CN`='".mysql_real_escape_string($row['CN'])."',
901->						`subject`='".mysql_real_escape_string($row['subject'])."',".
903->						"`created`='".mysql_real_escape_string($row['created'])."',
907->						`pkhash`='".mysql_real_escape_string($row['pkhash'])."',
908->						`description`='".mysql_real_escape_string($row['description'])."'";
909->				mysql_query($query);
910->				$newid = mysql_insert_id();
932->				$subject = mysql_real_escape_string($subject);
933->				mysql_query("update `domaincerts` set `subject`='$subject',`csr_name`='$newfile' where `id`='$newid'");
938->				$res = mysql_query($query);
939->				if(mysql_num_rows($res) <= 0)
943->					$drow = mysql_fetch_assoc($res);
974->				$res = mysql_query($query);
975->				if(mysql_num_rows($res) <= 0)
980->				$row = mysql_fetch_assoc($res);
986->				mysql_query("update `domaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='$id'");
1009->				$res = mysql_query($query);
1010->				if(mysql_num_rows($res) <= 0)
1015->				$row = mysql_fetch_assoc($res);
1021->				mysql_query("delete from `domaincerts` where `id`='$id'");
1039->				$comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
1040->				mysql_query("update `domaincerts` set `description`='$comment' where `id`='$cid'");
1060->				$res = mysql_query($query);
1061->				if(mysql_num_rows($res) <= 0)
1067->				$row = mysql_fetch_assoc($res);
1076->				mysql_query("update `emailcerts` set `renewed`='1' where `id`='$id'");
1079->						`CN`='".mysql_real_escape_string($row['CN'])."',
1080->						`subject`='".mysql_real_escape_string($row['subject'])."',
1081->						`keytype`='".mysql_real_escape_string($row['keytype'])."',
1082->						`csr_name`='".mysql_real_escape_string($row['csr_name'])."',
1083->						`created`='".mysql_real_escape_string($row['created'])."',
1088->						`description`='".mysql_real_escape_string($row['description'])."'";
1089->				mysql_query($query);
1090->				$newid = mysql_insert_id();
1093->				mysql_query("update `emailcerts` set `csr_name`='$newfile' where `id`='$newid'");
1094->				$res = mysql_query("select * from `emaillink` where `emailcertsid`='".$row['id']."'");
1095->				while($r2 = mysql_fetch_assoc($res))
1097->					mysql_query("insert into `emaillink` set `emailid`='".$r2['emailid']."',
1102->				$res = mysql_query($query);
1103->				if(mysql_num_rows($res) <= 0)
1134->				$res = mysql_query($query);
1135->				if(mysql_num_rows($res) <= 0)
1140->				$row = mysql_fetch_assoc($res);
1146->				mysql_query("update `emailcerts` set `revoked`='1970-01-01 10:00:01' where `id`='$id'");
1166->				$res = mysql_query($query);
1167->				if(mysql_num_rows($res) <= 0)
1172->				$row = mysql_fetch_assoc($res);
1178->				mysql_query("delete from `emailcerts` where `id`='$id'");
1197->				mysql_query("update `emailcerts` set `disablelogin`='$dis' where `id`='$cid' and `memid`='".intval($_SESSION['profile']['id'])."'");
1203->					$comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
1204->					mysql_query("update `emailcerts` set `description`='$comment' where `id`='$cid' and `memid`='".intval($_SESSION['profile']['id'])."'");
1218->		$_SESSION['_config']['user']['Q1'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['Q1']))));
1219->		$_SESSION['_config']['user']['Q2'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['Q2']))));
1220->		$_SESSION['_config']['user']['Q3'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['Q3']))));
1221->		$_SESSION['_config']['user']['Q4'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['Q4']))));
1222->		$_SESSION['_config']['user']['Q5'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['Q5']))));
1223->		$_SESSION['_config']['user']['A1'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['A1']))));
1224->		$_SESSION['_config']['user']['A2'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['A2']))));
1225->		$_SESSION['_config']['user']['A3'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['A3']))));
1226->		$_SESSION['_config']['user']['A4'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['A4']))));
1227->		$_SESSION['_config']['user']['A5'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['A5']))));
1279->		$ddres = mysql_query($ddquery);
1280->		$ddrow = mysql_fetch_assoc($ddres);
1285->			$_SESSION['_config']['user']['fname'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['fname']))));
1286->			$_SESSION['_config']['user']['mname'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['mname']))));
1287->			$_SESSION['_config']['user']['lname'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['lname']))));
1288->			$_SESSION['_config']['user']['suffix'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['suffix']))));
1319->			mysql_query($query);
1333->			mysql_query($query);
1337->		$_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($_SESSION['profile']['id'])."'"));
1341->		$ddres = mysql_query($ddquery);
1342->		$ddrow = mysql_fetch_assoc($ddres);
1355->		$_SESSION['_config']['user']['oldpass'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['oldpassword'])));
1356->		$_SESSION['_config']['user']['pword1'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['pword1'])));
1357->		$_SESSION['_config']['user']['pword2'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['pword2'])));
1374->				$match = mysql_query("select * from `users` where `id`='".intval($_SESSION['profile']['id'])."' and
1377->				$rc = mysql_num_rows($match);
1395->				mysql_query("update `users` set `password`=sha1('".$_SESSION['_config']['user']['pword1']."')
1420->			$val = mysql_real_escape_string(stripslashes(trim($val)));
1437->		$_SESSION['_config']['name'] = mysql_real_escape_string(stripslashes(trim($_REQUEST['name'])));
1507->				$emails .= "organizationalUnitName = ".mysql_real_escape_string($_SESSION['_config']['OU'])."\n";
1532->						`ou`='".mysql_real_escape_string($_SESSION['_config']['OU'])."',
1538->						`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
1539->						`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
1540->			mysql_query($query);
1541->			$emailid = mysql_insert_id();
1544->				mysql_query("insert into `domemaillink` set `emailcertsid`='$emailid', `emailid`='$addy'");
1561->			mysql_query("update `orgemailcerts` set `csr_name`='$CSRname' where `id`='$emailid'");
1632->						`ou`='".mysql_real_escape_string($_SESSION['_config']['OU'])."',
1636->						`subject`='".mysql_real_escape_string($csrsubject)."',
1639->						`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
1640->						`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
1641->			mysql_query($query);
1642->			$emailid = mysql_insert_id();
1645->				mysql_query("insert into `domemaillink` set `emailcertsid`='$emailid', `emailid`='$addy'");
1651->			mysql_query("update `orgemailcerts` set `csr_name`='$CSRname' where `id`='$emailid'");
1655->		$res = mysql_query($query);
1656->		if(mysql_num_rows($res) <= 0)
1684->				$res = mysql_query($query);
1685->				if(mysql_num_rows($res) <= 0)
1691->				$row = mysql_fetch_assoc($res);
1700->				mysql_query("update `orgemailcerts` set `renewed`='1' where `id`='$id'");
1708->						`CN`='".mysql_real_escape_string($row['CN'])."',
1709->						`ou`='".mysql_real_escape_string($row['ou'])."',
1710->						`subject`='".mysql_real_escape_string($row['subject'])."',
1711->						`keytype`='".mysql_real_escape_string($row['keytype'])."',
1712->						`csr_name`='".mysql_real_escape_string($row['csr_name'])."',
1713->						`created`='".mysql_real_escape_string($row['created'])."',
1717->						`description`='".mysql_real_escape_string($row['description'])."'";
1718->				mysql_query($query);
1719->				$newid = mysql_insert_id();
1722->				mysql_query("update `orgemailcerts` set `csr_name`='$newfile' where `id`='$newid'");
1725->				$res = mysql_query($query);
1726->				if(mysql_num_rows($res) > 0)
1757->				$res = mysql_query($query);
1758->				if(mysql_num_rows($res) <= 0)
1763->				$row = mysql_fetch_assoc($res);
1769->				mysql_query("update `orgemailcerts` set `revoked`='1970-01-01 10:00:01' where `id`='$id'");
1790->				$res = mysql_query($query);
1791->				if(mysql_num_rows($res) <= 0)
1796->				$row = mysql_fetch_assoc($res);
1802->				mysql_query("delete from `orgemailcerts` where `id`='$id'");
1820->				$comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
1821->				mysql_query("update `orgemailcerts` set `description`='$comment' where `id`='$cid'");
1882->				`orgdomains`.`domain`='".mysql_real_escape_string($_SESSION['_config']['0.CN'])."'";
1883->		$_SESSION['_config']['CNorg'] = mysql_fetch_assoc(mysql_query($query));
1888->				`orgdomains`.`domain`='".mysql_real_escape_string($_SESSION['_config']['0.subjectAltName'])."'";
1889->		$_SESSION['_config']['SANorg'] = mysql_fetch_assoc(mysql_query($query));
1949->		$org = mysql_fetch_assoc(mysql_query($query));
1975->					`CN`='".mysql_real_escape_string($_SESSION['_config']['rows']['0'])."',
1978->					`subject`='".mysql_real_escape_string($csrsubject)."',
1980->					`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
1982->					`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
1985->					`CN`='".mysql_real_escape_string($_SESSION['_config']['altrows']['0'])."',
1988->					`subject`='".mysql_real_escape_string($csrsubject)."',
1990->					`md`='".mysql_real_escape_string($_SESSION['_config']['hash_alg'])."',
1992->					`description`='".mysql_real_escape_string($_SESSION['_config']['description'])."'";
1994->		mysql_query($query);
1995->		$CSRid = mysql_insert_id();
2000->		mysql_query("update `orgdomaincerts` set `CSR_name`='$CSRname' where `id`='$CSRid'");
2003->				mysql_query("insert into `orgdomlink` set `orgdomid`='".intval($id)."', `orgcertid`='$CSRid'");
2006->				mysql_query("insert into `orgdomlink` set `orgdomid`='".intval($id)."', `orgcertid`='$CSRid'");
2009->		$res = mysql_query($query);
2010->		if(mysql_num_rows($res) <= 0)
2038->				$res = mysql_query($query);
2039->				if(mysql_num_rows($res) <= 0)
2045->				$row = mysql_fetch_assoc($res);
2054->				mysql_query("update `orgdomaincerts` set `renewed`='1' where `id`='$id'");
2062->						`CN`='".mysql_real_escape_string($row['CN'])."',
2063->						`csr_name`='".mysql_real_escape_string($row['csr_name'])."',
2064->						`created`='".mysql_real_escape_string($row['created'])."',
2066->						`subject`='".mysql_real_escape_string($row['subject'])."',
2069->						`description`='".mysql_real_escape_string($row['description'])."'";
2070->				mysql_query($query);
2071->				$newid = mysql_insert_id();
2075->				mysql_query("update `orgdomaincerts` set `csr_name`='$newfile' where `id`='$newid'");
2077->				$res = mysql_query("select * from `orgdomlink` where `orgcertid`='".$row['id']."'");
2078->				while($r2 = mysql_fetch_assoc($res))
2079->					mysql_query("insert into `orgdomlink` set `orgdomid`='".intval($r2['orgdomid'])."', `orgcertid`='$newid'");
2082->				$res = mysql_query($query);
2083->				if(mysql_num_rows($res) <= 0)
2087->					$drow = mysql_fetch_assoc($res);
2117->				$res = mysql_query($query);
2118->				if(mysql_num_rows($res) <= 0)
2123->				$row = mysql_fetch_assoc($res);
2129->				mysql_query("update `orgdomaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='$id'");
2152->				$res = mysql_query($query);
2153->				if(mysql_num_rows($res) <= 0)
2158->				$row = mysql_fetch_assoc($res);
2164->				mysql_query("delete from `orgdomaincerts` where `id`='$id'");
2182->				$comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
2183->				mysql_query("update `orgdomaincerts` set `description`='$comment' where `id`='$cid'");
2222->		$_SESSION['_config']['O'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['O'])));
2223->		$_SESSION['_config']['contact'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['contact'])));
2224->		$_SESSION['_config']['L'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['L'])));
2225->		$_SESSION['_config']['ST'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['ST'])));
2226->		$_SESSION['_config']['C'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['C'])));
2227->		$_SESSION['_config']['comments'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['comments'])));
2233->			mysql_query("insert into `orginfo` set `O`='".$_SESSION['_config']['O']."',
2250->		$_SESSION['_config']['O'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['O'])));
2251->		$_SESSION['_config']['contact'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['contact'])));
2252->		$_SESSION['_config']['L'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['L'])));
2253->		$_SESSION['_config']['ST'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['ST'])));
2254->		$_SESSION['_config']['C'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['C'])));
2255->		$_SESSION['_config']['comments'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['comments'])));
2261->			mysql_query("update `orginfo` set `O`='".$_SESSION['_config']['O']."',
2277->		$domain = $_SESSION['_config']['domain'] = trim(mysql_real_escape_string(stripslashes($_REQUEST['domainname'])));
2278->		$res1 = mysql_query("select * from `orgdomains` where `domain`='$domain'");
2279->		if(mysql_num_rows($res1) > 0)
2295->		mysql_query("insert into `orgdomains` set `orgid`='".intval($_SESSION['_config']['orgid'])."', `domain`='$domain'");
2305->		$domain = mysql_real_escape_string(stripslashes(trim($_REQUEST['domainname'])));
2307->		$res1 = mysql_query("select * from `orgdomains` where `domain` like '$domain' and `id`!='".intval($domid)."'");
2308->		$res2 = mysql_query("select * from `domains` where `domain` like '$domain' and `deleted`=0");
2309->		if(mysql_num_rows($res1) > 0 || mysql_num_rows($res2) > 0)
2323->		$res = mysql_query($query);
2324->		while($row = mysql_fetch_assoc($res))
2325->			mysql_query("update `orgdomaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='".$row['id']."'");
2331->		$res = mysql_query($query);
2332->		while($row = mysql_fetch_assoc($res))
2333->			mysql_query("update `orgemailcerts` set `revoked`='1970-01-01 10:00:01' where `id`='".intval($row['id'])."'");
2338->		$row = mysql_fetch_assoc(mysql_query("select * from `orgdomains` where `id`='".intval($domid)."'"));
2339->		mysql_query("update `orgdomains` set `domain`='$domain' where `id`='".intval($domid)."'");
2349->		$row = mysql_fetch_assoc(mysql_query("select * from `orgdomains` where `id`='".intval($domid)."'"));
2351->		mysql_query("delete from `orgdomains` where `id`='".intval($domid)."'");
2368->		$dres = mysql_query($query);
2369->		while($drow = mysql_fetch_assoc($dres))
2375->			$res = mysql_query($query);
2376->			while($row = mysql_fetch_assoc($res))
2378->				mysql_query("update `orgdomaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='".intval($row['id'])."'");
2379->				mysql_query("delete from `orgdomaincerts` where `orgid`='".intval($row['id'])."'");
2380->				mysql_query("delete from `orgdomlink` where `domid`='".intval($row['id'])."'");
2387->			$res = mysql_query($query);
2388->			while($row = mysql_fetch_assoc($res))
2390->				mysql_query("update `orgemailcerts` set `revoked`='1970-01-01 10:00:01' where `id`='".intval($row['id'])."'");
2391->				mysql_query("delete from `orgemailcerts` where `id`='".intval($row['id'])."'");
2392->				mysql_query("delete from `orgemaillink` where `domid`='".intval($row['id'])."'");
2395->		mysql_query("delete from `org` where `orgid`='".intval($_SESSION['_config']['orgid'])."'");
2396->		mysql_query("delete from `orgdomains` where `orgid`='".intval($_SESSION['_config']['orgid'])."'");
2397->		mysql_query("delete from `orginfo` where `id`='".intval($_SESSION['_config']['orgid'])."'");
2409->		$_macc = mysql_num_rows(mysql_query($query));
2422->		$is_orguser = mysql_num_rows(mysql_query($query));
2436->		$res = mysql_query($query);
2437->		if(mysql_num_rows($res) <= 0)
2450->		$_REQUEST['email'] = $_SESSION['_config']['email'] = mysql_real_escape_string(stripslashes(trim($_REQUEST['email'])));
2452->		$comments = $_SESSION['_config']['comments'] = mysql_real_escape_string(stripslashes(trim($_REQUEST['comments'])));
2453->		$res = mysql_query("select * from `users` where `email`='".$_REQUEST['email']."' and `deleted`=0");
2454->		if(mysql_num_rows($res) <= 0)
2460->			$row = mysql_fetch_assoc($res);
2468->				mysql_query(
2473->							`OU`='".mysql_real_escape_string($_SESSION['_config']['OU'])."',
2482->		$res = mysql_query("select * from `org` where `orgid`='$orgid' and `memid`='".intval($_SESSION['profile']['id'])."' and `masteracc`='1'");
2483->		if(mysql_num_rows($res) <= 0)
2492->		mysql_query($query);
2504->		$row = mysql_fetch_assoc(mysql_query("select * from `alerts` where `memid`='".intval($_SESSION['profile']['id'])."'"));
2513->		$rc = mysql_num_rows(mysql_query("select * from `alerts` where `memid`='".intval($_SESSION['profile']['id'])."'"));
2528->		mysql_query($query);
2536->		$lang = mysql_real_escape_string($_REQUEST['lang']);
2541->				mysql_query("update `users` set `language`='$lang' where `id`='".intval($_SESSION['profile']['id'])."'");
2559->		$addlang = mysql_real_escape_string($_REQUEST['addlang']);
2561->		mysql_query("insert into `addlang` set `userid`='".intval($_SESSION['profile']['id'])."', `lang`='$addlang'");
2571->		$remove = mysql_real_escape_string($_REQUEST['remove']);
2572->		mysql_query("delete from `addlang` where `userid`='".intval($_SESSION['profile']['id'])."' and `lang`='$remove'");
2607->		$name = array_key_exists('name',$_REQUEST)?mysql_real_escape_string(strip_tags($_REQUEST['name'])):"";
2615->			mysql_query($query);
2616->			$row = mysql_fetch_assoc(mysql_query("select * from `locations` where `id`='$locid'"));
2623->			mysql_query($query);
2624->			$row = mysql_fetch_assoc(mysql_query("select * from `regions` where `id`='$regid'"));
2630->			$row = mysql_fetch_assoc(mysql_query("select `ccid` from `regions` where `id`='$regid'"));
2633->			mysql_query($query);
2639->			mysql_query($query);
2640->			$row = mysql_fetch_assoc(mysql_query("select * from `locations` where `id`='$locid'"));
2645->			$row = mysql_fetch_assoc(mysql_query("select * from `locations` where `id`='$locid'"));
2647->			mysql_query("delete from `localias` where `locid`='$locid'");
2648->			mysql_query("delete from `locations` where `id`='$locid'");
2653->			$row = mysql_fetch_assoc(mysql_query("select * from `locations` where `id`='$locid'"));
2655->			mysql_query("update `locations` set `regid`='$newreg' where `id`='$locid'");
2656->			mysql_query("update `users` set `regid`='$newreg' where `regid`='$oldregid'");
2657->			$row = mysql_fetch_assoc(mysql_query("select * from `locations` where `id`='$locid'"));
2663->			$row = mysql_fetch_assoc(mysql_query("select * from `regions` where `id`='$regid'"));
2665->			mysql_query("delete from `locations` where `regid`='$regid'");
2666->			mysql_query("delete from `regions` where `id`='$regid'");
2675->			$row = mysql_query("insert into `localias` set `locid`='$locid',`name`='$name'");
2680->			$row = mysql_query("delete from `localias` where `locid`='$locid' and `name`='$name'");
2717->		$fname = mysql_real_escape_string($_REQUEST['fname']);
2718->		$mname = mysql_real_escape_string($_REQUEST['mname']);
2719->		$lname = mysql_real_escape_string($_REQUEST['lname']);
2720->		$suffix = mysql_real_escape_string($_REQUEST['suffix']);
2725->		mysql_query($query);
2764->		$row = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($_REQUEST['userid'])."'"));
2784->			mysql_query("update `users` set `password`=sha1('".mysql_real_escape_string(stripslashes($_REQUEST['newpass']))."') where `id`='".intval($_REQUEST['userid'])."'");
2785->			$row = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($_REQUEST['userid'])."'"));
2875->		mysql_query($query);
2876->		$CSRid = mysql_insert_id();
2879->			mysql_query("insert into `domlink` set `certid`='$CSRid', `domid`='".intval($dom)."'");
2882->			mysql_query("insert into `domlink` set `certid`='$CSRid', `domid`='".intval($dom)."'");
2888->		mysql_query("update `domaincerts` set `CSR_name`='$CSRname' where `id`='$CSRid'");
2891->		$res = mysql_query($query);
2892->		if(mysql_num_rows($res) <= 0)
2916->		$row = mysql_fetch_assoc(mysql_query($query));
2918->		mysql_query("update `users` set `tverify`='$ver' where `id`='$memid'");
2935->		$row = mysql_fetch_assoc(mysql_query($query));
2937->		mysql_query("update `users` set `assurer`='$ver' where `id`='$memid'");
2953->		$row = mysql_fetch_assoc(mysql_query($query));
2955->		mysql_query("update `users` set `assurer_blocked`='$ver' where `id`='$memid'");
2972->		$row = mysql_fetch_assoc(mysql_query($query));
2974->		mysql_query("update `users` set `locked`='$ver' where `id`='$memid'");
2991->		$row = mysql_fetch_assoc(mysql_query($query));
2993->		mysql_query("update `users` set `codesign`='$ver' where `id`='$memid'");
3010->		$row = mysql_fetch_assoc(mysql_query($query));
3012->		mysql_query("update `users` set `orgadmin`='$ver' where `id`='$memid'");
3029->		$row = mysql_fetch_assoc(mysql_query($query));
3031->		mysql_query("update `users` set `ttpadmin`='$ver' where `id`='$memid'");
3047->		$row = mysql_fetch_assoc(mysql_query($query));
3051->		mysql_query("update `users` set `adadmin`='$ver' where `id`='$memid'");
3067->		$row = mysql_fetch_assoc(mysql_query($query));
3069->		mysql_query("update `users` set `locadmin`='$ver' where `id`='$memid'");
3086->		$row = mysql_fetch_assoc(mysql_query($query));
3088->		mysql_query("update `users` set `admin`='$ver' where `id`='$memid'");
3104->		$row = mysql_fetch_assoc(mysql_query($query));
3106->		mysql_query("update `alerts` set `general`='$ver' where `memid`='$memid'");
3122->		$row = mysql_fetch_assoc(mysql_query($query));
3124->		mysql_query("update `alerts` set `country`='$ver' where `memid`='$memid'");
3140->		$row = mysql_fetch_assoc(mysql_query($query));
3142->		mysql_query("update `alerts` set `regional`='$ver' where `memid`='$memid'");
3158->		$row = mysql_fetch_assoc(mysql_query($query));
3160->		mysql_query("update `alerts` set `radius`='$ver' where `memid`='$memid'");
3172->		$row = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($_REQUEST['userid'])."'"));


/home/gitRepos/CAcert/CAcert-devel/tverify/index/0.php

37->				$account = mysql_query($query);
38->				if(mysql_num_rows($account))
54->		$row = mysql_fetch_assoc($account);
60-> 		$res = mysql_query($query);
61-> 		$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/tverify/index.php

52->		$email = mysql_escape_string(trim($_REQUEST["email"]));
53->		$password = mysql_escape_string(stripslashes(trim($_REQUEST["pword"])));
54->		$URL = mysql_escape_string(trim($_REQUEST["notaryURL"]));
55->		$CN = mysql_escape_string($_SESSION['_config']['CN']);
57->		$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$memid'"));
58->		$tmp = mysql_fetch_assoc(mysql_query("select sum(`points`) as `points` from `notary` where `to`='$memid'"));
91->		if(mysql_num_rows(mysql_query($query)) <= 0)
97->			mysql_query($query);
98->			$tverify = mysql_insert_id();
102->				$newfile = mysql_escape_string('/www/photoid/'.$tverify.".".$ext);
105->				mysql_query($query);
128->			mysql_query("insert into `notary` set `from`='0', `to`='$memid', `points`='$points',
133->		mysql_query("update `tverify` set `modified`=NOW() where `id`='$tverify'");


/home/gitRepos/CAcert/CAcert-devel/www/ac.php

23->	$s = mysql_real_escape_string($_REQUEST['s']);
25->	$id = mysql_real_escape_string(strip_tags($_REQUEST['id']));
30->	$loc = trim(mysql_real_escape_string($bits['0']));
31->	$reg = trim(mysql_real_escape_string($bits['1']));
32->	$ccname = trim(mysql_real_escape_string($bits['2']));
38->	$res = mysql_query($query);
39->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/www/advertising.php

38->		$title = mysql_real_escape_string(strip_tags(trim(htmlentities($_POST['title']))));
39->		$link = mysql_real_escape_string(strip_tags(trim($_POST['link'])));
76->		mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/www/verify.php

46->		$hash = mysql_escape_string(stripslashes($_REQUEST['hash']));
49->		$res = mysql_query($query);
50->		if(mysql_num_rows($res) > 0)
52->			$row = mysql_fetch_assoc($res);
56->				mysql_query("update `email` set `hash`='', `attempts`='$row[attempts]', `deleted`=NOW() where `id`='$emailid'");
62->			mysql_query("update `email` set `attempts`='$row[attempts]' where `id`='$emailid'");
66->		$res = mysql_query($query);
67->		if(mysql_num_rows($res) <= 0)
74->		$row = mysql_fetch_assoc($res);
78->			mysql_query($query);
80->			mysql_query($query);
104->		$hash = mysql_escape_string(stripslashes($_REQUEST['hash']));
107->		$res = mysql_query($query);
108->		if(mysql_num_rows($res) > 0)
110->			$row = mysql_fetch_assoc($res);
121->			mysql_query($query);
125->		$res = mysql_query($query);
126->		if(mysql_num_rows($res) <= 0)
133->		$row = mysql_fetch_assoc($res);
137->			mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/www/sqldump.php

28->    $tables = mysql_query("SHOW TABLES");
29->    while(list($table_name) = mysql_fetch_array($tables))
35->        $create = mysql_fetch_assoc(mysql_query("SHOW CREATE TABLE `$table_name`"));


/home/gitRepos/CAcert/CAcert-devel/www/rss.php

15->	$res = mysql_query($query);
16->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/www/api/edu.php

23->    $serial=mysql_escape_string($_REQUEST["serial"]);
27->    $query= mysql_query($sql); 
28->    if(mysql_num_rows($query) != 1)
34->      $memid = mysql_fetch_assoc($query);


/home/gitRepos/CAcert/CAcert-devel/www/api/cemails.php

18->	$username = mysql_escape_string($_REQUEST['username']);
19->	$password = mysql_escape_string($_REQUEST['password']);
22->	$res = mysql_query($query);
23->	if(mysql_num_rows($res) != 1)
26->	$user = mysql_fetch_assoc($res);
29->	$row = mysql_fetch_assoc(mysql_query($query));
44->	$res = mysql_query($query);
45->	while($row = mysql_fetch_assoc($res)) {


/home/gitRepos/CAcert/CAcert-devel/www/api/ccsr.php

21->	$username = mysql_real_escape_string($_REQUEST['username']);
22->	$password = mysql_real_escape_string($_REQUEST['password']);
25->	$res = mysql_query($query);
26->	if(mysql_num_rows($res) != 1)
28->	$user = mysql_fetch_assoc($res);
33->		$email = mysql_real_escape_string(trim($email));
35->		$res = mysql_query($query);
36->		if(mysql_num_rows($res) > 0)
38->			$row = mysql_fetch_assoc($res);
46->	$row = mysql_fetch_assoc(mysql_query($query));
50->	$newname = mysql_real_escape_string(trim($_REQUEST['name']));
87->	$query = "insert into `emailcerts` set `CN`='".mysql_real_escape_string($user['email'])."', `keytype`='MS',
89->				`subject`='".mysql_real_escape_string($csrsubject)."', `codesign`='".intval($codesign)."'";
90->	mysql_query($query);
91->	$certid = mysql_insert_id();
95->	mysql_query("update `emailcerts` set `csr_name`='$CSRname' where `id`='$certid'");
98->		mysql_query("insert into `emaillink` set `emailcertsid`='$certid', `emailid`='".intval($emailid)."'");
103->	$res = mysql_query($query);
104->	if(mysql_num_rows($res) <= 0)
106->	$cert = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/www/index.php

56->			$_SESSION['lostpw']['A1'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A1']))));
64->			$_SESSION['lostpw']['A2'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A2']))));
72->			$_SESSION['lostpw']['A3'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A3']))));
80->			$_SESSION['lostpw']['A4'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A4']))));
88->			$_SESSION['lostpw']['A5'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A5']))));
95->		$_SESSION['lostpw']['pw1'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['newpass1']))));
96->		$_SESSION['lostpw']['pw2'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['newpass2']))));
122->				mysql_query($query) || die(mysql_error());
133->		$email = $_SESSION['lostpw']['email'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['email']))));
139->		$res = mysql_query($query);
140->		if(mysql_num_rows($res) <= 0)
147->			$_SESSION['lostpw']['user'] = mysql_fetch_assoc($res);
160->			$_SESSION['profile'] = mysql_fetch_assoc(mysql_query(
189->		$email = mysql_escape_string(stripslashes(strip_tags(trim($_REQUEST['email']))));
190->		$pword = mysql_escape_string(stripslashes(trim($_REQUEST['pword'])));
193->		$res = mysql_query($query);
195->		$rateLimit = mysql_num_rows(mysql_query($query)) > 0;
196->		if(mysql_num_rows($res) > 0 && $rateLimit)
200->			$_SESSION['profile'] = mysql_fetch_assoc($res);
202->			mysql_query($query);
208->				mysql_query($query);
214->			$res = mysql_query($query);
215->			$row = mysql_fetch_assoc($res);
238->			mysql_query($query);
243->		$res = mysql_query($query);
244->		if(!$rateLimit || mysql_num_rows($res) <= 0) {
292->		$_SESSION['signup']['email'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['email']))));
293->		$_SESSION['signup']['fname'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['fname']))));
294->		$_SESSION['signup']['mname'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['mname']))));
295->		$_SESSION['signup']['lname'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['lname']))));
296->		$_SESSION['signup']['suffix'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['suffix']))));
300->		$_SESSION['signup']['pword1'] = trim(mysql_escape_string(stripslashes($_REQUEST['pword1'])));
301->		$_SESSION['signup']['pword2'] = trim(mysql_escape_string(stripslashes($_REQUEST['pword2'])));
302->		$_SESSION['signup']['Q1'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['Q1']))));
303->		$_SESSION['signup']['Q2'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['Q2']))));
304->		$_SESSION['signup']['Q3'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['Q3']))));
305->		$_SESSION['signup']['Q4'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['Q4']))));
306->		$_SESSION['signup']['Q5'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['Q5']))));
307->		$_SESSION['signup']['A1'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A1']))));
308->		$_SESSION['signup']['A2'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A2']))));
309->		$_SESSION['signup']['A3'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A3']))));
310->		$_SESSION['signup']['A4'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A4']))));
311->		$_SESSION['signup']['A5'] = trim(mysql_escape_string(stripslashes(strip_tags($_REQUEST['A5']))));
406->			$res1 = mysql_query($query);
409->			$res2 = mysql_query($query);
410->			if(mysql_num_rows($res1) > 0 || mysql_num_rows($res2) > 0)
417->			$res = mysql_query($query);
418->			if(mysql_num_rows($res) > 0)
420->				$domain = mysql_fetch_assoc($res);
465->			mysql_query($query);
466->			$memid = mysql_insert_id();
471->			mysql_query($query);
472->			$emailid = mysql_insert_id();
478->			mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/www/gpg.php

83->	if(mysql_num_rows(mysql_query("select * from `email` where `memid`='".$_SESSION['profile']['id']."' and `email`='".mysql_real_escape_string($email)."' and `deleted`=0 and `hash`=''")) > 0) return 1;
317->			$description= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
321->						`email`='".mysql_real_escape_string($lastvalidemail)."',
323->						`expires`='".mysql_real_escape_string($expires)."',
324->						`multiple`='".mysql_real_escape_string($multiple)."',
325->						`keyid`='".mysql_real_escape_string($keyid)."',
326->						`description`='".mysql_real_escape_string($description)."'";
327->		mysql_query($query);
328->		$insert_id = mysql_insert_id();
530->		mysql_query("update `gpg` set `csr`='$csrname' where `id`='$insert_id'");
536->		$res = mysql_query($query);
537->		if(mysql_num_rows($res) <= 0)
559->				$comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
560->				mysql_query("update `gpg` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");


/home/gitRepos/CAcert/CAcert-devel/www/stats.php

28->		$res = mysql_query($sql);
29->		if ($res && mysql_numrows($res) > 0) {
30->			$ar = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/www/wot.php

137->				mysql_escape_string(stripslashes($_POST['country'])).".\n\n";
184->		$query = "select * from `users` where `email`='".mysql_escape_string(stripslashes($_POST['email']))."' and `deleted`=0";
185->		$res = mysql_query($query);
186->		if(mysql_num_rows($res) != 1)
194->			$_SESSION['_config']['notarise'] = mysql_fetch_assoc($res);
212->		$query = "select * from `users` where `email`='".mysql_escape_string(stripslashes($_POST['email']))."' and `locked`=1";
213->		$res = mysql_query($query);
214->		if(mysql_num_rows($res) >= 1)
239->		$res = mysql_query($query);
240->		if(mysql_num_rows($res) > 0)
324->		$res = mysql_query($query);
325->		$row = mysql_fetch_assoc($res);
346->		$res = mysql_query($query);
347->		$drow = mysql_fetch_assoc($res);
358->		if(mysql_real_escape_string(stripslashes($_POST['date'])) == "")
364->						`location`='".mysql_real_escape_string(stripslashes($_POST['location']))."' AND
365->						`date`='".mysql_real_escape_string(stripslashes($_POST['date']))."' AND
367->		$res = mysql_query($query);
368->		if(mysql_num_rows($res) > 0)
380->						`location`='".mysql_real_escape_string(stripslashes($_POST['location']))."',
381->						`date`='".mysql_real_escape_string(stripslashes($_POST['date']))."',
391->		mysql_query($query);
405->							`location`='".mysql_real_escape_string(stripslashes($_POST['location']))."',
406->							`date`='".mysql_real_escape_string(stripslashes($_POST['date']))."',
409->			mysql_query($query);
464->		$info = mysql_real_escape_string(strip_tags(stripslashes($_POST['contactinfo'])));
473->		mysql_query($query);
493->			$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($userid)."' and `listme`=1"));
494->			$points = mysql_num_rows(mysql_query("select sum(`points`) as `total` from `notary`


/home/gitRepos/CAcert/CAcert-devel/www/disputes.php

31->		$hash = mysql_escape_string(trim($_SESSION['_config']['hash']));
33->		$res = mysql_query("select * from `disputeemail` where `id`='$emailid' and `hash`='$hash'");
34->		if(mysql_num_rows($res) <= 0)
41->		$row = mysql_fetch_assoc($res);
46->			mysql_query("update `disputeemail` set hash='',action='reject' where `id`='".intval($emailid)."'");
58->			$res = mysql_query($query);
59->			if(mysql_num_rows($res) > 0)
61->				$row = mysql_fetch_assoc($res);
65->			mysql_query("update `disputeemail` set hash='',action='accept' where `id`='$emailid'");
66->			$rc = mysql_num_rows(mysql_query("select * from `domains` where `memid`='$oldmemid' and `deleted`=0"));
67->			$rc2 = mysql_num_rows(mysql_query("select * from `email` where `memid`='$oldmemid' and `deleted`=0 and `id`!='$emailid'"));
68->			$res = mysql_query("select * from `users` where `id`='$oldmemid'");
69->			$user = mysql_fetch_assoc($res);
72->				mysql_query("update `users` set `deleted`=NOW() where `id`='$oldmemid'");
84->		$hash = trim(mysql_escape_string(stripslashes($_REQUEST['hash'])));
93->		$res = mysql_query("select * from `disputeemail` where `id`='$emailid' and `hash`='$hash'");
94->		if(mysql_num_rows($res) <= 0)
96->			$res = mysql_query("select * from `disputeemail` where `id`='$emailid' and hash!=''");
97->			if(mysql_num_rows($res) > 0)
99->				$row = mysql_fetch_assoc($res);
100->				mysql_query("update `disputeemail` set `attempts`='".intval($row['attempts'] + 1)."' where `id`='".$row['id']."'");
105->					mysql_query("update `disputeemail` set hash='',action='failed' where `id`='$emailid'");
119->		$row = mysql_fetch_assoc(mysql_query("select * from `disputeemail` where `id`='$emailid'"));
130->		$hash = mysql_escape_string(trim($_SESSION['_config']['hash']));
132->		$res = mysql_query("select * from `disputedomain` where `id`='$domainid' and `hash`='$hash'");
133->		if(mysql_num_rows($res) <= 0)
143->			mysql_query("update `disputedomain` set hash='',action='reject' where `id`='$domainid'");
156->			$res = mysql_query($query);
157->			if(mysql_num_rows($res) > 0)
162->			mysql_query("update `disputedomain` set hash='',action='accept' where `id`='$domainid'");
171->		$hash = trim(mysql_escape_string(stripslashes($_REQUEST['hash'])));
180->		$res = mysql_query("select * from `disputedomain` where `id`='$domainid' and `hash`='$hash'");
181->		if(mysql_num_rows($res) <= 0)
183->			$res = mysql_query("select * from `disputedomain` where `id`='$domainid' and hash!=''");
184->			if(mysql_num_rows($res) > 0)
186->				$row = mysql_fetch_assoc($res);
187->				mysql_query("update `disputedomain` set `attempts`='".intval($row['attempts'] + 1)."' where `id`='".$row['id']."'");
192->					mysql_query("update `disputedomain` set hash='',action='failed' where `id`='$domainid'");
206->		$row = mysql_fetch_assoc(mysql_query("select * from `disputedomain` where `id`='$domainid'"));
217->		$email = trim(mysql_escape_string(stripslashes($_REQUEST['dispute'])));
227->		$res = mysql_query("select 1 from `email`, `users` where `email`.`email`='$email' and `email`.`memid`=`users`.`id` and (`users`.`assurer_blocked`=1 or `users`.`locked`=1)");
228->		if(mysql_num_rows($res) > 0)
243->		$res = mysql_query("select * from `disputeemail` where `email`='$email' and hash!=''");
244->		if(mysql_num_rows($res) > 0)
254->		$res = mysql_query($query);
255->		if(mysql_num_rows($res) <= 0)
262->		$row = mysql_fetch_assoc($res);
273->		$res = mysql_query("select * from `users` where `id`='$oldmemid'");
274->		$user = mysql_fetch_assoc($res);
275->		$rc = mysql_num_rows(mysql_query("select * from `domains` where `memid`='$oldmemid' and `deleted`=0"));
276->		$rc2 = mysql_num_rows(mysql_query("select * from `email` where `memid`='$oldmemid' and `deleted`=0 and `id`!='$emailid'"));
289->		mysql_query($query);
310->		$domain = trim(mysql_escape_string(stripslashes($_REQUEST['dispute'])));
320->		$res = mysql_query("select 1 from `domains`, `users` where `domains`.`domain`='$domain' and `domains`.`memid`=`users`.`id` and (`users`.`assurer_blocked`=1 or `users`.`locked`=1)");
321->		if(mysql_num_rows($res) > 0)
337->		$res = mysql_query($query);
338->		if(mysql_num_rows($res) > 0)
347->		$res = mysql_query($query);
348->		if(mysql_num_rows($res) <= 0)
351->			$res = mysql_query($query);
352->			if(mysql_num_rows($res) > 0)
364->		$row = mysql_fetch_assoc($res);
392->                                        $addy[] = trim(mysql_escape_string(stripslashes($line)));
409->                                        $addy[] = trim(mysql_escape_string(stripslashes($line)));
426->                $authaddy = trim(mysql_escape_string(stripslashes($_REQUEST['authaddy'])));
437->                $res = mysql_query($query);
438->                if(mysql_num_rows($res) <= 0)
449->		$domain = mysql_escape_string($_SESSION['_config']['domain']);
454->		mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/www/cats/cats_import.php

88->$query = mysql_query('SELECT `id` FROM `cats_type` WHERE `type_text` = \''.mysql_real_escape_string($type).'\';');
95->if (mysql_num_rows($query) > 0) {
96->  $result = mysql_fetch_array($query);
99->  $query = mysql_query('INSERT INTO `cats_type` (`type_text`) VALUES (\''.mysql_real_escape_string($type).'\');');
106->  $typeID = mysql_insert_id();
109->$query = mysql_query('SELECT `id` FROM `cats_variant` WHERE `type_id` = \''.(int)intval($typeID).'\' AND `test_text` = \''.mysql_real_escape_string($variant).'\';');
116->if (mysql_num_rows($query) > 0) {
117->  $result = mysql_fetch_array($query);
120->  $query = mysql_query('INSERT INTO `cats_variant` (`type_id`, `test_text`) VALUES (\''.(int)intval($typeID).'\', \''.mysql_real_escape_string($variant).'\');');
127->  $variantID = mysql_insert_id();
131->$query = mysql_query('SELECT `ec`.`memid` FROM `emailcerts` AS `ec`, `root_certs` AS `rc` WHERE `ec`.`rootcert` = `rc`.`id` AND `ec`.`serial` = \''.mysql_real_escape_string($serial).'\' AND `rc`.`cert_text` = \''.mysql_real_escape_string($root).'\';');
138->if (mysql_num_rows($query) > 0) {
139->  $result = mysql_fetch_array($query);
144->  trigger_error('Cannot find cert '.$serial.' / '.$root.'!'.mysql_error(), E_USER_ERROR);
149->$query = mysql_query('INSERT INTO `cats_passed` (`user_id`, `variant_id`, `pass_date`) VALUES (\''.(int)intval($userID).'\', \''.(int)intval($variantID).'\', \''.mysql_real_escape_string($date).'\');');
151->  if (mysql_errno() != 1062) { // Duplicate Entry is considered success


/home/gitRepos/CAcert/CAcert-devel/www/news.php

28->		$row = mysql_fetch_assoc(mysql_query($query));
36->		$res = mysql_query($query);
37->		while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/www/account.php

59->		$res = mysql_query($query);
60->		if(mysql_num_rows($res))
62->			$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/www/alert_hash_collision.php

17->  mysql_query("update emailcerts set coll_found=1 where memid='".mysql_escape_string(substr(@$_POST['usernym'],4))."' and pkhash!='' and pkhash='".$_POST['pkhash']."';");
18->  mysql_query("update domaincerts set coll_found=1 where memid='".mysql_escape_string(substr(@$_POST['usernym'],4))."' and pkhash!='' and pkhash='".$_POST['pkhash']."';");
22->  mysql_query("update orgemailcerts set coll_found=1 where memid='".mysql_escape_string(substr(@$_POST['usernym'],4))."' and pkhash!='' and pkhash='".$_POST['pkhash']."';");
23->  mysql_query("update orgdomaincerts set coll_found=1 where memid='".mysql_escape_string(substr(@$_POST['usernym'],4))."' and pkhash!='' and pkhash='".$_POST['pkhash']."';");


/home/gitRepos/CAcert/CAcert-devel/scripts/addpoints.php

25->	$res = mysql_query($query);
26->	while($row = mysql_fetch_assoc($res))
29->		$drow = mysql_fetch_assoc(mysql_query($query));
33->		$num = mysql_num_rows(mysql_query($query));
35->		$newnum = mysql_num_rows(mysql_query($query));
48->				mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/scripts/send_policy_cca_20140916.php

119->$res = mysql_query($query);
121->while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/send_thawte.php.txt

123->	$res = mysql_query($query);
125->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/mass-revoke.php

47->		if (!mysql_query($query)) {
50->		$num_domain+=mysql_affected_rows();
56->		if (!mysql_query($query)) {
59->		$num_client+=mysql_affected_rows();
65->		if (!mysql_query($query)) {
68->		$num_orgdomain+=mysql_affected_rows();
74->		if (!mysql_query($query)) {
77->		$num_orgclient+=mysql_affected_rows();


/home/gitRepos/CAcert/CAcert-devel/scripts/56at-ate-oberwart-mail.php.txt

112->        $loc = mysql_fetch_assoc(mysql_query($query));
130->    $res = mysql_query($query);
131->    $xrows = mysql_num_rows($res);
133->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/50de-ate-luebeck-mail.php.txt

88->        $loc = mysql_fetch_assoc(mysql_query($query));
106->    $res = mysql_query($query);
107->    $xrows = mysql_num_rows($res);
109->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/cron/permissionreview.php

120->	if(! $res = mysql_query($query) ) {
124->				mysql_error()
132->	while ($row = mysql_fetch_assoc($res)) {


/home/gitRepos/CAcert/CAcert-devel/scripts/cron/updatesort.php

29->	mysql_query("update `locations` set `acount`=0");
33->	$res = mysql_query($query);
34->	while($row = mysql_fetch_assoc($res))
38->		mysql_query($query);
42->	mysql_query("update `regions` set `acount`=0");
46->	$res = mysql_query($query);
47->	while($row = mysql_fetch_assoc($res))
51->		mysql_query($query);
57->	mysql_query("update `countries` set `acount`=0");
61->	$res = mysql_query($query);
62->	while($row = mysql_fetch_assoc($res))
66->		mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/scripts/cron/removedead.php

26->	$res = mysql_query($query);
27->	while($row = mysql_fetch_assoc($res))
29->		mysql_query("delete from `email` where `memid`='".$row['id']."'");
30->		mysql_query("delete from `users` where `id`='".$row['id']."'");
36->	mysql_query($query);
40->	mysql_query($query);
44->	mysql_query($query);
48->	mysql_query($query);
54->	$res = mysql_query($query);
55->	while($row = mysql_fetch_assoc($res))
58->		$dres = mysql_query($query);
59->		$drow = mysql_fetch_assoc($dres);
66->			mysql_query($query);
70->		$data = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$row[to]'"));
87->		mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/scripts/cron/warning.php

36->		$res = mysql_query($query);
37->		while($row = mysql_fetch_assoc($res))
73->			mysql_query($query);
110->		$res = mysql_query($query);
111->		while($row = mysql_fetch_assoc($res))
131->			mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/scripts/cron/refresh_stats.php

24-> * Wrapper around mysql_query() to provide some error handling. Prints an error
33->	$res = mysql_query($sql);
35->		fwrite(STDERR, "MySQL query failed:\n\"$sql\"\n".mysql_error());
43->	$row = mysql_fetch_assoc(sql_query($sql));
55->	('$timestamp', '".mysql_real_escape_string(serialize($stats))."')";
61->	if (mysql_num_rows($res) !== 1) {


/home/gitRepos/CAcert/CAcert-devel/scripts/57at-ate-graz-mail.php.txt

95->        $loc = mysql_fetch_assoc(mysql_query($query));
113->    $res = mysql_query($query);
114->    $xrows = mysql_num_rows($res);
116->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/49de-lt2013-berlin-mail.php.txt

84->        $loc = mysql_fetch_assoc(mysql_query($query));
102->	$res = mysql_query($query);
103->	$xrows = mysql_num_rows($res);
105->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/55de-ate-wiesbaden-mail.php.txt

87->        $loc = mysql_fetch_assoc(mysql_query($query));
105->    $res = mysql_query($query);
106->    $xrows = mysql_num_rows($res);
108->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/52at-ate-wien-mail.php.txt

95->        $loc = mysql_fetch_assoc(mysql_query($query));
113->    $res = mysql_query($query);
114->    $xrows = mysql_num_rows($res);
116->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/gpgfillmissingemail.php

45->	$res = mysql_query("SELECT * FROM gpg WHERE crt != '' and email=''");
53->	while ($row = mysql_fetch_assoc($res)) {
77->				  mysql_query("update gpg set email='$mail' where id=$row[id];");
85->	mysql_free_result($res);


/home/gitRepos/CAcert/CAcert-devel/scripts/db_migrations/version1.sh

34->		Usage: $0 [MYSQL_OPTIONS]
46->mysql_opt=" --batch --skip-column-names $@"
48->schema_version=$( mysql $mysql_opt <<- 'SQL'
68->mysql $mysql_opt <<- 'SQL'


/home/gitRepos/CAcert/CAcert-devel/scripts/db_migrations/version2.sh

34->		Usage: $0 [MYSQL_OPTIONS]
46->mysql_opt=" --batch --skip-column-names $@"
48->schema_version=$( mysql $mysql_opt <<- 'SQL'
61->mysql $mysql_opt <<- 'SQL'


/home/gitRepos/CAcert/CAcert-devel/scripts/db_migrations/version3.sh

34->		Usage: $0 [MYSQL_OPTIONS]
46->mysql_opt=" --batch --skip-column-names $@"
48->schema_version=$( mysql $mysql_opt <<- 'SQL'
61->mysql $mysql_opt <<- 'SQL'


/home/gitRepos/CAcert/CAcert-devel/scripts/db_migrations/version5.sh

30->		Usage: $0 [MYSQL_OPTIONS]
42->mysql_opt=" --batch --skip-column-names $@"
44->schema_version=$( mysql $mysql_opt <<- 'SQL'
57->mysql $mysql_opt <<- 'SQL'


/home/gitRepos/CAcert/CAcert-devel/scripts/db_migrations/version6.sh

30->		Usage: $0 [MYSQL_OPTIONS]
42->mysql_opt=" --batch --skip-column-names $@"
44->schema_version=$( mysql $mysql_opt <<- 'SQL'
57->mysql $mysql_opt <<- 'SQL'


/home/gitRepos/CAcert/CAcert-devel/scripts/db_migrations/version4.sh

34->		Usage: $0 [MYSQL_OPTIONS]
46->mysql_opt=" --batch --skip-column-names $@"
48->schema_version=$( mysql $mysql_opt <<- 'SQL'
61->mysql $mysql_opt <<- 'SQL'
76->mysql $mysql_opt <<- 'SQL'


/home/gitRepos/CAcert/CAcert-devel/scripts/scanforexponents.php

56->			$res = mysql_query($query);
57->			if(mysql_num_rows($res) <= 0)
64->			$row = mysql_fetch_assoc($res);
72->			$res = mysql_query($query);
73->			if(mysql_num_rows($res) <= 0)
80->			$row = mysql_fetch_assoc($res);
88->			$res = mysql_query($query);
89->			if(mysql_num_rows($res) <= 0)
96->			$row = mysql_fetch_assoc($res);
104->			$res = mysql_query($query);
105->			if(mysql_num_rows($res) <= 0)
112->			$row = mysql_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/scripts/country.php

23->	$res = mysql_query($query);
24->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/resetpermissions.php

29->	if(! $res = mysql_query($query) ) {
33->				mysql_error()
39->	while ($row = mysql_fetch_assoc($res)) {
43->		if(! $res2 = mysql_query($update) ) {
48->					mysql_error()


/home/gitRepos/CAcert/CAcert-devel/scripts/gpgcheck3.php

71->	$res = mysql_query("SELECT id, memid FROM gpg WHERE crt != ''");
78->	while ($row = mysql_fetch_row($res)) {
81->	mysql_free_result($res);
90->		$res = mysql_query("SELECT fname, mname, lname, suffix FROM users WHERE id = " . $key[1]);
95->		$user = mysql_fetch_assoc($res);
100->		mysql_free_result($res);
102->		$res = mysql_query("SELECT email FROM email WHERE hash = '' AND memid = " . $key[1]);
108->		while ($addr = mysql_fetch_row($res)) {
111->		mysql_free_result($res);


/home/gitRepos/CAcert/CAcert-devel/scripts/gpgfillmissingkeyid.php

30->	$res = mysql_query("SELECT * FROM gpg WHERE crt != '' and keyid is null");
38->	while ($row = mysql_fetch_assoc($res)) {
57->				  mysql_query("update gpg set keyid='$bits[4]' where id=$row[id]\n");
70->	mysql_free_result($res);


/home/gitRepos/CAcert/CAcert-devel/scripts/58at-ate-wien-mail.php.txt

99->        $loc = mysql_fetch_assoc(mysql_query($query));
117->    $res = mysql_query($query);
118->    $xrows = mysql_num_rows($res);
120->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/51at-ate-graz-mail.php.txt

91->        $loc = mysql_fetch_assoc(mysql_query($query));
109->    $res = mysql_query($query);
110->    $xrows = mysql_num_rows($res);
112->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/send_heartbleed.php

225->$res = mysql_query($query);
227->while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/cleanthem.pl

5->sub mysql_query($)


/home/gitRepos/CAcert/CAcert-devel/scripts/assurer.php

41->	$res = mysql_query($query);
42->	$xrows = mysql_num_rows($res);
43->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/53de-ate-amberg-mail.php.txt

98->        $loc = mysql_fetch_assoc(mysql_query($query));
116->    $res = mysql_query($query);
117->    $xrows = mysql_num_rows($res);
119->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/newslettercebit.php

32->        $loc = mysql_fetch_assoc(mysql_query($query));
41->	$res = mysql_query($query);
42->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/54at-ate-linz-mail.php.txt

105->        $loc = mysql_fetch_assoc(mysql_query($query));
123->    $res = mysql_query($query);
124->    $xrows = mysql_num_rows($res);
126->    while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/newsletter.php

31->        $loc = mysql_fetch_assoc(mysql_query($query));
38->	$res = mysql_query($query);
39->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/consistence.php

25->	$res = mysql_query($query);
26->	while($row = mysql_fetch_assoc($res))
30->		//mysql_query($query);
37->	$res = mysql_query($query);
38->	while($row = mysql_fetch_assoc($res))
42->		//mysql_query($query);
48->	$res = mysql_query($query);
49->	echo mysql_error();
50->	while($row = mysql_fetch_assoc($res))
56->		if($row['regid']=="1182") mysql_query($query);
62->	mysql_query("update `locations` set `acount`=0");
66->	$res = mysql_query($query);
67->	while($row = mysql_fetch_assoc($res))
71->		mysql_query($query);
75->	mysql_query("update `regions` set `acount`=0");
79->	$res = mysql_query($query);
80->	while($row = mysql_fetch_assoc($res))
84->		mysql_query($query);
90->	mysql_query("update `countries` set `acount`=0");
94->	$res = mysql_query($query);
95->	while($row = mysql_fetch_assoc($res))
99->		mysql_query($query);


/home/gitRepos/CAcert/CAcert-devel/scripts/mailing archive/47us-fudcon-lawrence-mail.php.txt

74->        $loc = mysql_fetch_assoc(mysql_query($query));
92->	$res = mysql_query($query);
93->	$xrows = mysql_num_rows($res);
95->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/mailing archive/oa02-orgainformation.php.txt

76->	$res = mysql_query($query);
77->	$xrows = mysql_num_rows($res);
84->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/mailing archive/45au-ate-melbourne-mail.php.txt

71->        $loc = mysql_fetch_assoc(mysql_query($query));
89->	$res = mysql_query($query);
90->	$xrows = mysql_num_rows($res);
92->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/mailing archive/48de-ate-kiel-mail.php.txt

79->        $loc = mysql_fetch_assoc(mysql_query($query));
97->	$res = mysql_query($query);
98->	$xrows = mysql_num_rows($res);
100->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/mailing archive/46us-ate-raleigh-mail.php.txt

77->        $loc = mysql_fetch_assoc(mysql_query($query));
95->	$res = mysql_query($query);
96->	$xrows = mysql_num_rows($res);
98->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/mailing archive/oa01-allowance.php.txt

76->	$res = mysql_query($query);
77->	$xrows = mysql_num_rows($res);
79->	while($row = mysql_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/notify.php

26->	$res = mysql_query($query);
27->	while($row = mysql_fetch_assoc($res))
33->		mysql_query("update `email` set `hash`='$hash' where `id`='".$row['id']."'");
origin_release (88,558 bytes)   
origin_bug-1260 (71,163 bytes)   

/home/gitRepos/CAcert/CAcert-devel/pages/advertising/0.php

27->		$res = mysqli_query($_SESSION['mconn'], $query);
28->		if(mysqli_num_rows($res) > 0)
30->			$row = mysqli_fetch_assoc($res);
33->			mysqli_query($_SESSION['mconn'], $query);
41->		$res = mysqli_query($_SESSION['mconn'], $query);
42->		if(mysqli_num_rows($res) > 0)
44->			$row = mysqli_fetch_assoc($res);
47->			mysqli_query($_SESSION['mconn'], $query);
72->	$res = mysqli_query($_SESSION['mconn'], $query);
73->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/3.php

40->	$res = mysqli_query($_SESSION['mconn'], $query);
41->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/15.php

24->	$res = mysqli_query($_SESSION['mconn'], $query);
25->	if(mysqli_num_rows($res) <= 0)
31->	$row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/27.php

19->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `orginfo` where `id`='".intval($_REQUEST['orgid'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/35.php

27->$res = mysqli_query($_SESSION['mconn'], $query);
28->while($row = mysqli_fetch_assoc($res))
58->	$res1 = mysqli_query($_SESSION['mconn'], $query);
59->	while($domain = mysqli_fetch_assoc($res1))
79->	$res2 = mysqli_query($_SESSION['mconn'], $query);
80->	while($org = mysqli_fetch_assoc($res2))
82->		$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($org['memid'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/33.php

20->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/19.php

24->	$res = mysqli_query($_SESSION['mconn'], $query);
25->	if(mysqli_num_rows($res) <= 0)
32->	$row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/41.php

57->	$res = mysqli_query($_SESSION['mconn'], $query);
58->	while($row = mysqli_fetch_assoc($res))
60->		$lang = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `languages` where `locale`='".mysql_real_escape_string($row['lang'])."'"));
73->	$res = mysqli_query($_SESSION['mconn'], $query);
74->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/34.php

20->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
22->	$org = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
24->	$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/28.php

20->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/5.php

55->	$res = mysqli_query($_SESSION['mconn'], $query);
56->	if(mysqli_num_rows($res) <= 0)
63->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/53.php

32->		$reg = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `regions` where `id`='$regid'"));
41->		$cnt = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `countries` where `id`='$ccid'"));
54->		$res = mysqli_query($_SESSION['mconn'], $query);
55->		while($row = mysqli_fetch_assoc($res))
62->		$res = mysqli_query($_SESSION['mconn'], $query);
63->		while($row = mysqli_fetch_assoc($res))
77->			$start = mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query));
80->		$res = mysqli_query($_SESSION['mconn'], $query);
81->		while($row = mysqli_fetch_assoc($res))
92->		$rc = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `locations` where `regid`='$regid'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/23.php

24->	$res = mysqli_query($_SESSION['mconn'], $query);
25->	if(mysqli_num_rows($res) <= 0)
31->	$row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/6.php

42->$res = mysqli_query($_SESSION['mconn'], $query);
43->if(mysqli_num_rows($res) <= 0) {
49->$row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/18.php

40->    $reso = mysqli_query($_SESSION['mconn'], $query);
41->    if(mysqli_num_rows($reso) >= 1){
42->      while($row = mysqli_fetch_assoc($reso)){
108->  $res = mysqli_query($_SESSION['mconn'], $query);
109->  if(mysqli_num_rows($res) <= 0)
118->  while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/54.php

44->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
92->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
128->	$res = mysqli_query($_SESSION['mconn'], $query);
129->	$rc = mysqli_num_rows($res);
146->	while($row = mysqli_fetch_assoc($res))
172->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
189->	$res = mysqli_query($_SESSION['mconn'], $query);
190->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/12.php

49->	$res = mysqli_query($_SESSION['mconn'], $query);
50->	if(mysqli_num_rows($res) <= 0)
57->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/51.php

22->	$res = mysqli_query($_SESSION['mconn'], $query);
23->	if(mysqli_num_rows($res) > 0) { ?>
27->        $res = mysqli_query($_SESSION['mconn'], $query);
28->        if(mysqli_num_rows($res) > 0)


/home/gitRepos/CAcert/CAcert-devel/pages/account/58.php

24->	$res = mysqli_query($_SESSION['mconn'], $query);
25->	if(mysqli_num_rows($res) != 1){
28->		if ($row = mysqli_fetch_assoc($res)){
34->			$res1 = mysqli_query($_SESSION['mconn'], $query);?>
36->			if (mysqli_num_rows($res1) <= 0) {?>
48->				while($drow = mysqli_fetch_assoc($res1)){?>


/home/gitRepos/CAcert/CAcert-devel/pages/account/9.php

30->	$res = mysqli_query($_SESSION['mconn'], $query);
31->	if(mysqli_num_rows($res) <= 0)
38->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/55.php

34->    $res = mysqli_query($_SESSION['mconn'], $query);
35->    if(mysqli_num_rows($res) <= 0)
39->      $row = mysqli_fetch_assoc($res);
64->        $res = mysqli_query($_SESSION['mconn'], $query);
67->        while($row = mysqli_fetch_array($res, MYSQL_NUM))
92->        $res = mysqli_query($_SESSION['mconn'], $query);
96->          $row = mysqli_fetch_array($res, MYSQL_NUM);


/home/gitRepos/CAcert/CAcert-devel/pages/account/43.php

26->    $res = mysqli_query($_SESSION['mconn'], "select `to` from `notary` where `id`='$assurance'");
28->      $row = mysqli_fetch_assoc($res);
30->    mysqli_query($_SESSION['mconn'], "delete from `notary` where `id`='$assurance'");
66->    $res = mysqli_query($_SESSION['mconn'], $query);
67->    if(mysqli_num_rows($res) > 1) { ?>
77->  while($row = mysqli_fetch_assoc($res))
83-><? } if(mysqli_num_rows($res) >= 100) { ?>
89->    <td class="DataTD" colspan="2"><? printf(_("%s rows displayed."), mysqli_num_rows($res)); ?></td>
93-><?    } elseif(mysqli_num_rows($res) == 1) {
94->      $row = mysqli_fetch_assoc($res);
105->    $res = mysqli_query($_SESSION['mconn'], $query);
106->    if(mysqli_num_rows($res) <= 0)
110->      $row = mysqli_fetch_assoc($res);
112->      $dres = mysqli_query($_SESSION['mconn'], $query);
113->      $drow = mysqli_fetch_assoc($dres);
114->      $alerts = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `alerts` where `memid`='".intval($row['id'])."'"));
306->  $dres = mysqli_query($_SESSION['mconn'], $query);
307->  if(mysqli_num_rows($dres) > 0) { ?>
312->  $rc = mysqli_num_rows($dres);
313->  while($drow = mysqli_fetch_assoc($dres))
324->  $dres = mysqli_query($_SESSION['mconn'], $query);
325->  if(mysqli_num_rows($dres) > 0) { ?>
330->  $rc = mysqli_num_rows($dres);
331->  while($drow = mysqli_fetch_assoc($dres))
419->  $dres = mysqli_query($_SESSION['mconn'], $query);
420->  $drow = mysqli_fetch_assoc($dres);
430->  $dres = mysqli_query($_SESSION['mconn'], $query);
431->  if ($drow = mysqli_fetch_assoc($dres)) {
438->    $dres = mysqli_query($_SESSION['mconn'], $query);
439->    $drow = mysqli_fetch_assoc($dres);
516->	$dres = mysqli_query($_SESSION['mconn'], $query);
517->	$drow = mysqli_fetch_assoc($dres);
532->		$dres = mysqli_query($_SESSION['mconn'], $query);
533->		$drow = mysqli_fetch_assoc($dres);
541->		$dres = mysqli_query($_SESSION['mconn'], $query);
542->		$drow = mysqli_fetch_assoc($dres);
550->		$dres = mysqli_query($_SESSION['mconn'], $query);
551->		$drow = mysqli_fetch_assoc($dres);
574->	$dres = mysqli_query($_SESSION['mconn'], $query);
575->	$drow = mysqli_fetch_assoc($dres);
589->		$dres = mysqli_query($_SESSION['mconn'], $query);
590->		$drow = mysqli_fetch_assoc($dres);
597->		$dres = mysqli_query($_SESSION['mconn'], $query);
598->		$drow = mysqli_fetch_assoc($dres);
605->		$dres = mysqli_query($_SESSION['mconn'], $query);
606->		$drow = mysqli_fetch_assoc($dres);
629->	$dres = mysqli_query($_SESSION['mconn'], $query);
630->	$drow = mysqli_fetch_assoc($dres);
643->		$dres = mysqli_query($_SESSION['mconn'], $query);
644->		$drow = mysqli_fetch_assoc($dres);
651->		$dres = mysqli_query($_SESSION['mconn'], $query);
652->		$drow = mysqli_fetch_assoc($dres);
678->	$dres = mysqli_query($_SESSION['mconn'], $query);
679->	$drow = mysqli_fetch_assoc($dres);
694->		$dres = mysqli_query($_SESSION['mconn'], $query);
695->		$drow = mysqli_fetch_assoc($dres);
703->		$dres = mysqli_query($_SESSION['mconn'], $query);
704->		$drow = mysqli_fetch_assoc($dres);
712->		$dres = mysqli_query($_SESSION['mconn'], $query);
713->		$drow = mysqli_fetch_assoc($dres);
738->	$dres = mysqli_query($_SESSION['mconn'], $query);
739->	$drow = mysqli_fetch_assoc($dres);
754->		$dres = mysqli_query($_SESSION['mconn'], $query);
755->		$drow = mysqli_fetch_assoc($dres);
763->		$dres = mysqli_query($_SESSION['mconn'], $query);
764->		$drow = mysqli_fetch_assoc($dres);
772->		$dres = mysqli_query($_SESSION['mconn'], $query);
773->		$drow = mysqli_fetch_assoc($dres);
832->  $dres = mysqli_query($_SESSION['mconn'], $query);
834->  while($drow = mysqli_fetch_assoc($dres))
836->    $fromuser = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($drow['from'])."'"));
878->  $dres = mysqli_query($_SESSION['mconn'], $query);
880->  while($drow = mysqli_fetch_assoc($dres))
882->    $fromuser = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".$drow['to']."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/52.php

22->	$res = mysqli_query($_SESSION['mconn'], $query);
23->	if(mysqli_num_rows($res) > 0)
25->		$row = mysqli_fetch_assoc($res);
29->                $rc2 = mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query2));
39->		$notary = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
41->		$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
70->	$res = mysqli_query($_SESSION['mconn'], $query);
71->	if(mysqli_num_rows($res) > 0)
80->	$res = mysqli_query($_SESSION['mconn'], $query);
81->	if(mysqli_num_rows($res) > 0)
84->		while($row = mysqli_fetch_assoc($res))
88->			$rc3 = mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query3));


/home/gitRepos/CAcert/CAcert-devel/pages/account/49.php

33->		$res = mysqli_query($_SESSION['mconn'], $query);
34->		if(mysqli_num_rows($res) >= 1) { ?>
40->	while($row = mysqli_fetch_assoc($res))
47-><? } if(mysqli_num_rows($res) >= 100) { ?>
53->    <td class="DataTD" colspan="3"><? printf(_("%s rows displayed."), mysqli_num_rows($res)); ?></td>
57-><?		} elseif(mysqli_num_rows($res) == 1) {
58->			$row = mysqli_fetch_assoc($res);
69->		$res = mysqli_query($_SESSION['mconn'], $query);
70->		if(mysqli_num_rows($res) >= 1) { ?>
76->	while($row = mysqli_fetch_assoc($res))
83-><? } if(mysqli_num_rows($res) >= 100) { ?>
89->    <td class="DataTD" colspan="3"><? printf(_("%s rows displayed."), mysqli_num_rows($res)); ?></td>
93-><?		} elseif(mysqli_num_rows($res) == 1) {
94->			$row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/13.php

20->  $res = mysqli_query($_SESSION['mconn'], $query);
21->  $user = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/32.php

20->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
35->	$res = mysqli_query($_SESSION['mconn'], $query);
36->	while($row = mysqli_fetch_assoc($res))
38->		$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($row['memid'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/account/29.php

20->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
22->	$org = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/22.php

40->    $reso = mysqli_query($_SESSION['mconn'], $query);
41->    if(mysqli_num_rows($reso) >= 1){
42->      while($row = mysqli_fetch_assoc($reso)){
110->  $res = mysqli_query($_SESSION['mconn'], $query);
111->  if(mysqli_num_rows($res) <= 0)
119->  while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/2.php

31->	$res = mysqli_query($_SESSION['mconn'], $query);
32->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/31.php

20->	$org = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));


/home/gitRepos/CAcert/CAcert-devel/pages/account/57.php

28->    $res = mysqli_query($_SESSION['mconn'], $query);
29->    if(mysqli_num_rows($res) <= 0)
33->      $row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/account/25.php

57->	$res = mysqli_query($_SESSION['mconn'], $query);
58->	while($row = mysqli_fetch_assoc($res))
60->		$r2 = mysqli_query($_SESSION['mconn'], "select * from `org` where `orgid`='".intval($row['id'])."'");
61->		$admincount = mysqli_num_rows($r2);
62->		$r2 = mysqli_query($_SESSION['mconn'], "select * from `orgdomains` where `orgid`='".intval($row['id'])."'");
63->		$domcount = mysqli_num_rows($r2);


/home/gitRepos/CAcert/CAcert-devel/pages/account/56.php

28->    $res = mysqli_query($_SESSION['mconn'], $query);
29->    while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/26.php

20->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
33->	$res = mysqli_query($_SESSION['mconn'], $query);
34->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/account/30.php

20->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
22->	$org = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));


/home/gitRepos/CAcert/CAcert-devel/pages/wot/1.php

19->        $res=mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select sum(acount) as summe from countries"));
32->		$loc = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `locations` where `id`='".$locid."'"));
41->		$reg = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `regions` where `id`='".$regid."'"));
50->		$cnt = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `countries` where `id`='".$ccid."'"));
63->		$res = mysqli_query($_SESSION['mconn'], $query);
64->		while($row = mysqli_fetch_assoc($res))
72->		$res = mysqli_query($_SESSION['mconn'], $query);
73->		while($row = mysqli_fetch_assoc($res))
81->		$res = mysqli_query($_SESSION['mconn'], $query);
82->		while($row = mysqli_fetch_assoc($res))
96->	$list = mysqli_query($_SESSION['mconn'], $query);
97->	if(mysqli_num_rows($list) > 0)
109-><? while($row = mysqli_fetch_assoc($list)) { ?>


/home/gitRepos/CAcert/CAcert-devel/pages/wot/10.php

31->	$res = mysqli_query($_SESSION['mconn'], $query);
32->	$row = mysqli_fetch_assoc($res);
43->	$rank = mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query)) + 1;
68->	$res = mysqli_query($_SESSION['mconn'], $query);
69->	while($row = mysqli_fetch_assoc($res))
71->		$fromuser = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($row['from'])."'"));
118->	$res = mysqli_query($_SESSION['mconn'], $query);
119->	while($row = mysqli_fetch_assoc($res))
121->		$fromuser = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($row['to'])."'"));


/home/gitRepos/CAcert/CAcert-devel/pages/wot/12.php

76->		$res = mysqli_query($_SESSION['mconn'], $query);
77->		if($reg != "" && $ccname == "" && mysqli_num_rows($res) <= 0)
83->			$res = mysqli_query($_SESSION['mconn'], $query);
85->		if(mysqli_num_rows($res) <= 0)
87->		$row = mysqli_fetch_assoc($res);
95->	$loc = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
111->	$res = mysqli_query($_SESSION['mconn'], $query);
120-><?	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/pages/wot/9.php

22->	$res = mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($_REQUEST['userid'])."' and `listme`='1'");
23->	if(mysqli_num_rows($res) <= 0)
28->		$user = mysqli_fetch_array($res);
30->		$points = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select sum(`points`) as `total` from `notary`
58->	$res = mysqli_query($_SESSION['mconn'], $query);
59->	while($row = mysqli_fetch_assoc($res))
61->		$lang = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `languages` where `locale`='${row['lang']}'"));


/home/gitRepos/CAcert/CAcert-devel/pages/wot/13.php

31->		$res = mysqli_query($_SESSION['mconn'], $query);
32->                if($reg != "" && $ccname == "" && mysqli_num_rows($res) <= 0)
38->                        $res = mysqli_query($_SESSION['mconn'], $query);
40->                if(mysqli_num_rows($res) <= 0)
43->		$row = mysqli_fetch_assoc($res);
49->	$res = mysqli_query($_SESSION['mconn'], $query);
50->	if(mysqli_num_rows($res) > 0)
52->		$loc = mysqli_fetch_assoc($res);
57->		mysqli_query($_SESSION['mconn'], $query);
65->	$res = mysqli_query($_SESSION['mconn'], $query);
66->	$loc = mysqli_fetch_assoc($res);
68->	$res = mysqli_query($_SESSION['mconn'], $query);
69->	$reg = mysqli_fetch_assoc($res);
71->	$res = mysqli_query($_SESSION['mconn'], $query);
72->	$cc = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/gpg/3.php

21->	$res = mysqli_query($_SESSION['mconn'], $query);
22->	if(mysqli_num_rows($res) <= 0)
28->	$row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/pages/gpg/2.php

36->	$res = mysqli_query($_SESSION['mconn'], $query);
37->	if(mysqli_num_rows($res) <= 0)
44->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/stamp/report.php

57->		mysqli_query($_SESSION['mconn'], "insert into `abusereports` set `when`=NOW(), `IP`='$iplong', `url`='$refer', `name`='$name', `email`='$email',
59->		$id = mysqli_insert_id();


/home/gitRepos/CAcert/CAcert-devel/stamp/common.php

34->		$res = mysqli_query($_SESSION['mconn'], $query);
35->		if(mysqli_num_rows($res) > 0)
37->			$row = mysqli_fetch_assoc($res);
49->					$res = mysqli_query($_SESSION['mconn'], $query);
50->					if(mysqli_num_rows($res) > 0)
55->						mysqli_query($_SESSION['mconn'], $query);
71->		$res = mysqli_query($_SESSION['mconn'], $query);
72->		if(mysqli_num_rows($res) <= 0)
91->			$res = mysqli_query($_SESSION['mconn'], $query);
92->			if(mysqli_num_rows($res) <= 0)
104->				$res = mysqli_query($_SESSION['mconn'], $query);
105->				if(mysqli_num_rows($res) <= 0)
116->			$cert = mysqli_fetch_assoc($res);
121->				$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
124->				$orgi = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
137->			mysqli_query($_SESSION['mconn'], $query);
139->			mysqli_query($_SESSION['mconn'], "update `stampcache` set `cacheexpire`='".(date("U")+600)."' where `id`='$stampid'");
142->			mysqli_query($_SESSION['mconn'], $query);


/home/gitRepos/CAcert/CAcert-devel/includes/lib/general.php

40->	$res = mysqli_query($_SESSION['mconn'], $query);
41->	if(mysqli_num_rows($res) > 0)
43->		$row = mysqli_fetch_assoc($res);
142->		$query = mysqli_query($_SESSION['mconn'], 'SELECT * FROM `cats_passed` AS `tp`, `cats_variant` AS `cv` '.
144->		if(mysqli_num_rows($query) < 1)
149->		$query = mysqli_query($_SESSION['mconn'], 'SELECT SUM(`points`) AS `points` FROM `notary` AS `n` WHERE `n`.`to` = \''.(int)intval($userID).'\' AND `n`.`expire` < now()');
150->		$row = mysqli_fetch_assoc($query);
155->		$query = mysqli_query($_SESSION['mconn'], 'SELECT `assurer_blocked` FROM `users` WHERE `id` = \''.(int)intval($userID).'\'');
156->		$row = mysqli_fetch_assoc($query);


/home/gitRepos/CAcert/CAcert-devel/includes/lib/account.php

57->	$query = mysqli_query($_SESSION['mconn'], $sql);
92->	$query = mysqli_query($_SESSION['mconn'], $sql);


/home/gitRepos/CAcert/CAcert-devel/includes/general_stuff.php

72->	$res = mysqli_query($_SESSION['mconn'], $query);
73->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/includes/loggedin.php

46->		$_SESSION['profile'] = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='$uid'"));
72->			$_SESSION['profile'] = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], 
117->		$res = mysqli_query($_SESSION['mconn'], $query);
118->		$row = mysqli_fetch_assoc($res);
125->			mysqli_query($_SESSION['mconn'], $query);


/home/gitRepos/CAcert/CAcert-devel/includes/mysql.php.sample

19->	$_SESSION['mconn'] = mysqli_connect("127.0.0.1", "username", "password", "database");


/home/gitRepos/CAcert/CAcert-devel/includes/notary.inc.php

21->		return mysqli_query($_SESSION['mconn'], $query);
26->		$row1 = mysqli_fetch_assoc($res);
32->		return intval(mysqli_num_rows($resultset));
105->		return mysqli_fetch_assoc($res);
113->		return mysqli_num_rows($res);
389->		while($row = mysqli_fetch_assoc($res))
406->		while($row = mysqli_fetch_assoc($res))
487->		while($row = mysqli_fetch_assoc($res))
500->		while($row = mysqli_fetch_assoc($res))
639->		$res = mysqli_query($_SESSION['mconn'], $query);
652->		$res = mysqli_query($_SESSION['mconn'], $query);
653->		if(mysqli_num_rows($res) <=0){
673->		$res = mysqli_query($_SESSION['mconn'], $query);
674->		if(mysqli_num_rows($res) >0){
675->			$rec = mysqli_fetch_assoc($res);
692->		$res = mysqli_query($_SESSION['mconn'], $query);
693->		if(mysqli_num_rows($res) >0){
694->			$rec = mysqli_fetch_assoc($res);
715->		mysqli_query($_SESSION['mconn'], "delete from `user_agreements` where `memid`=" . intval($memid) . $filter );
817->		mysqli_query($_SESSION['mconn'], $query);
828->		mysqli_query($_SESSION['mconn'], 
850->		mysqli_query($_SESSION['mconn'], "update `users` set `password`=sha1('".$password."') where `id`='".$id."'");
854->		mysqli_query($_SESSION['mconn'], $query);
855->		$emailid = mysqli_insert_id();
859->		mysqli_query($_SESSION['mconn'], $query);
863->		$res=mysqli_query($_SESSION['mconn'], $query);
864->		while($row = mysqli_fetch_assoc($res)){
870->		$res=mysqli_query($_SESSION['mconn'], $query);
871->		while($row = mysqli_fetch_assoc($res)){
876->		mysqli_query($_SESSION['mconn'], 
886->		mysqli_query($_SESSION['mconn'], $query);
890->		mysqli_query($_SESSION['mconn'], $query);
894->		mysqli_query($_SESSION['mconn'], "update `users` set `language`='en_AU' where `id`='".$id."'");
896->		mysqli_query($_SESSION['mconn'], "delete from `addlang` where `userid`='".$id."'");
908->			mysqli_query($_SESSION['mconn'], $query);
913->		$details = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
916->		mysqli_query($_SESSION['mconn'], $query);
923->		mysqli_query($_SESSION['mconn'], $query);
926->		mysqli_query($_SESSION['mconn'], 
941->		mysqli_query($_SESSION['mconn'], "update `users` set `locked`='1' where `id`='$id'");  //, `deleted`=Now()
950->		$res = mysqli_query($_SESSION['mconn'], $query);
951->		return mysqli_num_rows($res) > 0;
963->		$res = mysqli_query($_SESSION['mconn'], $query);
964->		return mysqli_num_rows($res) > 0;
978->		$res = mysqli_query($_SESSION['mconn'], $query1);
979->		$r1 = mysqli_num_rows($res)>0;
980->		$res = mysqli_query($_SESSION['mconn'], $query2);
981->		$r2 = mysqli_num_rows($res)>0;
1014->		$res = mysqli_query($_SESSION['mconn'], $query1);
1015->		$r1 = mysqli_num_rows($res)>0;
1016->		$res = mysqli_query($_SESSION['mconn'], $query2);
1017->		$r2 = mysqli_num_rows($res)>0;
1025->		$res = mysqli_query($_SESSION['mconn'], $query);
1026->		return mysqli_num_rows($res) > 0;
1038->		$dres = mysqli_query($_SESSION['mconn'], $query);
1039->		while($drow = mysqli_fetch_assoc($dres)){
1040->			mysqli_query($_SESSION['mconn'], "update `emailcerts` set `revoked`='1970-01-01 10:00:01', `disablelogin`=1 where `id`='".$drow['id']."'");
1056->		$dres = mysqli_query($_SESSION['mconn'], $query);
1057->		while($drow = mysqli_fetch_assoc($dres))
1059->			mysqli_query($_SESSION['mconn'], 
1072->		$res=mysqli_query($_SESSION['mconn'], $query);
1073->		while($row = mysqli_fetch_assoc($res)){
1079->		$res=mysqli_query($_SESSION['mconn'], $query);
1080->		while($row = mysqli_fetch_assoc($res)){


/home/gitRepos/CAcert/CAcert-devel/includes/account_stuff.php

202-><? if(mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `org` where `memid`='".intval($_SESSION['profile']['id'])."'")) > 0 || $_SESSION['profile']['orgadmin'] == 1) { ?>
212-><? if(mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `org` where `memid`='".intval($_SESSION['profile']['id'])."'")) > 0 || $_SESSION['profile']['orgadmin'] == 1) { ?>


/home/gitRepos/CAcert/CAcert-devel/includes/general.php

82->		$locked = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select `locked` from `users` where `id`='".$_SESSION['profile']['id']."'"));
86->			$res = mysqli_query($_SESSION['mconn'], $query);
87->			$row = mysqli_fetch_assoc($res);
291->				$res = mysqli_query($_SESSION['mconn'], $query);
292->				if(mysqli_num_rows($res) > 0)
295->					$_SESSION['_config']['row'] = mysqli_fetch_assoc($res);
343->				$res = mysqli_query($_SESSION['mconn'], $query);
344->				if(mysqli_num_rows($res) > 0)
347->					$_SESSION['_config']['altrow'] = mysqli_fetch_assoc($res);
385->				$res = mysqli_query($_SESSION['mconn'], $query);
386->				if(mysqli_num_rows($res) > 0)
388->					$_SESSION['_config']['row'] = mysqli_fetch_assoc($res);
433->				$res = mysqli_query($_SESSION['mconn'], $query);
434->				if(mysqli_num_rows($res) > 0)
436->					$_SESSION['_config']['altrow'] = mysqli_fetch_assoc($res);
465->			$res = mysqli_query($_SESSION['mconn'], $query);
466->			if(mysqli_num_rows($res) > 0)
468->				$_SESSION['_config']['row'] = mysqli_fetch_assoc($res);
481->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
486->		if(mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query)) < 1)
585->					mysqli_query($_SESSION['mconn'], $query);
596->		mysqli_query($_SESSION['mconn'], $query);
617->			$res = mysqli_query($_SESSION['mconn'], $query);
618->			if(mysqli_num_rows($res) > 0)
630->			$res = mysqli_query($_SESSION['mconn'], $query);
633->			if(mysqli_num_rows($res) > 0)
660->		mysqli_query($_SESSION['mconn'], $query);
661->		$ticket = mysqli_insert_id();
789->	  * The resource returned by mysqli_query is
792->	  * It should be safe to replace every mysqli_query
793->	  * call by a mysqli_extended_query call.
799->		$res = mysqli_query($_SESSION['mconn'], $sql);


/home/gitRepos/CAcert/CAcert-devel/includes/account.php

150->		mysqli_query($_SESSION['mconn'], $query);
151->		$emailid = mysqli_insert_id();
170->		$res = mysqli_query($_SESSION['mconn'], $query);
171->		if(mysqli_num_rows($res) <= 0)
178->		$row = mysqli_fetch_assoc($res);
190->		mysqli_query($_SESSION['mconn'], $query);
215->				$res = mysqli_query($_SESSION['mconn'], $query);
216->				if(mysqli_num_rows($res) > 0)
218->					$row = mysqli_fetch_assoc($res);
324->				$res = mysqli_query($_SESSION['mconn'], "select * from `email` where `memid`='".$_SESSION['profile']['id']."' and `id`='".intval($id)."'");
325->				if(mysqli_num_rows($res) > 0)
327->					$row = mysqli_fetch_assoc($res);
343->			$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".$_SESSION['profile']['id']."'"));
388->			mysqli_query($_SESSION['mconn'], $query);
389->			$emailid = mysqli_insert_id();
392->				mysqli_query($_SESSION['mconn'], "insert into `emaillink` set `emailcertsid`='$emailid', `emailid`='$addy'");
407->			mysqli_query($_SESSION['mconn'], "update `emailcerts` set `csr_name`='$CSRname' where `id`='".intval($emailid)."'");
430->			$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($_SESSION['profile']['id'])."'"));
446->				$res = mysqli_query($_SESSION['mconn'], "select * from `email` where `memid`='".intval($_SESSION['profile']['id'])."' and `id`='".intval($id)."'");
447->				if(mysqli_num_rows($res) > 0)
449->					$row = mysqli_fetch_assoc($res);
489->			mysqli_query($_SESSION['mconn'], $query);
490->			$emailid = mysqli_insert_id();
493->				mysqli_query($_SESSION['mconn'], "insert into `emaillink` set `emailcertsid`='$emailid', `emailid`='".mysql_real_escape_string($addy)."'");
498->			mysqli_query($_SESSION['mconn'], "update `emailcerts` set `csr_name`='$CSRname' where `id`='$emailid'");
502->		$res = mysqli_query($_SESSION['mconn'], $query);
503->		if(mysqli_num_rows($res) <= 0)
542->		$res1 = mysqli_query($_SESSION['mconn'], "select * from `orgdomains` where `domain`='$newdomain'");
544->		$res2 = mysqli_query($_SESSION['mconn'], $query);
545->		if(mysqli_num_rows($res1) > 0 || mysqli_num_rows($res2))
627->		$res = mysqli_query($_SESSION['mconn'], $query);
628->		if(mysqli_num_rows($res) > 0)
654->		mysqli_query($_SESSION['mconn'], $query);
655->		$domainid = mysqli_insert_id();
682->				$res = mysqli_query($_SESSION['mconn'], $query);
683->				if(mysqli_num_rows($res) > 0)
685->					$row = mysqli_fetch_assoc($res);
824->		mysqli_query($_SESSION['mconn'], $query);
825->		$CSRid = mysqli_insert_id();
829->				mysqli_query($_SESSION['mconn'], "insert into `domlink` set `certid`='$CSRid', `domid`='$dom'");
832->			mysqli_query($_SESSION['mconn'], "insert into `domlink` set `certid`='$CSRid', `domid`='$dom'");
837->		mysqli_query($_SESSION['mconn'], "update `domaincerts` set `CSR_name`='$CSRname' where `id`='$CSRid'");
840->		$res = mysqli_query($_SESSION['mconn'], $query);
841->		if(mysqli_num_rows($res) <= 0)
871->				$res = mysqli_query($_SESSION['mconn'], $query);
872->				if(mysqli_num_rows($res) <= 0)
878->				$row = mysqli_fetch_assoc($res);
887->				mysqli_query($_SESSION['mconn'], "update `domaincerts` set `renewed`='1' where `id`='$id'");
899->				mysqli_query($_SESSION['mconn'], $query);
900->				$newid = mysqli_insert_id();
922->				mysqli_query($_SESSION['mconn'], "update `domaincerts` set `subject`='$subject',`csr_name`='$newfile' where `id`='$newid'");
927->				$res = mysqli_query($_SESSION['mconn'], $query);
928->				if(mysqli_num_rows($res) <= 0)
932->					$drow = mysqli_fetch_assoc($res);
962->				$res = mysqli_query($_SESSION['mconn'], $query);
963->				if(mysqli_num_rows($res) <= 0)
968->				$row = mysqli_fetch_assoc($res);
974->				mysqli_query($_SESSION['mconn'], "update `domaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='$id'");
993->				$res = mysqli_query($_SESSION['mconn'], $query);
994->				if(mysqli_num_rows($res) <= 0)
999->				$row = mysqli_fetch_assoc($res);
1005->				mysqli_query($_SESSION['mconn'], "delete from `domaincerts` where `id`='$id'");
1024->				mysqli_query($_SESSION['mconn'], "update `domaincerts` set `description`='$comment' where `id`='$cid'");
1044->				$res = mysqli_query($_SESSION['mconn'], $query);
1045->				if(mysqli_num_rows($res) <= 0)
1051->				$row = mysqli_fetch_assoc($res);
1060->				mysqli_query($_SESSION['mconn'], "update `emailcerts` set `renewed`='1' where `id`='$id'");
1073->				mysqli_query($_SESSION['mconn'], $query);
1074->				$newid = mysqli_insert_id();
1077->				mysqli_query($_SESSION['mconn'], "update `emailcerts` set `csr_name`='$newfile' where `id`='$newid'");
1078->				$res = mysqli_query($_SESSION['mconn'], "select * from `emaillink` where `emailcertsid`='".$row['id']."'");
1079->				while($r2 = mysqli_fetch_assoc($res))
1081->					mysqli_query($_SESSION['mconn'], "insert into `emaillink` set `emailid`='".$r2['emailid']."',
1086->				$res = mysqli_query($_SESSION['mconn'], $query);
1087->				if(mysqli_num_rows($res) <= 0)
1118->				$res = mysqli_query($_SESSION['mconn'], $query);
1119->				if(mysqli_num_rows($res) <= 0)
1124->				$row = mysqli_fetch_assoc($res);
1130->				mysqli_query($_SESSION['mconn'], "update `emailcerts` set `revoked`='1970-01-01 10:00:01' where `id`='$id'");
1147->				$res = mysqli_query($_SESSION['mconn'], $query);
1148->				if(mysqli_num_rows($res) <= 0)
1153->				$row = mysqli_fetch_assoc($res);
1159->				mysqli_query($_SESSION['mconn'], "delete from `emailcerts` where `id`='$id'");
1178->				mysqli_query($_SESSION['mconn'], "update `emailcerts` set `disablelogin`='$dis' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
1185->					mysqli_query($_SESSION['mconn'], "update `emailcerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
1260->		$ddres = mysqli_query($_SESSION['mconn'], $ddquery);
1261->		$ddrow = mysqli_fetch_assoc($ddres);
1300->			mysqli_query($_SESSION['mconn'], $query);
1314->			mysqli_query($_SESSION['mconn'], $query);
1324->			mysqli_query($_SESSION['mconn'], $query);
1328->		$_SESSION['profile'] = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".$_SESSION['profile']['id']."'"));
1332->		$ddres = mysqli_query($_SESSION['mconn'], $ddquery);
1333->		$ddrow = mysqli_fetch_assoc($ddres);
1365->				$match = mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".$_SESSION['profile']['id']."' and
1368->				$rc = mysqli_num_rows($match);
1386->				mysqli_query($_SESSION['mconn'], "update `users` set `password`=sha1('".$_SESSION['_config']['user']['pword1']."')
1537->			mysqli_query($_SESSION['mconn'], $query);
1538->			$emailid = mysqli_insert_id();
1541->				mysqli_query($_SESSION['mconn'], "insert into `domemaillink` set `emailcertsid`='$emailid', `emailid`='$addy'");
1557->			mysqli_query($_SESSION['mconn'], "update `orgemailcerts` set `csr_name`='$CSRname' where `id`='$emailid'");
1629->			mysqli_query($_SESSION['mconn'], $query);
1630->			$emailid = mysqli_insert_id();
1633->				mysqli_query($_SESSION['mconn'], "insert into `domemaillink` set `emailcertsid`='$emailid', `emailid`='$addy'");
1639->			mysqli_query($_SESSION['mconn'], "update `orgemailcerts` set `csr_name`='$CSRname' where `id`='$emailid'");
1643->		$res = mysqli_query($_SESSION['mconn'], $query);
1644->		if(mysqli_num_rows($res) <= 0)
1672->				$res = mysqli_query($_SESSION['mconn'], $query);
1673->				if(mysqli_num_rows($res) <= 0)
1679->				$row = mysqli_fetch_assoc($res);
1688->				mysqli_query($_SESSION['mconn'], "update `orgemailcerts` set `renewed`='1' where `id`='$id'");
1706->				mysqli_query($_SESSION['mconn'], $query);
1707->				$newid = mysqli_insert_id();
1710->				mysqli_query($_SESSION['mconn'], "update `orgemailcerts` set `csr_name`='$newfile' where `id`='$newid'");
1713->				$res = mysqli_query($_SESSION['mconn'], $query);
1714->				if(mysqli_num_rows($res) > 0)
1745->				$res = mysqli_query($_SESSION['mconn'], $query);
1746->				if(mysqli_num_rows($res) <= 0)
1751->				$row = mysqli_fetch_assoc($res);
1757->				mysqli_query($_SESSION['mconn'], "update `orgemailcerts` set `revoked`='1970-01-01 10:00:01' where `id`='$id'");
1775->				$res = mysqli_query($_SESSION['mconn'], $query);
1776->				if(mysqli_num_rows($res) <= 0)
1781->				$row = mysqli_fetch_assoc($res);
1787->				mysqli_query($_SESSION['mconn'], "delete from `orgemailcerts` where `id`='$id'");
1806->				mysqli_query($_SESSION['mconn'], "update `orgemailcerts` set `description`='$comment' where `id`='$cid'");
1872->		$_SESSION['_config']['CNorg'] = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
1878->		$_SESSION['_config']['SANorg'] = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
1936->		$org = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
1979->		mysqli_query($_SESSION['mconn'], $query);
1980->		$CSRid = mysqli_insert_id();
1985->		mysqli_query($_SESSION['mconn'], "update `orgdomaincerts` set `CSR_name`='$CSRname' where `id`='$CSRid'");
1988->				mysqli_query($_SESSION['mconn'], "insert into `orgdomlink` set `orgdomid`='$id', `orgcertid`='$CSRid'");
1991->				mysqli_query($_SESSION['mconn'], "insert into `orgdomlink` set `orgdomid`='$id', `orgcertid`='$CSRid'");
1994->		$res = mysqli_query($_SESSION['mconn'], $query);
1995->		if(mysqli_num_rows($res) <= 0)
2023->				$res = mysqli_query($_SESSION['mconn'], $query);
2024->				if(mysqli_num_rows($res) <= 0)
2030->				$row = mysqli_fetch_assoc($res);
2039->				mysqli_query($_SESSION['mconn'], "update `orgdomaincerts` set `renewed`='1' where `id`='$id'");
2055->				mysqli_query($_SESSION['mconn'], $query);
2056->				$newid = mysqli_insert_id();
2060->				mysqli_query($_SESSION['mconn'], "update `orgdomaincerts` set `csr_name`='$newfile' where `id`='$newid'");
2062->				$res = mysqli_query($_SESSION['mconn'], "select * from `orgdomlink` where `orgcertid`='".$row['id']."'");
2063->				while($r2 = mysqli_fetch_assoc($res))
2064->					mysqli_query($_SESSION['mconn'], "insert into `orgdomlink` set `orgdomid`='".$r2['id']."', `orgcertid`='$newid'");
2067->				$res = mysqli_query($_SESSION['mconn'], $query);
2068->				if(mysqli_num_rows($res) <= 0)
2072->					$drow = mysqli_fetch_assoc($res);
2101->				$res = mysqli_query($_SESSION['mconn'], $query);
2102->				if(mysqli_num_rows($res) <= 0)
2107->				$row = mysqli_fetch_assoc($res);
2113->				mysqli_query($_SESSION['mconn'], "update `orgdomaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='$id'");
2133->				$res = mysqli_query($_SESSION['mconn'], $query);
2134->				if(mysqli_num_rows($res) <= 0)
2139->				$row = mysqli_fetch_assoc($res);
2145->				mysqli_query($_SESSION['mconn'], "delete from `orgdomaincerts` where `id`='$id'");
2164->				mysqli_query($_SESSION['mconn'], "update `orgdomaincerts` set `description`='$comment' where `id`='$cid'");
2214->			mysqli_query($_SESSION['mconn'], "insert into `orginfo` set `O`='".$_SESSION['_config']['O']."',
2242->			mysqli_query($_SESSION['mconn'], "update `orginfo` set `O`='".$_SESSION['_config']['O']."',
2259->		$res1 = mysqli_query($_SESSION['mconn'], "select * from `orgdomains` where `domain`='$domain'");
2260->		if(mysqli_num_rows($res1) > 0)
2276->		mysqli_query($_SESSION['mconn'], "insert into `orgdomains` set `orgid`='".intval($_SESSION['_config']['orgid'])."', `domain`='$domain'");
2288->		$res1 = mysqli_query($_SESSION['mconn'], "select * from `orgdomains` where `domain` like '$domain' and `id`!='".intval($domid)."'");
2289->		$res2 = mysqli_query($_SESSION['mconn'], "select * from `domains` where `domain` like '$domain' and `deleted`=0");
2290->		if(mysqli_num_rows($res1) > 0 || mysqli_num_rows($res2) > 0)
2304->		$res = mysqli_query($_SESSION['mconn'], $query);
2305->		while($row = mysqli_fetch_assoc($res))
2306->			mysqli_query($_SESSION['mconn'], "update `orgdomaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='".$row['id']."'");
2312->		$res = mysqli_query($_SESSION['mconn'], $query);
2313->		while($row = mysqli_fetch_assoc($res))
2314->			mysqli_query($_SESSION['mconn'], "update `orgemailcerts` set `revoked`='1970-01-01 10:00:01' where `id`='".intval($row['id'])."'");
2319->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `orgdomains` where `id`='".intval($domid)."'"));
2320->		mysqli_query($_SESSION['mconn'], "update `orgdomains` set `domain`='$domain' where `id`='".intval($domid)."'");
2330->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `orgdomains` where `id`='".intval($domid)."'"));
2332->		mysqli_query($_SESSION['mconn'], "delete from `orgdomains` where `id`='".intval($domid)."'");
2349->		$dres = mysqli_query($_SESSION['mconn'], $query);
2350->		while($drow = mysqli_fetch_assoc($dres))
2356->			$res = mysqli_query($_SESSION['mconn'], $query);
2357->			while($row = mysqli_fetch_assoc($res))
2359->				mysqli_query($_SESSION['mconn'], "update `orgdomaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='".intval($row['id'])."'");
2360->				mysqli_query($_SESSION['mconn'], "delete from `orgdomaincerts` where `orgid`='".intval($row['id'])."'");
2361->				mysqli_query($_SESSION['mconn'], "delete from `orgdomlink` where `domid`='".intval($row['id'])."'");
2368->			$res = mysqli_query($_SESSION['mconn'], $query);
2369->			while($row = mysqli_fetch_assoc($res))
2371->				mysqli_query($_SESSION['mconn'], "update `orgemailcerts` set `revoked`='1970-01-01 10:00:01' where `id`='".intval($row['id'])."'");
2372->				mysqli_query($_SESSION['mconn'], "delete from `orgemailcerts` where `id`='".intval($row['id'])."'");
2373->				mysqli_query($_SESSION['mconn'], "delete from `orgemaillink` where `domid`='".intval($row['id'])."'");
2376->		mysqli_query($_SESSION['mconn'], "delete from `org` where `orgid`='".intval($_SESSION['_config']['orgid'])."'");
2377->		mysqli_query($_SESSION['mconn'], "delete from `orgdomains` where `orgid`='".intval($_SESSION['_config']['orgid'])."'");
2378->		mysqli_query($_SESSION['mconn'], "delete from `orginfo` where `id`='".intval($_SESSION['_config']['orgid'])."'");
2390->		$_macc = mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query));
2403->		$is_orguser = mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query));
2417->		$res = mysqli_query($_SESSION['mconn'], $query);
2418->		if(mysqli_num_rows($res) <= 0)
2434->		$res = mysqli_query($_SESSION['mconn'], "select * from `users` where `email`='".$_REQUEST['email']."' and `deleted`=0");
2435->		if(mysqli_num_rows($res) <= 0)
2441->			$row = mysqli_fetch_assoc($res);
2449->				mysqli_query($_SESSION['mconn'], 
2463->		$res = mysqli_query($_SESSION['mconn'], "select * from `org` where `orgid`='$orgid' and `memid`='".$_SESSION['profile']['id']."' and `masteracc`='1'");
2464->		if(mysqli_num_rows($res) <= 0)
2473->		mysqli_query($_SESSION['mconn'], $query);
2485->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `alerts` where `memid`='".intval($_SESSION['profile']['id'])."'"));
2494->		$rc = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `alerts` where `memid`='".intval($_SESSION['profile']['id'])."'"));
2509->		mysqli_query($_SESSION['mconn'], $query);
2522->				mysqli_query($_SESSION['mconn'], "update `users` set `language`='$lang' where `id`='".$_SESSION['profile']['id']."'");
2542->		mysqli_query($_SESSION['mconn'], "insert into `addlang` set `userid`='".intval($_SESSION['profile']['id'])."', `lang`='$addlang'");
2553->		mysqli_query($_SESSION['mconn'], "delete from `addlang` where `userid`='".intval($_SESSION['profile']['id'])."' and `lang`='$remove'");
2596->			mysqli_query($_SESSION['mconn'], $query);
2597->			$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `locations` where `id`='$locid'"));
2604->			mysqli_query($_SESSION['mconn'], $query);
2605->			$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `regions` where `id`='$regid'"));
2611->			$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select `ccid` from `regions` where `id`='$regid'"));
2614->			mysqli_query($_SESSION['mconn'], $query);
2620->			mysqli_query($_SESSION['mconn'], $query);
2621->			$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `locations` where `id`='$locid'"));
2626->			$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `locations` where `id`='$locid'"));
2628->			mysqli_query($_SESSION['mconn'], "delete from `localias` where `locid`='$locid'");
2629->			mysqli_query($_SESSION['mconn'], "delete from `locations` where `id`='$locid'");
2634->			$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `locations` where `id`='$locid'"));
2636->			mysqli_query($_SESSION['mconn'], "update `locations` set `regid`='$newreg' where `id`='$locid'");
2637->			mysqli_query($_SESSION['mconn'], "update `users` set `regid`='$newreg' where `regid`='$oldregid'");
2638->			$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `locations` where `id`='$locid'"));
2644->			$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `regions` where `id`='$regid'"));
2646->			mysqli_query($_SESSION['mconn'], "delete from `locations` where `regid`='$regid'");
2647->			mysqli_query($_SESSION['mconn'], "delete from `regions` where `id`='$regid'");
2656->			$row = mysqli_query($_SESSION['mconn'], "insert into `localias` set `locid`='$locid',`name`='$name'");
2661->			$row = mysqli_query($_SESSION['mconn'], "delete from `localias` where `locid`='$locid' and `name`='$name'");
2690->		$details = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2693->		mysqli_query($_SESSION['mconn'], $query);
2695->		mysqli_query($_SESSION['mconn'], $query);
2721->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($_REQUEST['userid'])."'"));
2735->			mysqli_query($_SESSION['mconn'], "update `users` set `password`=sha1('".mysql_real_escape_string(stripslashes($_REQUEST['newpass']))."') where `id`='".intval($_REQUEST['userid'])."'");
2736->			$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($_REQUEST['userid'])."'"));
2816->		mysqli_query($_SESSION['mconn'], $query);
2817->		$CSRid = mysqli_insert_id();
2820->			mysqli_query($_SESSION['mconn'], "insert into `domlink` set `certid`='$CSRid', `domid`='$dom'");
2823->			mysqli_query($_SESSION['mconn'], "insert into `domlink` set `certid`='$CSRid', `domid`='$dom'");
2829->		mysqli_query($_SESSION['mconn'], "update `domaincerts` set `CSR_name`='$CSRname' where `id`='$CSRid'");
2832->		$res = mysqli_query($_SESSION['mconn'], $query);
2833->		if(mysqli_num_rows($res) <= 0)
2850->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2852->		mysqli_query($_SESSION['mconn'], "update `users` set `tverify`='$ver' where `id`='$memid'");
2860->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2862->		mysqli_query($_SESSION['mconn'], "update `users` set `assurer`='$ver' where `id`='$memid'");
2869->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2871->		mysqli_query($_SESSION['mconn'], "update `users` set `assurer_blocked`='$ver' where `id`='$memid'");
2879->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2881->		mysqli_query($_SESSION['mconn'], "update `users` set `locked`='$ver' where `id`='$memid'");
2889->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2891->		mysqli_query($_SESSION['mconn'], "update `users` set `codesign`='$ver' where `id`='$memid'");
2899->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2901->		mysqli_query($_SESSION['mconn'], "update `users` set `orgadmin`='$ver' where `id`='$memid'");
2909->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2911->		mysqli_query($_SESSION['mconn'], "update `users` set `ttpadmin`='$ver' where `id`='$memid'");
2918->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2922->		mysqli_query($_SESSION['mconn'], "update `users` set `adadmin`='$ver' where `id`='$memid'");
2929->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2931->		mysqli_query($_SESSION['mconn'], "update `users` set `locadmin`='$ver' where `id`='$memid'");
2939->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2941->		mysqli_query($_SESSION['mconn'], "update `users` set `admin`='$ver' where `id`='$memid'");
2948->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2950->		mysqli_query($_SESSION['mconn'], "update `alerts` set `general`='$ver' where `memid`='$memid'");
2957->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2959->		mysqli_query($_SESSION['mconn'], "update `alerts` set `country`='$ver' where `memid`='$memid'");
2966->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2968->		mysqli_query($_SESSION['mconn'], "update `alerts` set `regional`='$ver' where `memid`='$memid'");
2975->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
2977->		mysqli_query($_SESSION['mconn'], "update `alerts` set `radius`='$ver' where `memid`='$memid'");
2985->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='".intval($_REQUEST['userid'])."'"));
3048->		$rc = mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query));
3061->		$rc = mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query));
3082->		mysqli_query($_SESSION['mconn'], $query);
3084->		$rc = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `tverify-vote` where `tverify`='$uid' and `vote`='1'"));
3087->			mysqli_query($_SESSION['mconn'], "update `tverify` set `modified`=NOW() where `id`='$uid'");
3088->			$tverify = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `tverify` where `id`='$uid'"));
3090->			$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='$memid'"));
3091->			$tmp = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select sum(`points`) as `points` from `notary` where `to`='$memid'"));
3106->				mysqli_query($_SESSION['mconn'], "insert into `notary` set `from`='0', `to`='$memid', `points`='$points',
3113->			$res = mysqli_query($_SESSION['mconn'], "select * from `tverify-vote` where `tverify`='$uid' and `vote`='1'");
3114->			while($row = mysqli_fetch_assoc($res))
3123->		$rc = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `tverify-vote` where `tverify`='$uid' and `vote`='-1'"));
3126->			mysqli_query($_SESSION['mconn'], "update `tverify` set `modified`=NOW() where `id`='$uid'");
3127->			$tverify = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `tverify` where `id`='$uid'"));
3129->			$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='$memid'"));
3132->			$res = mysqli_query($_SESSION['mconn'], "select * from `tverify-vote` where `tverify`='$uid' and `vote`='-1'");
3133->			while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/tverify/index/0.php

37->				$account = mysqli_query($_SESSION['mconn'], $query);
38->				if(mysqli_num_rows($account))
54->		$row = mysqli_fetch_assoc($account);
60-> 		$res = mysqli_query($_SESSION['mconn'], $query);
61-> 		$row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/tverify/index.php

57->		$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='$memid'"));
58->		$tmp = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select sum(`points`) as `points` from `notary` where `to`='$memid'"));
91->		if(mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query)) <= 0)
97->			mysqli_query($_SESSION['mconn'], $query);
98->			$tverify = mysqli_insert_id();
105->				mysqli_query($_SESSION['mconn'], $query);
128->			mysqli_query($_SESSION['mconn'], "insert into `notary` set `from`='0', `to`='$memid', `points`='$points',
133->		mysqli_query($_SESSION['mconn'], "update `tverify` set `modified`=NOW() where `id`='$tverify'");


/home/gitRepos/CAcert/CAcert-devel/www/ac.php

38->	$res = mysqli_query($_SESSION['mconn'], $query);
39->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/www/advertising.php

76->		mysqli_query($_SESSION['mconn'], $query);


/home/gitRepos/CAcert/CAcert-devel/www/verify.php

49->		$res = mysqli_query($_SESSION['mconn'], $query);
50->		if(mysqli_num_rows($res) > 0)
52->			$row = mysqli_fetch_assoc($res);
56->				mysqli_query($_SESSION['mconn'], "update `email` set `hash`='', `attempts`='$row[attempts]', `deleted`=NOW() where `id`='$emailid'");
62->			mysqli_query($_SESSION['mconn'], "update `email` set `attempts`='$row[attempts]' where `id`='$emailid'");
66->		$res = mysqli_query($_SESSION['mconn'], $query);
67->		if(mysqli_num_rows($res) <= 0)
74->		$row = mysqli_fetch_assoc($res);
78->			mysqli_query($_SESSION['mconn'], $query);
80->			mysqli_query($_SESSION['mconn'], $query);
107->		$res = mysqli_query($_SESSION['mconn'], $query);
108->		if(mysqli_num_rows($res) > 0)
110->			$row = mysqli_fetch_assoc($res);
121->			mysqli_query($_SESSION['mconn'], $query);
125->		$res = mysqli_query($_SESSION['mconn'], $query);
126->		if(mysqli_num_rows($res) <= 0)
133->		$row = mysqli_fetch_assoc($res);
137->			mysqli_query($_SESSION['mconn'], $query);


/home/gitRepos/CAcert/CAcert-devel/www/sqldump.php

28->    $tables = mysqli_query($_SESSION['mconn'], "SHOW TABLES");
29->    while(list($table_name) = mysqli_fetch_array($tables))
35->        $create = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "SHOW CREATE TABLE `$table_name`"));


/home/gitRepos/CAcert/CAcert-devel/www/rss.php

15->	$res = mysqli_query($_SESSION['mconn'], $query);
16->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/www/api/edu.php

27->    $query= mysqli_query($_SESSION['mconn'], $sql);
28->    if(mysqli_num_rows($query) != 1)
34->      $memid = mysqli_fetch_assoc($query);


/home/gitRepos/CAcert/CAcert-devel/www/api/cemails.php

22->	$res = mysqli_query($_SESSION['mconn'], $query);
23->	if(mysqli_num_rows($res) != 1)
26->	$user = mysqli_fetch_assoc($res);
29->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
44->	$res = mysqli_query($_SESSION['mconn'], $query);
45->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/www/api/ccsr.php

25->	$res = mysqli_query($_SESSION['mconn'], $query);
26->	if(mysqli_num_rows($res) != 1)
28->	$user = mysqli_fetch_assoc($res);
35->		$res = mysqli_query($_SESSION['mconn'], $query);
36->		if(mysqli_num_rows($res) > 0)
38->			$row = mysqli_fetch_assoc($res);
46->	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
88->	mysqli_query($_SESSION['mconn'], $query);
89->	$certid = mysqli_insert_id();
93->	mysqli_query($_SESSION['mconn'], "update `emailcerts` set `csr_name`='$CSRname' where `id`='$certid'");
96->		mysqli_query($_SESSION['mconn'], "insert into `emaillink` set `emailcertsid`='$certid', `emailid`='$emailid'");
101->	$res = mysqli_query($_SESSION['mconn'], $query);
102->	if(mysqli_num_rows($res) <= 0)
104->	$cert = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/www/index.php

122->				mysqli_query($_SESSION['mconn'], $query) || die(mysqli_error());
139->		$res = mysqli_query($_SESSION['mconn'], $query);
140->		if(mysqli_num_rows($res) <= 0)
147->			$_SESSION['lostpw']['user'] = mysqli_fetch_assoc($res);
159->			$_SESSION['profile'] = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], 
258->		$res = mysqli_query($_SESSION['mconn'], $query);
259->		if(mysqli_num_rows($res) <= 0)
262->			$otpres = mysqli_query($_SESSION['mconn'], $otpquery);
263->			if(mysqli_num_rows($otpres) > 0)
265->				$otp = mysqli_fetch_assoc($otpres);
278->				mysqli_query($_SESSION['mconn'], $query);
281->				if(mysqli_num_rows(mysqli_query($_SESSION['mconn'], $query)) <= 0)
284->					mysqli_query($_SESSION['mconn'], $query);
300->							$res = mysqli_query($_SESSION['mconn'], $otpquery);
305->		if(mysqli_num_rows($res) > 0)
309->			$_SESSION['profile'] = mysqli_fetch_assoc($res);
311->			mysqli_query($_SESSION['mconn'], $query);
317->				mysqli_query($_SESSION['mconn'], $query);
323->			$res = mysqli_query($_SESSION['mconn'], $query);
324->			$row = mysqli_fetch_assoc($res);
345->		$res = mysqli_query($_SESSION['mconn'], $query);
346->		if(mysqli_num_rows($res) <= 0)
475->			$res1 = mysqli_query($_SESSION['mconn'], $query);
478->			$res2 = mysqli_query($_SESSION['mconn'], $query);
479->			if(mysqli_num_rows($res1) > 0 || mysqli_num_rows($res2) > 0)
486->			$res = mysqli_query($_SESSION['mconn'], $query);
487->			if(mysqli_num_rows($res) > 0)
489->				$domain = mysqli_fetch_assoc($res);
534->			mysqli_query($_SESSION['mconn'], $query);
535->			$memid = mysqli_insert_id();
540->			mysqli_query($_SESSION['mconn'], $query);
541->			$emailid = mysqli_insert_id();
547->			mysqli_query($_SESSION['mconn'], $query);


/home/gitRepos/CAcert/CAcert-devel/www/gpg.php

77->	if(mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `email` where `memid`='".$_SESSION['profile']['id']."' and `email`='".mysql_real_escape_string($email)."' and `deleted`=0 and `hash`=''")) > 0) return 1;
321->		mysqli_query($_SESSION['mconn'], $query);
322->		$insert_id = mysqli_insert_id();
524->		mysqli_query($_SESSION['mconn'], "update `gpg` set `csr`='$csrname' where `id`='$insert_id'");
530->		$res = mysqli_query($_SESSION['mconn'], $query);
531->		if(mysqli_num_rows($res) <= 0)
554->				mysqli_query($_SESSION['mconn'], "update `gpg` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");


/home/gitRepos/CAcert/CAcert-devel/www/stats.php

28->		$res = mysqli_query($_SESSION['mconn'], $sql);
29->		if ($res && mysqli_numrows($res) > 0) {
30->			$ar = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/www/wot.php

186->		$res = mysqli_query($_SESSION['mconn'], $query);
187->		if(mysqli_num_rows($res) != 1)
195->			$_SESSION['_config']['notarise'] = mysqli_fetch_assoc($res);
203->		$res = mysqli_query($_SESSION['mconn'], $query);
204->		if(mysqli_num_rows($res) >= 1)
229->		$res = mysqli_query($_SESSION['mconn'], $query);
230->		if(mysqli_num_rows($res) > 0)
314->		$res = mysqli_query($_SESSION['mconn'], $query);
315->		$row = mysqli_fetch_assoc($res);
336->		$res = mysqli_query($_SESSION['mconn'], $query);
337->		$drow = mysqli_fetch_assoc($res);
356->		$res = mysqli_query($_SESSION['mconn'], $query);
357->		if(mysqli_num_rows($res) > 0)
380->		mysqli_query($_SESSION['mconn'], $query);
398->			mysqli_query($_SESSION['mconn'], $query);
490->		mysqli_query($_SESSION['mconn'], $query);
510->			$user = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='$userid' and `listme`=1"));
511->			$points = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select sum(`points`) as `total` from `notary`


/home/gitRepos/CAcert/CAcert-devel/www/disputes.php

32->		$res = mysqli_query($_SESSION['mconn'], "select * from `disputeemail` where `id`='$emailid' and `hash`='$hash'");
33->		if(mysqli_num_rows($res) <= 0)
40->		$row = mysqli_fetch_assoc($res);
45->			mysqli_query($_SESSION['mconn'], "update `disputeemail` set hash='',action='reject' where `id`='".intval($emailid)."'");
57->			$res = mysqli_query($_SESSION['mconn'], $query);
58->			if(mysqli_num_rows($res) > 0)
60->				$row = mysqli_fetch_assoc($res);
64->			mysqli_query($_SESSION['mconn'], "update `disputeemail` set hash='',action='accept' where `id`='$emailid'");
65->			$rc = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `domains` where `memid`='$oldmemid' and `deleted`=0"));
66->			$rc2 = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `email` where `memid`='$oldmemid' and `deleted`=0 and `id`!='$emailid'"));
67->			$res = mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='$oldmemid'");
68->			$user = mysqli_fetch_assoc($res);
71->				mysqli_query($_SESSION['mconn'], "update `users` set `deleted`=NOW() where `id`='$oldmemid'");
92->		$res = mysqli_query($_SESSION['mconn'], "select * from `disputeemail` where `id`='$emailid' and `hash`='$hash'");
93->		if(mysqli_num_rows($res) <= 0)
95->			$res = mysqli_query($_SESSION['mconn'], "select * from `disputeemail` where `id`='$emailid' and hash!=''");
96->			if(mysqli_num_rows($res) > 0)
98->				$row = mysqli_fetch_assoc($res);
99->				mysqli_query($_SESSION['mconn'], "update `disputeemail` set `attempts`='".intval($row['attempts'] + 1)."' where `id`='".$row['id']."'");
104->					mysqli_query($_SESSION['mconn'], "update `disputeemail` set hash='',action='failed' where `id`='$emailid'");
118->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `disputeemail` where `id`='$emailid'"));
131->		$res = mysqli_query($_SESSION['mconn'], "select * from `disputedomain` where `id`='$domainid' and `hash`='$hash'");
132->		if(mysqli_num_rows($res) <= 0)
142->			mysqli_query($_SESSION['mconn'], "update `disputedomain` set hash='',action='reject' where `id`='$domainid'");
155->			$res = mysqli_query($_SESSION['mconn'], $query);
156->			if(mysqli_num_rows($res) > 0)
161->			mysqli_query($_SESSION['mconn'], "update `disputedomain` set hash='',action='accept' where `id`='$domainid'");
179->		$res = mysqli_query($_SESSION['mconn'], "select * from `disputedomain` where `id`='$domainid' and `hash`='$hash'");
180->		if(mysqli_num_rows($res) <= 0)
182->			$res = mysqli_query($_SESSION['mconn'], "select * from `disputedomain` where `id`='$domainid' and hash!=''");
183->			if(mysqli_num_rows($res) > 0)
185->				$row = mysqli_fetch_assoc($res);
186->				mysqli_query($_SESSION['mconn'], "update `disputedomain` set `attempts`='".intval($row['attempts'] + 1)."' where `id`='".$row['id']."'");
191->					mysqli_query($_SESSION['mconn'], "update `disputedomain` set hash='',action='failed' where `id`='$domainid'");
205->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `disputedomain` where `id`='$domainid'"));
226->		$res = mysqli_query($_SESSION['mconn'], "select 1 from `email`, `users` where `email`.`email`='$email' and `email`.`memid`=`users`.`id` and (`users`.`assurer_blocked`=1 or `users`.`locked`=1)");
227->		if(mysqli_num_rows($res) > 0)
242->		$res = mysqli_query($_SESSION['mconn'], "select * from `disputeemail` where `email`='$email' and hash!=''");
243->		if(mysqli_num_rows($res) > 0)
253->		$res = mysqli_query($_SESSION['mconn'], $query);
254->		if(mysqli_num_rows($res) <= 0)
261->		$row = mysqli_fetch_assoc($res);
272->		$res = mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='$oldmemid'");
273->		$user = mysqli_fetch_assoc($res);
274->		$rc = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `domains` where `memid`='$oldmemid' and `deleted`=0"));
275->		$rc2 = mysqli_num_rows(mysqli_query($_SESSION['mconn'], "select * from `email` where `memid`='$oldmemid' and `deleted`=0 and `id`!='$emailid'"));
288->		mysqli_query($_SESSION['mconn'], $query);
315->		$res = mysqli_query($_SESSION['mconn'], "select 1 from `domains`, `users` where `domains`.`domain`='$domain' and `domains`.`memid`=`users`.`id` and (`users`.`assurer_blocked`=1 or `users`.`locked`=1)");
316->		if(mysqli_num_rows($res) > 0)
332->		$res = mysqli_query($_SESSION['mconn'], $query);
333->		if(mysqli_num_rows($res) > 0)
342->		$res = mysqli_query($_SESSION['mconn'], $query);
343->		if(mysqli_num_rows($res) <= 0)
346->			$res = mysqli_query($_SESSION['mconn'], $query);
347->			if(mysqli_num_rows($res) > 0)
359->		$row = mysqli_fetch_assoc($res);
432->                $res = mysqli_query($_SESSION['mconn'], $query);
433->                if(mysqli_num_rows($res) <= 0)
449->		mysqli_query($_SESSION['mconn'], $query);


/home/gitRepos/CAcert/CAcert-devel/www/cats/cats_import.php

88->$query = mysqli_query($_SESSION['mconn'], 'SELECT `id` FROM `cats_type` WHERE `type_text` = \''.mysql_real_escape_string($type).'\';');
95->if (mysqli_num_rows($query) > 0) {
96->  $result = mysqli_fetch_array($query);
99->  $query = mysqli_query($_SESSION['mconn'], 'INSERT INTO `cats_type` (`type_text`) VALUES (\''.mysql_real_escape_string($type).'\');');
106->  $typeID = mysqli_insert_id();
109->$query = mysqli_query($_SESSION['mconn'], 'SELECT `id` FROM `cats_variant` WHERE `type_id` = \''.(int)intval($typeID).'\' AND `test_text` = \''.mysql_real_escape_string($variant).'\';');
116->if (mysqli_num_rows($query) > 0) {
117->  $result = mysqli_fetch_array($query);
120->  $query = mysqli_query($_SESSION['mconn'], 'INSERT INTO `cats_variant` (`type_id`, `test_text`) VALUES (\''.(int)intval($typeID).'\', \''.mysql_real_escape_string($variant).'\');');
127->  $variantID = mysqli_insert_id();
131->$query = mysqli_query($_SESSION['mconn'], 'SELECT `ec`.`memid` FROM `emailcerts` AS `ec`, `root_certs` AS `rc` WHERE `ec`.`rootcert` = `rc`.`id` AND `ec`.`serial` = \''.mysql_real_escape_string($serial).'\' AND `rc`.`cert_text` = \''.mysql_real_escape_string($root).'\';');
138->if (mysqli_num_rows($query) > 0) {
139->  $result = mysqli_fetch_array($query);
144->  trigger_error('Cannot find cert '.$serial.' / '.$root.'!'.mysqli_error(), E_USER_ERROR);
149->$query = mysqli_query($_SESSION['mconn'], 'INSERT INTO `cats_passed` (`user_id`, `variant_id`, `pass_date`) VALUES (\''.(int)intval($userID).'\', \''.(int)intval($variantID).'\', \''.mysql_real_escape_string($date).'\');');
151->  if (mysqli_errno() != 1062) { // Duplicate Entry is considered success


/home/gitRepos/CAcert/CAcert-devel/www/news.php

28->		$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
36->		$res = mysqli_query($_SESSION['mconn'], $query);
37->		while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/www/account.php

59->		$res = mysqli_query($_SESSION['mconn'], $query);
60->		if(mysqli_num_rows($res))
62->			$row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/www/alert_hash_collision.php

17->  mysqli_query($_SESSION['mconn'], "update emailcerts set coll_found=1 where memid='".mysql_real_escape_string(substr(@$_POST['usernym'],4))."' and pkhash!='' and pkhash='".$_POST['pkhash']."';");
18->  mysqli_query($_SESSION['mconn'], "update domaincerts set coll_found=1 where memid='".mysql_real_escape_string(substr(@$_POST['usernym'],4))."' and pkhash!='' and pkhash='".$_POST['pkhash']."';");
22->  mysqli_query($_SESSION['mconn'], "update orgemailcerts set coll_found=1 where memid='".mysql_real_escape_string(substr(@$_POST['usernym'],4))."' and pkhash!='' and pkhash='".$_POST['pkhash']."';");
23->  mysqli_query($_SESSION['mconn'], "update orgdomaincerts set coll_found=1 where memid='".mysql_real_escape_string(substr(@$_POST['usernym'],4))."' and pkhash!='' and pkhash='".$_POST['pkhash']."';");


/home/gitRepos/CAcert/CAcert-devel/scripts/cron/permissionreview.php

120->	if(! $res = mysqli_query($_SESSION['mconn'], $query) ) {
124->				mysqli_error()
132->	while ($row = mysqli_fetch_assoc($res)) {


/home/gitRepos/CAcert/CAcert-devel/scripts/cron/updatesort.php

29->	mysqli_query($_SESSION['mconn'], "update `locations` set `acount`=0");
33->	$res = mysqli_query($_SESSION['mconn'], $query);
34->	while($row = mysqli_fetch_assoc($res))
38->		mysqli_query($_SESSION['mconn'], $query);
42->	mysqli_query($_SESSION['mconn'], "update `regions` set `acount`=0");
46->	$res = mysqli_query($_SESSION['mconn'], $query);
47->	while($row = mysqli_fetch_assoc($res))
51->		mysqli_query($_SESSION['mconn'], $query);
57->	mysqli_query($_SESSION['mconn'], "update `countries` set `acount`=0");
61->	$res = mysqli_query($_SESSION['mconn'], $query);
62->	while($row = mysqli_fetch_assoc($res))
66->		mysqli_query($_SESSION['mconn'], $query);


/home/gitRepos/CAcert/CAcert-devel/scripts/cron/removedead.php

26->	$res = mysqli_query($_SESSION['mconn'], $query);
27->	while($row = mysqli_fetch_assoc($res))
29->		mysqli_query($_SESSION['mconn'], "delete from `email` where `memid`='".$row['id']."'");
30->		mysqli_query($_SESSION['mconn'], "delete from `users` where `id`='".$row['id']."'");
36->	mysqli_query($_SESSION['mconn'], $query);
40->	mysqli_query($_SESSION['mconn'], $query);
44->	mysqli_query($_SESSION['mconn'], $query);
48->	mysqli_query($_SESSION['mconn'], $query);
54->	$res = mysqli_query($_SESSION['mconn'], $query);
55->	while($row = mysqli_fetch_assoc($res))
58->		$dres = mysqli_query($_SESSION['mconn'], $query);
59->		$drow = mysqli_fetch_assoc($dres);
66->			mysqli_query($_SESSION['mconn'], $query);
70->		$data = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `users` where `id`='$row[to]'"));
87->		mysqli_query($_SESSION['mconn'], $query);


/home/gitRepos/CAcert/CAcert-devel/scripts/scanforexponents.php

55->			$res = mysqli_query($_SESSION['mconn'], $query);
56->			if(mysqli_num_rows($res) <= 0)
63->			$row = mysqli_fetch_assoc($res);
71->			$res = mysqli_query($_SESSION['mconn'], $query);
72->			if(mysqli_num_rows($res) <= 0)
79->			$row = mysqli_fetch_assoc($res);
87->			$res = mysqli_query($_SESSION['mconn'], $query);
88->			if(mysqli_num_rows($res) <= 0)
95->			$row = mysqli_fetch_assoc($res);
103->			$res = mysqli_query($_SESSION['mconn'], $query);
104->			if(mysqli_num_rows($res) <= 0)
111->			$row = mysqli_fetch_assoc($res);


/home/gitRepos/CAcert/CAcert-devel/scripts/country.php

23->	$res = mysqli_query($_SESSION['mconn'], $query);
24->	while($row = mysqli_fetch_assoc($res))


/home/gitRepos/CAcert/CAcert-devel/scripts/gpgcheck3.php

71->	$res = mysqli_query($_SESSION['mconn'], "SELECT id, memid FROM gpg WHERE crt != ''");
78->	while ($row = mysqli_fetch_row($res)) {
81->	mysqli_free_result($res);
90->		$res = mysqli_query($_SESSION['mconn'], "SELECT fname, mname, lname, suffix FROM users WHERE id = " . $key[1]);
95->		$user = mysqli_fetch_assoc($res);
100->		mysqli_free_result($res);
102->		$res = mysqli_query($_SESSION['mconn'], "SELECT email FROM email WHERE hash = '' AND memid = " . $key[1]);
108->		while ($addr = mysqli_fetch_row($res)) {
111->		mysqli_free_result($res);


/home/gitRepos/CAcert/CAcert-devel/scripts/gpgfillmissingkeyid.php

30->	$res = mysqli_query($_SESSION['mconn'], "SELECT * FROM gpg WHERE crt != '' and keyid is null");
38->	while ($row = mysqli_fetch_assoc($res)) {
57->					mysqli_query($_SESSION['mconn'], "update gpg set keyid='$bits[4]' where id=$row[id]\n");
69->	mysqli_free_result($res);


/home/gitRepos/CAcert/CAcert-devel/scripts/consistence.php

25->	$res = mysqli_query($_SESSION['mconn'], $query);
26->	while($row = mysqli_fetch_assoc($res))
30->		//mysqli_query($_SESSION['mconn'], $query);
37->	$res = mysqli_query($_SESSION['mconn'], $query);
38->	while($row = mysqli_fetch_assoc($res))
42->		//mysqli_query($_SESSION['mconn'], $query);
48->	$res = mysqli_query($_SESSION['mconn'], $query);
49->	echo mysqli_error();
50->	while($row = mysqli_fetch_assoc($res))
56->		if($row['regid']=="1182") mysqli_query($_SESSION['mconn'], $query);
62->	mysqli_query($_SESSION['mconn'], "update `locations` set `acount`=0");
66->	$res = mysqli_query($_SESSION['mconn'], $query);
67->	while($row = mysqli_fetch_assoc($res))
71->		mysqli_query($_SESSION['mconn'], $query);
75->	mysqli_query($_SESSION['mconn'], "update `regions` set `acount`=0");
79->	$res = mysqli_query($_SESSION['mconn'], $query);
80->	while($row = mysqli_fetch_assoc($res))
84->		mysqli_query($_SESSION['mconn'], $query);
90->	mysqli_query($_SESSION['mconn'], "update `countries` set `acount`=0");
94->	$res = mysqli_query($_SESSION['mconn'], $query);
95->	while($row = mysqli_fetch_assoc($res))
99->		mysqli_query($_SESSION['mconn'], $query);
origin_bug-1260 (71,163 bytes)   

Ted

2018-10-28 21:41

administrator   ~0005618

We re-open this and use this case to handle only the mysql migration part of 0001260

GuKKDevel

2018-10-30 22:19

updater   ~0005624

I did some coding. all mysql_-statements replaced by the according mysqli_-statements.

GuKKDevel

2018-10-31 06:09

updater   ~0005626

adding files from new tarballs
diff-bug-1442-newTarballs (9,392 bytes)   
commit 248931ca86784f54fc7c818c72a1cdc374d4138a
Author: Karl-Heinz Gödderz (GuKKDevel) <Devel@GuKK-Online.de>
Date:   Wed Oct 31 07:01:55 2018 +0100

    Bug-1442 follow up for new tarballs

diff --git a/pages/account/27.php b/pages/account/27.php
index 7c73be4..9b229d4 100644
--- a/pages/account/27.php
+++ b/pages/account/27.php
@@ -16,7 +16,7 @@
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */ ?>
 <?
-	$row = mysqli_fetch_assoc(mysql_query("select * from `orginfo` where `id`='".intval($_REQUEST['orgid'])."'"));
+	$row = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], "select * from `orginfo` where `id`='".intval($_REQUEST['orgid'])."'"));
 ?>
 <form method="post" action="account.php">
 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
diff --git a/scripts/59de-ate-freiburg-mail.php.txt b/scripts/59de-ate-freiburg-mail.php.txt
index c8f0d81..681ca47 100644
--- a/scripts/59de-ate-freiburg-mail.php.txt
+++ b/scripts/59de-ate-freiburg-mail.php.txt
@@ -100,7 +100,7 @@
    $city = "2. Februar 2015";
    
     $query = "select * from `locations` where `id`='$locid'";
-        $loc = mysql_fetch_assoc(mysql_query($query));
+        $loc = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
 
     $query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
             (COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
@@ -118,10 +118,10 @@
     // comment next line when starting to send mail not only to me
     //  $query = "select * from `users` where `email` like 'cacerttest%'";
 
-    $res = mysql_query($query);
-    $xrows = mysql_num_rows($res);
+    $res = mysqli_query($_SESSION['mconn'], $query);
+    $xrows = mysqli_num_rows($res);
 
-    while($row = mysql_fetch_assoc($res))
+    while($row = mysqli_fetch_assoc($res))
     {
     //    uncomment next line to send mails ...
         sendmail($row['email'], "[CAcert.org] $eventname - $city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
diff --git a/scripts/60de-ate-bremen-mail.php.txt b/scripts/60de-ate-bremen-mail.php.txt
index 909412d..94c3562 100644
--- a/scripts/60de-ate-bremen-mail.php.txt
+++ b/scripts/60de-ate-bremen-mail.php.txt
@@ -104,7 +104,7 @@
    $city = "5. Mai 2015";
    
     $query = "select * from `locations` where `id`='$locid'";
-        $loc = mysql_fetch_assoc(mysql_query($query));
+        $loc = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
 
     $query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
             (COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
@@ -122,10 +122,10 @@
     // comment next line when starting to send mail not only to me
     //  $query = "select * from `users` where `email` like 'cacerttest%'";
 
-    $res = mysql_query($query);
-    $xrows = mysql_num_rows($res);
+    $res = mysqli_query($_SESSION['mconn'], $query);
+    $xrows = mysqli_num_rows($res);
 
-    while($row = mysql_fetch_assoc($res))
+    while($row = mysqli_fetch_assoc($res))
     {
     //    uncomment next line to send mails ...
         sendmail($row['email'], "[CAcert.org] $eventname - $city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
diff --git a/scripts/61de-ate-dresden-mail.php.txt b/scripts/61de-ate-dresden-mail.php.txt
index 2b3ec78..1fd0155 100644
--- a/scripts/61de-ate-dresden-mail.php.txt
+++ b/scripts/61de-ate-dresden-mail.php.txt
@@ -109,7 +109,7 @@
    
    
     $query = "select * from `locations` where `id`='$locid'";
-        $loc = mysql_fetch_assoc(mysql_query($query));
+        $loc = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
 
     $query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
             (COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
@@ -127,10 +127,10 @@
     // comment next line when starting to send mail not only to me
     //  $query = "select * from `users` where `email` like 'cacerttest%'";
 
-    $res = mysql_query($query);
-    $xrows = mysql_num_rows($res);
+    $res = mysqli_query($_SESSION['mconn'], $query);
+    $xrows = mysqli_num_rows($res);
 
-    while($row = mysql_fetch_assoc($res))
+    while($row = mysqli_fetch_assoc($res))
     {
     //    uncomment next line to send mails ...
         sendmail($row['email'], "[CAcert.org] $eventname - $city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
diff --git a/scripts/62de-froscon2015-mail.php.txt b/scripts/62de-froscon2015-mail.php.txt
index 3923e72..03593a2 100644
--- a/scripts/62de-froscon2015-mail.php.txt
+++ b/scripts/62de-froscon2015-mail.php.txt
@@ -113,7 +113,7 @@
    
    
     $query = "select * from `locations` where `id`='$locid'";
-        $loc = mysql_fetch_assoc(mysql_query($query));
+        $loc = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
 
     $query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
             (COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
@@ -131,10 +131,10 @@
     // comment next line when starting to send mail not only to me
     //  $query = "select * from `users` where `email` like 'cacerttest%'";
 
-    $res = mysql_query($query);
-    $xrows = mysql_num_rows($res);
+    $res = mysqli_query($_SESSION['mconn'], $query);
+    $xrows = mysqli_num_rows($res);
 
-    while($row = mysql_fetch_assoc($res))
+    while($row = mysqli_fetch_assoc($res))
     {
     //    uncomment next line to send mails ...
         sendmail($row['email'], "[CAcert.org] $eventname - $city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
diff --git a/scripts/63dk-ate-nykobing-mail.php.txt b/scripts/63dk-ate-nykobing-mail.php.txt
index f22e52a..1da962d 100644
--- a/scripts/63dk-ate-nykobing-mail.php.txt
+++ b/scripts/63dk-ate-nykobing-mail.php.txt
@@ -117,7 +117,7 @@
    
       
     $query = "select * from `locations` where `id`='$locid'";
-        $loc = mysql_fetch_assoc(mysql_query($query));
+        $loc = mysqli_fetch_assoc(mysqli_query($_SESSION['mconn'], $query));
 
     $query = "SELECT ROUND(6378.137 * ACOS(0.9999999*((SIN(PI() * $loc[lat] / 180) * SIN(PI() * `locations`.`lat` / 180)) +
             (COS(PI() * $loc[lat] / 180 ) * COS(PI() * `locations`.`lat` / 180) *
@@ -135,10 +135,10 @@
     // comment next line when starting to send mail not only to me
     //  $query = "select * from `users` where `email` like 'cacerttest%'";
 
-    $res = mysql_query($query);
-    $xrows = mysql_num_rows($res);
+    $res = mysqli_query($_SESSION['mconn'], $query);
+    $xrows = mysqli_num_rows($res);
 
-    while($row = mysql_fetch_assoc($res))
+    while($row = mysqli_fetch_assoc($res))
     {
     //    uncomment next line to send mails ...
         sendmail($row['email'], "[CAcert.org] $eventname - $city", $lines, "events@cacert.org", "", "", "CAcert Events Organisation", "returns@cacert.org", 1);
diff --git a/scripts/oa03-csr_org_client_cert.php.txt b/scripts/oa03-csr_org_client_cert.php.txt
index 89a49c4..76dbf5b 100644
--- a/scripts/oa03-csr_org_client_cert.php.txt
+++ b/scripts/oa03-csr_org_client_cert.php.txt
@@ -78,10 +78,10 @@ $query = "SELECT orginfo.contact as email, orginfo.O, 1 as status
     // comment next line when starting to send mail not only to me 
     //	$query = "select * from `users` where `email` like 'cacerttest%'";
 
-	$res = mysql_query($query);
-	$xrows = mysql_num_rows($res);
+	$res = mysqli_query($_SESSION['mconn'], $query);
+	$xrows = mysqli_num_rows($res);
 
-	while($row = mysql_fetch_assoc($res))
+	while($row = mysqli_fetch_assoc($res))
 	{
     //    uncomment next line to send mails ...
 		sendmail($row['email'], "[CAcert.org] ".$subject.(empty($country)?"":" (".$country.")") , $lines, "support@cacert.org", "", "", "CAcert OA Support", "returns@cacert.org", 1);
diff --git a/scripts/send_policy_cca_correct_20150221_1.php b/scripts/send_policy_cca_correct_20150221_1.php
index 797771a..bd1f7d6 100644
--- a/scripts/send_policy_cca_correct_20150221_1.php
+++ b/scripts/send_policy_cca_correct_20150221_1.php
@@ -92,9 +92,9 @@ $query = "
                 AND        user_agreements.document = 'CCA')
 	GROUP BY users.id";
 
-$res = mysql_query($query);
+$res = mysqli_query($_SESSION['mconn'], $query);
 
-while($row = mysql_fetch_assoc($res))
+while($row = mysqli_fetch_assoc($res))
 {
 	$mailtxt = "Dear ${row["fname"]} ${row["lname"]},\n".$lines_EN."\n\n";
 
diff --git a/scripts/send_policy_cca_correct_20150221_2.php b/scripts/send_policy_cca_correct_20150221_2.php
index fa9f384..c56cfdc 100644
--- a/scripts/send_policy_cca_correct_20150221_2.php
+++ b/scripts/send_policy_cca_correct_20150221_2.php
@@ -76,9 +76,9 @@ $query = "
 			AND        user_agreements.document = 'CCA')
 	GROUP BY users.id";
 
-$res = mysql_query($query);
+$res = mysqli_query($_SESSION['mconn'], $query);
 
-while($row = mysql_fetch_assoc($res))
+while($row = mysqli_fetch_assoc($res))
 {
 	$mailtxt = "Dear ${row["fname"]} ${row["lname"]},\n".$lines_EN."\n\n";
 
diff-bug-1442-newTarballs (9,392 bytes)   

Ted

2018-11-18 14:45

administrator   ~0005685

GuKK, I noticed two typos:
- includes/notary.inc.php line 1202: mmysqli_query should probably start with only one "m"
- scripts/58at-ate-wien-mail.php.txt line 117: dto.

Ted

2018-11-26 22:48

administrator   ~0005689

bug-1442 is merged into branch the integration branch (resulting in branch test-1442) for testing. Currently test-1442 is installed on both, old and new, testservers (https://test.cacert.org/ and https://test3.cacert.org:14943/)

Note that test3 is not yet completely installed, so it's more for playing around. Test reports from test.cacert.org are welcome!

Ted

2021-06-08 21:42

administrator   ~0006012

The System Admin console whas mostly broken, all actions which did write in table AdminLog did not work.

I located the problem in includes/notary.inc.php, function write_se_log. I'm not sure how this could happen (@GuKKDevel, maybe you can have a look?), but in fact an undefined function g() was called...

Comitted the fix as bd240d31200c621c0c16381bd99b47b9b1a8d45c to bug-1442

Ted

2021-08-07 21:32

administrator   ~0006071

@jandd has created pull request 0000021 (already end of 2020) in github which sounds like it is a more extensive replacement of the old API... This needs more evaluation!

Issue History

Date Modified Username Field Change
2018-10-20 20:57 Ted New Issue
2018-10-20 21:01 Ted Description Updated
2018-10-20 21:13 Ted Additional Information Updated
2018-10-20 21:14 Ted Priority normal => high
2018-10-21 10:30 Ted Assigned To => Ted
2018-10-21 10:30 Ted Status new => solved?
2018-10-21 10:30 Ted Resolution open => duplicate
2018-10-21 10:30 Ted Relationship added duplicate of 0001260
2018-10-26 17:56 GuKKDevel File Added: origin_release
2018-10-26 17:56 GuKKDevel File Added: origin_bug-1260
2018-10-26 17:56 GuKKDevel Note Added: 0005615
2018-10-28 21:41 Ted Assigned To Ted => GuKKDevel
2018-10-28 21:41 Ted Status solved? => needs work
2018-10-28 21:41 Ted Note Added: 0005618
2018-10-28 21:41 Ted Relationship deleted 0001260
2018-10-28 21:42 Ted Relationship added child of 0001260
2018-10-30 22:19 GuKKDevel File Added: diff-release-bug1442
2018-10-30 22:19 GuKKDevel Note Added: 0005624
2018-10-30 22:20 GuKKDevel Status needs work => needs review & testing
2018-10-31 06:09 GuKKDevel File Added: diff-bug-1442-newTarballs
2018-10-31 06:09 GuKKDevel Note Added: 0005626
2018-11-18 13:45 Ted Relationship added related to 0001031
2018-11-18 14:45 Ted Note Added: 0005685
2018-11-26 22:48 Ted Note Added: 0005689
2021-06-08 21:42 Ted Note Added: 0006012
2021-08-07 21:32 Ted Note Added: 0006071