Merged with launchpad.

This commit is contained in:
nikolark committed 2011-08-09 11:17:59 +02:00
commit 90792d84c6
4 files changed
+47

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
<?php
require '../inside/credentials-sample.php';
$str = getDSN();
preg_match('|([^:]+)://([^:]+):([^@]+)@([^/]+)/(.+)|', $str, $output);
list($str, $driver, $user_name, $password, $host_name, $db_name) = $output;
if(!mysql_connect($host_name, $user_name, $password)) die("error connecting to db");
if(!mysql_select_db($db_name)) die('error selecting databse');
+31
View File
@@ -0,0 +1,31 @@
<?php
require 'db.php';
$res = mysql_query("SELECT * FROM `din_division` WHERE `updated` IS NULL or `updated` + INTERVAL 90 DAY < now()");
while($row = mysql_fetch_assoc($res))
{
$time = strtotime($row['updated']);
$diff = $time - time();
$diff /= 60 * 60 * 24;
$diff = round($diff);
var_dump($row);
if($diff == 0)
{
}
else if($diff == 7)
{
}
else if($diff == 14)
{
}
else if($diff == 21)
{
}
}
+1
View File
@@ -764,6 +764,7 @@ private function logError($username, $error)
}
public function _deleteEvent() {
die('<html><body>Sletting av eventer er midlertidig avskrudd. Ta kontakt med komans@studentersamfundet.no eller edb@studentersamfundet.no for &aring; f&aring; slettet ting.</body></html>');
Event :: delete(scriptParam("eventid"));
}
+3
View File
@@ -1561,7 +1561,10 @@ function getStickerPeriod($time)
$start = date('Y', strtotime($time));
return $start . '/' . (substr($start,2,2) + 1);
}
// Migration (nikolark)
/* Returns true if the current logged in user have the migrated flag. */
function is_migrated() {
$conn = db_connect();
$uid = getCurrentUser();