projects
/
brisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e0d475
)
trailing spaces removed
author
Matteo Nastasi (mop)
<nastasi@alternativeoutput.it>
Thu, 22 May 2014 13:22:18 +0000
(15:22 +0200)
committer
Matteo Nastasi (mop)
<nastasi@alternativeoutput.it>
Thu, 22 May 2014 13:22:18 +0000
(15:22 +0200)
test/nonblocking.php
patch
|
blob
|
history
web/Obj/dbase_pgsql.phh
patch
|
blob
|
history
web/Obj/singlemsg.phh
patch
|
blob
|
history
web/mailmgr.php
patch
|
blob
|
history
web/usermgmt.php
patch
|
blob
|
history
webtest/singlemsg.php
patch
|
blob
|
history
webtest/test_db.php
patch
|
blob
|
history
diff --git
a/test/nonblocking.php
b/test/nonblocking.php
index
4125c86
..
8085510
100755
(executable)
--- a/
test/nonblocking.php
+++ b/
test/nonblocking.php
@@
-4,7
+4,7
@@
* brisk - test/nonblocking.php
*
* Copyright (C) 2014 Matteo Nastasi
* brisk - test/nonblocking.php
*
* Copyright (C) 2014 Matteo Nastasi
- * mailto: nastasi@alternativeoutput.it
+ * mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
@@
-98,7
+98,7
@@
function sock_mgmt($sock)
}
}
}
}
-function main()
+function main()
{
GLOBAL $blocking_mode;
{
GLOBAL $blocking_mode;
@@
-120,7
+120,7
@@
function main()
if (file_exists($file_socket)) {
unlink($file_socket);
}
if (file_exists($file_socket)) {
unlink($file_socket);
}
-
+
$old_umask = umask(0);
if (($list = stream_socket_server($unix_socket, $err, $errs)) === FALSE) {
return (FALSE);
$old_umask = umask(0);
if (($list = stream_socket_server($unix_socket, $err, $errs)) === FALSE) {
return (FALSE);
@@
-128,7
+128,7
@@
function main()
umask($old_umask);
printf("Blocking mode (listen): %d\n", $blocking_mode);
stream_set_blocking($list, $blocking_mode); // Set the stream to non-blocking
umask($old_umask);
printf("Blocking mode (listen): %d\n", $blocking_mode);
stream_set_blocking($list, $blocking_mode); // Set the stream to non-blocking
-
+
while(1) {
printf("\nLOOP BEGIN\n");
if (($new_unix = stream_socket_accept($list)) == FALSE) {
while(1) {
printf("\nLOOP BEGIN\n");
if (($new_unix = stream_socket_accept($list)) == FALSE) {
@@
-145,4
+145,4
@@
function main()
}
main();
}
main();
-?>
\ No newline at end of file
+?>
diff --git
a/web/Obj/dbase_pgsql.phh
b/web/Obj/dbase_pgsql.phh
index
73712ed
..
4c34c2c
100644
(file)
--- a/
web/Obj/dbase_pgsql.phh
+++ b/
web/Obj/dbase_pgsql.phh
@@
-160,9
+160,9
@@
class BriskDB
function user_add($login, $pass, $email, $type, $disa_reas, $guar_code) {
GLOBAL $G_dbpfx;
function user_add($login, $pass, $email, $type, $disa_reas, $guar_code) {
GLOBAL $G_dbpfx;
- $usr_sql = sprintf("INSERT INTO %susers (login, pass, email, type, disa_reas, guar_code)
+ $usr_sql = sprintf("INSERT INTO %susers (login, pass, email, type, disa_reas, guar_code)
VALUES ('%s', '%s', '%s', %d, %d, %d) RETURNING *;",
VALUES ('%s', '%s', '%s', %d, %d, %d) RETURNING *;",
- $G_dbpfx, escsql(strtolower($login)), escsql($pass), escsql($email),
+ $G_dbpfx, escsql(strtolower($login)), escsql($pass), escsql($email),
$type, $disa_reas, $guar_code);
if (! (($usr_pg = $this->query($usr_sql)) != FALSE && pg_affected_rows($usr_pg) == 1) ) {
$type, $disa_reas, $guar_code);
if (! (($usr_pg = $this->query($usr_sql)) != FALSE && pg_affected_rows($usr_pg) == 1) ) {
diff --git
a/web/Obj/singlemsg.phh
b/web/Obj/singlemsg.phh
index
e49ef87
..
7230f34
100644
(file)
--- a/
web/Obj/singlemsg.phh
+++ b/
web/Obj/singlemsg.phh
@@
-3,7
+3,7
@@
* brisk - singlemsg.php
*
* Copyright (C) 2014 Matteo Nastasi
* brisk - singlemsg.php
*
* Copyright (C) 2014 Matteo Nastasi
- * mailto: nastasi@alternativeoutput.it
+ * mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
@@
-57,7
+57,7
@@
function singlemsg($title, $msg, $redir_url=FALSE) {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php echo "$redir_meta\n"?>
<link rel="shortcut icon" href="img/brisk_ico.png">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php echo "$redir_meta\n"?>
<link rel="shortcut icon" href="img/brisk_ico.png">
-<script type="text/javascript" src="commons.js"></script>
+<script type="text/javascript" src="commons.js"></script>
<script type="text/javascript" src="prefs.js"></script>
<!-- <script type="text/javascript" src="myconsole.js"></script> -->
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript" src="prefs.js"></script>
<!-- <script type="text/javascript" src="myconsole.js"></script> -->
<script type="text/javascript" src="menu.js"></script>
@@
-75,12
+75,12
@@
function singlemsg($title, $msg, $redir_url=FALSE) {
<body style="/*background-image: url('img/saddysunbg.png');*/">
<?php
/* MLANG: "briscola chiamata in salsa ajax", */
<body style="/*background-image: url('img/saddysunbg.png');*/">
<?php
/* MLANG: "briscola chiamata in salsa ajax", */
-
+
mt_srand(make_seed());
if (!$G_is_local) {
$rn = rand(0, 1);
mt_srand(make_seed());
if (!$G_is_local) {
$rn = rand(0, 1);
-
- if ($rn == 0) {
+
+ if ($rn == 0) {
$banner_top_left = '<script type="text/javascript"><!--
google_ad_client = "pub-5246925322544303";
google_ad_width = 234;
$banner_top_left = '<script type="text/javascript"><!--
google_ad_client = "pub-5246925322544303";
google_ad_width = 234;
@@
-100,7
+100,7
@@
google_color_url = "000000";
</script>';
$banner_top_right = carousel_top();
}
</script>';
$banner_top_right = carousel_top();
}
- else {
+ else {
$banner_top_left = carousel_top();
$banner_top_right = '<script type="text/javascript"><!--
google_ad_client = "pub-5246925322544303";
$banner_top_left = carousel_top();
$banner_top_right = '<script type="text/javascript"><!--
google_ad_client = "pub-5246925322544303";
@@
-141,7
+141,7
@@
google_color_url = "000000";
</div>';
printf($brisk_header_form);
</div>';
printf($brisk_header_form);
-?>
+?>
<div style="text-align: center; font-size: 24px; height: 600px;">
<div style="height: 200px;"></div>
<div style="text-align: center; font-size: 24px; height: 600px;">
<div style="height: 200px;"></div>
diff --git
a/web/mailmgr.php
b/web/mailmgr.php
index
91d73c7
..
5613c3b
100644
(file)
--- a/
web/mailmgr.php
+++ b/
web/mailmgr.php
@@
-3,7
+3,7
@@
* brisk - mailmgr.php
*
* Copyright (C) 2014 Matteo Nastasi
* brisk - mailmgr.php
*
* Copyright (C) 2014 Matteo Nastasi
- * mailto: nastasi@alternativeoutput.it
+ * mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
diff --git
a/web/usermgmt.php
b/web/usermgmt.php
index
2629fb8
..
d4bee21
100644
(file)
--- a/
web/usermgmt.php
+++ b/
web/usermgmt.php
@@
-138,7
+138,7
@@
SELECT usr.*, guar.login AS guar_login
break;
}
$usr_obj = pg_fetch_object($usr_pg, 0);
break;
}
$usr_obj = pg_fetch_object($usr_pg, 0);
-
+
printf("KEY: %s: %s %s<br>\n", $id, $value, $usr_obj->login);
// change state
$passwd = passwd_gen();
printf("KEY: %s: %s %s<br>\n", $id, $value, $usr_obj->login);
// change state
$passwd = passwd_gen();
@@
-179,11
+179,11
@@
SELECT usr.*, guar.login AS guar_login
// retrieve list of active tournaments
$usr_sql = sprintf("
// retrieve list of active tournaments
$usr_sql = sprintf("
-SELECT usr.*, guar.login AS guar_login
- FROM %susers AS usr
- JOIN %susers AS guar ON guar.code = usr.guar_code
+SELECT usr.*, guar.login AS guar_login
+ FROM %susers AS usr
+ JOIN %susers AS guar ON guar.code = usr.guar_code
WHERE ( (usr.type & (CAST (X'%x' as integer))) = (CAST (X'%x' as integer)) )
WHERE ( (usr.type & (CAST (X'%x' as integer))) = (CAST (X'%x' as integer)) )
- AND usr.disa_reas = %d;",
+ AND usr.disa_reas = %d;",
$G_dbpfx, $G_dbpfx,
USER_FLAG_TY_ALL, USER_FLAG_TY_DISABLE,
USER_DIS_REA_NU_TOBECHK);
$G_dbpfx, $G_dbpfx,
USER_FLAG_TY_ALL, USER_FLAG_TY_DISABLE,
USER_DIS_REA_NU_TOBECHK);
@@
-191,12
+191,12
@@
SELECT usr.*, guar.login AS guar_login
log_crit("stat-day: select from tournaments failed");
break;
}
log_crit("stat-day: select from tournaments failed");
break;
}
-
+
$usr_n = pg_numrows($usr_pg);
$tab_lines = "";
for ($i = 0 ; $i < $usr_n ; $i++) {
$usr_obj = pg_fetch_object($usr_pg, $i);
$usr_n = pg_numrows($usr_pg);
$tab_lines = "";
for ($i = 0 ; $i < $usr_n ; $i++) {
$usr_obj = pg_fetch_object($usr_pg, $i);
-
+
$tab_lines .= sprintf("<tr><td><input name=\"f_newuser%d\" type=\"checkbox\" CHECKED></td><td>%s</td><td></td></tr>\n",
$usr_obj->code, eschtml($usr_obj->login), eschtml($usr_obj->guar_login));
}
$tab_lines .= sprintf("<tr><td><input name=\"f_newuser%d\" type=\"checkbox\" CHECKED></td><td>%s</td><td></td></tr>\n",
$usr_obj->code, eschtml($usr_obj->login), eschtml($usr_obj->guar_login));
}
diff --git
a/webtest/singlemsg.php
b/webtest/singlemsg.php
index
3f9e132
..
a6cd60a
100644
(file)
--- a/
webtest/singlemsg.php
+++ b/
webtest/singlemsg.php
@@
-3,7
+3,7
@@
* brisk - singlemsg.php
*
* Copyright (C) 2014 Matteo Nastasi
* brisk - singlemsg.php
*
* Copyright (C) 2014 Matteo Nastasi
- * mailto: nastasi@alternativeoutput.it
+ * mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
@@
-33,4
+33,4
@@
require_once("Obj/singlemsg.phh");
singlemsg("Ci siamo title", "Ci siamo fun");
singlemsg("Ci siamo title", "Ci siamo fun");
-?>
\ No newline at end of file
+?>
diff --git
a/webtest/test_db.php
b/webtest/test_db.php
index
de2bcdc
..
1c0332b
100644
(file)
--- a/
webtest/test_db.php
+++ b/
webtest/test_db.php
@@
-3,7
+3,7
@@
* brisk - test_db.php
*
* Copyright (C) 2014 Matteo Nastasi
* brisk - test_db.php
*
* Copyright (C) 2014 Matteo Nastasi
- * mailto: nastasi@alternativeoutput.it
+ * mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
@@
-55,4
+55,4
@@
function main() {
}
main();
}
main();
-?>
\ No newline at end of file
+?>