minor: formatting

git-svn-id: https://webim.svn.sourceforge.net/svnroot/webim/trunk@112 c66351dc-e62f-0410-b875-e3a5c0b9693f
This commit is contained in:
Evgeny Gryaznov 2008-09-29 22:37:47 +00:00
parent 7427fb4c68
commit bcc0ad4746
2 changed files with 16 additions and 24 deletions

View File

@ -36,16 +36,9 @@ function get_operators() {
$link = connect(); $link = connect();
$query = "select * from chatoperator order by vclogin"; $query = "select * from chatoperator order by vclogin";
$result = mysql_query($query,$link) or die(' Query failed: ' .mysql_error().": ".$query); $result = select_multi_assoc($query, $link);
$operators = array();
while ($op = mysql_fetch_array($result, MYSQL_ASSOC)) {
$operators[] = $op;
}
mysql_free_result($result);
mysql_close($link); mysql_close($link);
return $operators; return $result;
} }
function update_operator($operatorid,$login,$password,$localename,$commonname) { function update_operator($operatorid,$login,$password,$localename,$commonname) {
@ -65,7 +58,7 @@ function update_operator($operatorid,$login,$password,$localename,$commonname) {
function create_operator_($login,$password,$localename,$commonname,$link) { function create_operator_($login,$password,$localename,$commonname,$link) {
$query = sprintf( $query = sprintf(
"insert into chatoperator (vclogin,vcpassword,vclocalename,vccommonname".") values ('%s','%s','%s','%s'".")", "insert into chatoperator (vclogin,vcpassword,vclocalename,vccommonname) values ('%s','%s','%s','%s')",
mysql_real_escape_string($login), mysql_real_escape_string($login),
md5($password), md5($password),
mysql_real_escape_string($localename), mysql_real_escape_string($localename),

View File

@ -87,7 +87,6 @@ function generate_pagination($pagination) {
$result .= $pagination_spacing; $result .= $pagination_spacing;
} }
if( $curr_page < $pagination['total'] ) { if( $curr_page < $pagination['total'] ) {
$result .= $pagination_spacing.generate_pagination_link($curr_page+1, generate_pagination_image("nextpage")); $result .= $pagination_spacing.generate_pagination_link($curr_page+1, generate_pagination_image("nextpage"));
} }