Changeset 39
- Timestamp:
- 09/03/06 14:04:53 (2 years ago)
- Files:
-
- wifidog/wifidog-auth/wifidog/classes/Mail.php (modified) (5 diffs)
- wifidog/wifidog-auth/wifidog/classes/Node.php (modified) (2 diffs)
- wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListHTML.php (modified) (1 diff)
- wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListJiWireCSV.php (modified) (1 diff)
- wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListRSS.php (modified) (1 diff)
- wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListXML.php (modified) (1 diff)
- wifidog/wifidog-auth/wifidog/classes/Statistics.php (modified) (1 diff)
- wifidog/wifidog-auth/wifidog/templates/sites/index.tpl (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wifidog/wifidog-auth/wifidog/classes/Mail.php
r30 r39 38 38 * @author Francois Proulx <francois.proulx@gmail.com> 39 39 * @copyright 2005-2006 Francois Proulx, Technologies Coeus inc. 40 * @version Subversion $Id: Mail.php 10 17 2006-04-10 18:57:34Z dana$40 * @version Subversion $Id: Mail.php 1088 2006-09-03 03:35:06Z max-horvath $ 41 41 * @link http://www.wifidog.org/ 42 42 */ 43 44 /** 45 * Load required classes 46 */ 47 require_once('include/class.phpmailer.php'); 48 require_once('include/class.smtp.php'); 43 49 44 50 /** … … 50 56 * @copyright 2005-2006 Francois Proulx, Technologies Coeus inc. 51 57 */ 52 53 require_once('include/class.phpmailer.php');54 require_once('include/class.smtp.php');55 56 58 class Mail 57 59 { … … 69 71 "mytrashmail.com", "simplicato.net", "sneakemail.com", "sofort-mail.de", 70 72 "spamcon.org", "spamex.com", "spamgourmet.com", "spamhole.com", 71 "spammotel.com", "trash-mail.de", "woodyland.org", "domaine.com" 73 "spammotel.com", "trash-mail.de", "woodyland.org", "dumpmail.de", 74 "antispam24.de", "nervmich.net", "spamday.com", "throwaway.de", "domaine.com" 72 75 ); 73 // :DRAZZIB: Ajout du domaine : "domaine.com"76 // :DRAZZIB: Ajout du domaine : "domaine.com" 74 77 75 78 /** … … 315 318 $mail = new PHPMailer(); 316 319 $mail->CharSet = "utf-8"; 317 318 $mail->Mailer = EMAIL_MAILER; 320 321 $mail->Mailer = EMAIL_MAILER; 319 322 if (EMAIL_MAILER == 'smtp') { 320 323 $mail->Host = EMAIL_HOST; … … 326 329 } 327 330 } 328 331 329 332 $mail->AddAddress($this->getRecipientEmail(), $this->getRecipientName()); 330 333 $mail->From = $this->getSenderEmail(); wifidog/wifidog-auth/wifidog/classes/Node.php
r35 r39 235 235 $html = ''; 236 236 $name = "{$user_prefix}"; 237 $sql = "SELECT node_id, name, node_deployment_status, is_splash_only_node from nodes WHERE 1=1 $sql_additional_where ORDER BY node_id";237 $sql = "SELECT node_id, name, node_deployment_status, is_splash_only_node from nodes WHERE 1=1 $sql_additional_where ORDER BY lower(node_id)"; 238 238 $node_rows = null; 239 239 $db->execSql($sql, $node_rows, false); … … 1453 1453 } 1454 1454 1455 /** Check if an node exists */ 1456 private function nodeExists($id) 1457 { 1458 global $db; 1455 /** 1456 * Checks if an node exists 1457 * 1458 * @param string $id Id of node to be checked 1459 * 1460 * @return bool True if node exists, else false 1461 * 1462 * @static 1463 * @access private 1464 */ 1465 private static function nodeExists($id) 1466 { 1467 // Define globals 1468 global $db; 1469 1470 // Init values 1459 1471 $retval = false; 1472 1460 1473 $id_str = $db->escapeString($id); 1461 1474 $sql = "SELECT * FROM nodes WHERE node_id='{$id_str}'"; 1462 1475 $row = null; 1463 1476 $db->execSqlUniqueRes($sql, $row, false); 1464 if ($row != null) 1465 {1477 1478 if ($row != null) { 1466 1479 $retval = true; 1467 1480 } 1481 1468 1482 return $retval; 1469 1483 } wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListHTML.php
r35 r39 135 135 // Modif PR : list all deployed or non wifidog nodes in all networks 136 136 137 $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY name", $this->_nodes, false);137 $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY lower(name)", $this->_nodes, false); 138 138 } 139 139 wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListJiWireCSV.php
r24 r39 100 100 101 101 // Query the database, sorting by node name 102 // $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY name", $this->_nodes, false);102 // $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE network_id = '" . $db->escapeString($this->_network->getId()) . "' AND (node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE') ORDER BY lower(name)", $this->_nodes, false); 103 103 // PR 104 $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY name", $this->_nodes, false);104 $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY lower(name)", $this->_nodes, false); 105 105 } 106 106 wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListRSS.php
r24 r39 107 107 108 108 // Query the database, sorting by node name 109 $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY name", $this->_nodes, false);109 $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY lower(name)", $this->_nodes, false); 110 110 } 111 111 wifidog/wifidog-auth/wifidog/classes/NodeLists/NodeListXML.php
r24 r39 107 107 // Query the database, sorting by node name 108 108 109 $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY name", $this->_nodes, false);109 $db->execSql("SELECT *, (NOW()-last_heartbeat_timestamp) AS since_last_heartbeat, EXTRACT(epoch FROM creation_date) as creation_date_epoch, CASE WHEN ((NOW()-last_heartbeat_timestamp) < interval '5 minutes') THEN true ELSE false END AS is_up FROM nodes WHERE node_deployment_status = 'DEPLOYED' OR node_deployment_status = 'NON_WIFIDOG_NODE' ORDER BY lower(name)", $this->_nodes, false); 110 110 } 111 111 wifidog/wifidog-auth/wifidog/classes/Statistics.php
r38 r39 395 395 $sql_join = " JOIN node_stakeholders ON (nodes.node_id=node_stakeholders.node_id AND user_id='$user_id') "; 396 396 } 397 $sql = "SELECT nodes.node_id, nodes.name from nodes $sql_join WHERE 1=1 ORDER BY node_id";397 $sql = "SELECT nodes.node_id, nodes.name from nodes $sql_join WHERE 1=1 ORDER BY lower(node_id)"; 398 398 $node_rows = null; 399 399 $db->execSql($sql, $node_rows, false);
