Changeset 609
- Timestamp:
- 05/01/05 21:22:02 (8 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 8 modified
-
ChangeLog (modified) (1 diff)
-
wifidog/admin/content_admin.php (modified) (1 diff)
-
wifidog/admin/owner_sendfiles.php (modified) (1 diff)
-
wifidog/classes/Authenticator.php (modified) (1 diff)
-
wifidog/classes/MainUI.php (modified) (3 diffs)
-
wifidog/classes/User.php (modified) (3 diffs)
-
wifidog/config.php (modified) (2 diffs)
-
wifidog/local_content/default/stylesheet.css (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/ChangeLog
r608 r609 1 2005-04-30 Francois Proulx <francois.proulx@gmail.com> 2 * Logout button will now destroy session AND render token USED 3 1 4 2005-04-30 Francois Proulx <francois.proulx@gmail.com> 2 5 * Fixed bug that could potentially let non owners add content in /content through content groups -
trunk/wifidog-auth/wifidog/admin/content_admin.php
r591 r609 46 46 if ($_REQUEST['action'] == 'list_all_content' || $_REQUEST['action'] == 'list_persistent_content') 47 47 { 48 $html .= '<form action="'.CONTENT_ADMIN_ABS_HREF.'" method="get">';49 50 if($_REQUEST['action'] == 'list_persistent_content')51 {52 $sql = "SELECT * FROM content WHERE is_persistent = true ORDER BY content_type";53 $html .= "<input type='hidden' name='action' value='list_all_content'>\n";54 $html .= "<input type=submit name='list_submit' value='"._("Show all content")."'>\n";55 }56 else57 {58 $sql = "SELECT * FROM content ORDER BY content_type";59 $html .= "<input type='hidden' name='action' value='list_persistent_content'>\n";60 $html .= "<input type=submit name='list_submit' value='"._("Show only persistent content")."'>\n";61 } 48 $html .= '<form action="'.CONTENT_ADMIN_ABS_HREF.'" method="get">'; 49 50 if ($_REQUEST['action'] == 'list_persistent_content') 51 { 52 $sql = "SELECT * FROM content WHERE is_persistent = true ORDER BY content_type"; 53 $html .= "<input type='hidden' name='action' value='list_all_content'>\n"; 54 $html .= "<input type=submit name='list_submit' value='"._("Show all content")."'>\n"; 55 } 56 else 57 { 58 $sql = "SELECT * FROM content ORDER BY content_type"; 59 $html .= "<input type='hidden' name='action' value='list_persistent_content'>\n"; 60 $html .= "<input type=submit name='list_submit' value='"._("Show only persistent content")."'>\n"; 61 } 62 62 $db->ExecSql($sql, $results, false); 63 64 $html .= '</form>';65 63 64 $html .= '</form>'; 65 66 66 if ($results != null) 67 67 { 68 68 $html .= "<table>\n"; 69 69 $html .= "<tr><th>"._("Title")."</th><th>"._("Content type")."</th><th>"._("Description")."</th></tr>\n"; 70 71 // Get the current user72 $user = User :: getCurrentUser();73 74 foreach ($results as $row)70 71 // Get the current user 72 $user = User :: getCurrentUser(); 73 74 if ($user) 75 75 { 76 $content = Content :: getObject($row['content_id']); 77 if ($user->isSuperAdmin() || $content->isOwner(User :: getCurrentUser())) 78 { 79 if (!empty ($row['title'])) 80 { 81 $title = Content :: getObject($row['title']); 82 $title_ui = $title->__toString(); 83 } 84 else 85 { 86 $title_ui = null; 87 } 88 89 if (!empty ($row['description'])) 90 { 91 $description = Content :: getObject($row['description']); 92 $description_ui = $description->__toString(); 93 } 94 else 95 { 96 $description_ui = null; 97 } 98 $href = GENERIC_OBJECT_ADMIN_ABS_HREF."?object_id=$row[content_id]&object_class=Content&action=edit"; 99 $html .= "<tr><td>$title_ui</td><td><a href='$href'>$row[content_type]</a></td><td>$description_ui</td>\n"; 100 $href = GENERIC_OBJECT_ADMIN_ABS_HREF."?object_id=$row[content_id]&object_class=Content&action=delete"; 101 $html .= "<td><a href='$href'>Delete</a></td>"; 102 103 $html .= "</tr>\n"; 104 } 76 foreach ($results as $row) 77 { 78 $content = Content :: getObject($row['content_id']); 79 if ($user->isSuperAdmin() || $content->isOwner(User :: getCurrentUser())) 80 { 81 if (!empty ($row['title'])) 82 { 83 $title = Content :: getObject($row['title']); 84 $title_ui = $title->__toString(); 85 } 86 else 87 { 88 $title_ui = null; 89 } 90 91 if (!empty ($row['description'])) 92 { 93 $description = Content :: getObject($row['description']); 94 $description_ui = $description->__toString(); 95 } 96 else 97 { 98 $description_ui = null; 99 } 100 $href = GENERIC_OBJECT_ADMIN_ABS_HREF."?object_id=$row[content_id]&object_class=Content&action=edit"; 101 $html .= "<tr><td>$title_ui</td><td><a href='$href'>$row[content_type]</a></td><td>$description_ui</td>\n"; 102 $href = GENERIC_OBJECT_ADMIN_ABS_HREF."?object_id=$row[content_id]&object_class=Content&action=delete"; 103 $html .= "<td><a href='$href'>Delete</a></td>"; 104 105 $html .= "</tr>\n"; 106 } 107 } 105 108 } 106 109 $html .= "</table>\n"; -
trunk/wifidog-auth/wifidog/admin/owner_sendfiles.php
r568 r609 23 23 * @author Copyright (C) 2005 Pascal Leclerc 24 24 */ 25 //TODO: Move to Node getAdminUI 25 26 26 /*27 Notes/TODO :28 Valider les donnees passees en arguments29 Utiliser smarty30 Permettre la recherche de user directement dans l'interface owner31 156.486 / 5120.0 MB Used32 33 */34 27 35 28 define('BASEPATH','../'); -
trunk/wifidog-auth/wifidog/classes/Authenticator.php
r530 r609 82 82 // Stop traffic counters update 83 83 global $db; 84 $db->ExecSqlUpdate("UPDATE connections SET "."timestamp_out=NOW(),"."token_status='".TOKEN_USED."' "."WHERE conn_id='{$info['conn_id']}';\n" );84 $db->ExecSqlUpdate("UPDATE connections SET "."timestamp_out=NOW(),"."token_status='".TOKEN_USED."' "."WHERE conn_id='{$info['conn_id']}';\n", false); 85 85 } 86 86 -
trunk/wifidog-auth/wifidog/classes/MainUI.php
r608 r609 57 57 $html .= "<ul class='admin_menu_list'>\n"; 58 58 59 if($current_user ->isSuperAdmin())59 if($current_user && $current_user->isSuperAdmin()) 60 60 { 61 61 $html .= "<li><a href='user_log.php'>"._("User logs")."</a></li>\n"; … … 69 69 70 70 // If the user is super admin OR owner of at least one hotspot show the menu 71 if($current_user ->isSuperAdmin() || $current_user->isOwner())71 if($current_user && ($current_user->isSuperAdmin() || $current_user->isOwner())) 72 72 { 73 73 /* Node admin */ … … 97 97 98 98 /* Network admin */ 99 if($current_user ->isSuperAdmin())99 if($current_user && $current_user->isSuperAdmin()) 100 100 { 101 101 $html .= "<div class='admin_section_container'>\n"; -
trunk/wifidog-auth/wifidog/classes/User.php
r608 r609 54 54 try 55 55 { 56 $user = new User($session->get(SESS_USER_ID_VAR)); 56 $user = self :: getObject($session->get(SESS_USER_ID_VAR)); 57 //$user = new User($session->get(SESS_USER_ID_VAR)); 57 58 } 58 59 catch (Exception $e) … … 374 375 375 376 } 376 377 377 378 function getValidationToken() 378 379 { … … 460 461 global $session; 461 462 $session->destroy(); 462 //TODO: Completed this part with Network::getObject()463 /*464 try {465 $connections = $this->getConnections();466 foreach($connections as $connection)467 if($connection['token_status'] == TOKEN_UNUSED || $connection['token_status'] == TOKEN_INUSE)468 Network::getCurrentNetwork()->getAuthenticator()->logout(array('conn_id' => $connection['conn_id']), $errmsg);469 } catch(Exception $e)470 {471 //TODO: Error management ( MainUI )472 } */463 try 464 { 465 $connections = $this->getConnections(); 466 if ($connections) 467 foreach ($connections as $connection) 468 if ($connection['token_status'] == TOKEN_UNUSED || $connection['token_status'] == TOKEN_INUSE) 469 Network :: getCurrentNetwork()->getAuthenticator()->logout(array ('conn_id' => $connection['conn_id']), $errmsg); 470 } 471 catch (Exception $e) 472 { 473 } 473 474 } 474 475 -
trunk/wifidog-auth/wifidog/config.php
r592 r609 7 7 * 8 8 * $Log$ 9 * Revision 1.42 2005/05/02 01:22:02 fproulx 10 * 2005-04-30 Francois Proulx <francois.proulx@gmail.com> 11 * * Logout button will now destroy session AND render token USED 12 * 9 13 * Revision 1.41 2005/04/28 03:14:48 fproulx 10 14 * *** empty log message *** … … 45 49 * * Fixed bugs in File 46 50 * * Wrote part of EmbeddedContent ( partially working ) 47 * * TODO:add support for parameters and attributes in EmbeddedContent51 * * add support for parameters and attributes in EmbeddedContent 48 52 * 49 53 * Revision 1.34 2005/04/21 14:58:29 fproulx -
trunk/wifidog-auth/wifidog/local_content/default/stylesheet.css
r607 r609 325 325 .flickr_title { 326 326 color: white; 327 visibility: hidden;328 327 width: 200px; 329 328 background: #696969; … … 371 370 } 372 371 .flickr_description { 373 visibility: hidden;374 372 width: 180px; 375 373 background: #696969;
