[phpwebapp-commits] CVS: top10/templates/preference_list preference_list.php,1.5,1.5.2.1 preference_
Brought to you by:
dashohoxha
|
From: Dashamir H. <das...@us...> - 2004-01-14 16:26:05
|
Update of /cvsroot/phpwebapp/top10/templates/preference_list
In directory sc8-pr-cvs1:/tmp/cvs-serv4744/templates/preference_list
Modified Files:
Tag: maisp
preference_list.php preference_list.js preference_list.html
preference_list.db
Log Message:
removed some sourceforge references etc.
Index: preference_list.php
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/preference_list/preference_list.php,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** preference_list.php 5 Jan 2004 14:42:00 -0000 1.5
--- preference_list.php 14 Jan 2004 16:25:59 -0000 1.5.2.1
***************
*** 2,8 ****
/*
This file is part of Top10. Top10 is a web application for ranking
! and evaluating web application projects at SourceForge.
! Copyright 2003 Dashamir Hoxha, das...@us...
Top10 is free software; you can redistribute it and/or modify it under
--- 2,8 ----
/*
This file is part of Top10. Top10 is a web application for ranking
! and evaluating free software projects.
! Copyright (C) 2003, 2004 Dashamir Hoxha, das...@us...
Top10 is free software; you can redistribute it and/or modify it under
***************
*** 31,34 ****
--- 31,48 ----
function on_set_username($event_args)
{
+ $username = $event_args["username"];
+
+ //check that the username exists
+ $rs = WebApp::openRS("get_user", $event_args);
+ if ($rs->EOF()) //no such user
+ {
+ $msg = "There is no user with username '$username'.";
+ WebApp::message($msg);
+ return;
+ }
+
+ //set the new username
+ WebApp::setSVar("username", $username);
+
//merge the DB and session pref lists,
//taking care to remove duplications
***************
*** 57,60 ****
--- 71,88 ----
function on_change_username($event_args)
{
+ $username = $event_args["username"];
+
+ //check that the username exists
+ $rs = WebApp::openRS("get_user", $event_args);
+ if ($rs->EOF()) //no such user
+ {
+ $msg = "There is no user with username '$username'.";
+ WebApp::message($msg);
+ return;
+ }
+
+ //set the new username
+ WebApp::setSVar("username", $username);
+
//discard the previous preference list and
//instead of it place the preference list of
***************
*** 83,88 ****
//send a confirmation request e-mail
$username = WebApp::getSVar("username");
! //$to = $username."@users.sourceforge.net";
! $to = "dasho";
$subject = "Top10: Confirmation Required";
$message = $this->get_message_body($request_id);
--- 111,116 ----
//send a confirmation request e-mail
$username = WebApp::getSVar("username");
! $rs = WebApp::openRS("get_user");
! $to = $rs->Field("email");
$subject = "Top10: Confirmation Required";
$message = $this->get_message_body($request_id);
***************
*** 91,95 ****
//display a confirmation message
$msg = "A confirmation e-mail has been sent \n"
! . "to $use...@us... .\n"
. "If you don't confirm the changes in 24 hours, \n"
. "they will be discarded.";
--- 119,123 ----
//display a confirmation message
$msg = "A confirmation e-mail has been sent \n"
! . "to $to .\n"
. "If you don't confirm the changes in 24 hours, \n"
. "they will be discarded.";
***************
*** 273,278 ****
$message = "
The site $top10_site received a request from [$remote_addr]
! on behalf of user '$username' (at SourceForge) for saving the list
! of prefered projects, which is as follows:
$proj_list
--- 301,306 ----
$message = "
The site $top10_site received a request from [$remote_addr]
! on behalf of user '$username' for saving the list of prefered projects,
! which is as follows:
$proj_list
Index: preference_list.js
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/preference_list/preference_list.js,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -C2 -d -r1.1.1.1 -r1.1.1.1.2.1
*** preference_list.js 23 Sep 2003 14:04:14 -0000 1.1.1.1
--- preference_list.js 14 Jan 2004 16:25:59 -0000 1.1.1.1.2.1
***************
*** 2,8 ****
/*
This file is part of Top10. Top10 is a web application for ranking
! and evaluating web application projects at SourceForge.
! Copyright 2003 Dashamir Hoxha, das...@us...
Top10 is free software; you can redistribute it and/or modify it under
--- 2,8 ----
/*
This file is part of Top10. Top10 is a web application for ranking
! and evaluating free software projects.
! Copyright (C) 2003, 2004 Dashamir Hoxha, das...@us...
Top10 is free software; you can redistribute it and/or modify it under
***************
*** 37,42 ****
username = prompt("Set a username: ");
if (username==null) return; //canceled
! session.setVar("username", username);
! SendEvent("preference_list", "set_username");
}
else
--- 37,41 ----
username = prompt("Set a username: ");
if (username==null) return; //canceled
! SendEvent("preference_list", "set_username", "username="+username);
}
else
***************
*** 51,56 ****
username = prompt("Set a new username: ");
if (username==null) return; //canceled
! session.setVar("username", username);
! SendEvent("preference_list", "change_username");
}
}
--- 50,54 ----
username = prompt("Set a new username: ");
if (username==null) return; //canceled
! SendEvent("preference_list", "change_username", "username="+username);
}
}
Index: preference_list.html
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/preference_list/preference_list.html,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** preference_list.html 26 Sep 2003 15:32:21 -0000 1.2
--- preference_list.html 14 Jan 2004 16:25:59 -0000 1.2.2.1
***************
*** 4,8 ****
<a class="button" href="javascript:change_username()">Change Username</a>
<If condition="'{{username}}'=='guest'">
! Please identify yourself by giving your SourceForge username.
</If>
</p>
--- 4,8 ----
<a class="button" href="javascript:change_username()">Change Username</a>
<If condition="'{{username}}'=='guest'">
! Please identify yourself by giving your username.
</If>
</p>
Index: preference_list.db
===================================================================
RCS file: /cvsroot/phpwebapp/top10/templates/preference_list/preference_list.db,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** preference_list.db 5 Jan 2004 14:42:00 -0000 1.2
--- preference_list.db 14 Jan 2004 16:25:59 -0000 1.2.2.1
***************
*** 9,12 ****
--- 9,19 ----
</Recordset>
+ <Recordset ID="get_user">
+ <Query>
+ SELECT * FROM users
+ WHERE username = '{{username}}'
+ </Query>
+ </Recordset>
+
<Recordset ID="get_pref_list">
<Query>
|