-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jacob Litwicki
committed
Oct 24, 2013
0 parents
commit 8561829
Showing
8,925 changed files
with
300,320 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
/**** | ||
* | ||
* @author: [email protected] | ||
* @SVN: $Id$ | ||
* @Copyright 2009,2010 Litwicki Media LLC | ||
* | ||
***/ | ||
|
||
DEFINE('MY_DASHBOARD', true); | ||
$root_path = '../'; | ||
$phpEx = substr(strrchr(__FILE__, '.'), 1); | ||
include($root_path . 'common.' . $phpEx); | ||
|
||
$table_array = array( | ||
AUTH_GROUPS_TABLE, | ||
AUTH_USERS_TABLE, | ||
LOG_TABLE, | ||
SESSIONS_TABLE, | ||
CLIENTS_TABLE, | ||
CLIENT_USERS_TABLE, | ||
PROJECTS_TABLE, | ||
PROJECT_LOG_TABLE, | ||
PROJECT_USERS_TABLE, | ||
APPROVED_PROJECTS_TABLE, | ||
TASKS_TABLE, | ||
TASK_USERS_TABLE, | ||
TASK_TIMELOG_TABLE, | ||
APPROVED_TASKS_TABLE, | ||
MILESTONES_TABLE, | ||
MILESTONE_TASKS_TABLE, | ||
MESSAGES_TABLE, | ||
READ_MESSAGES_TABLE, | ||
REPLIES_TABLE, | ||
REQUESTS_TABLE, | ||
PROPOSALS_TABLE, | ||
ATTACHMENTS_TABLE, | ||
INVOICES_TABLE, | ||
INVOICE_HOURS_TABLE, | ||
INVOICE_RECURRENCE_TABLE, | ||
); | ||
|
||
foreach($table_array as $table_name) | ||
{ | ||
$sql = "DELETE FROM $table_name"; | ||
$db->sql_query($sql); | ||
} | ||
|
||
//handle users/user groups differently | ||
$sql = "DELETE FROM ".USERS_TABLE." WHERE user_id > 2"; | ||
$db->sql_query($sql); | ||
|
||
$sql = "DELETE FROM ".USER_GROUP_TABLE." WHERE user_id > 2"; | ||
$db->sql_query($sql); | ||
|
||
print "done"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
/**** | ||
* | ||
* @author: [email protected] | ||
* @SVN: $Id: attachments.php 6 2010-04-23 16:33:21Z jake $ | ||
* @Copyright 2009,2010 Litwicki Media LLC | ||
* | ||
***/ | ||
|
||
define('MY_DASHBOARD', true); | ||
$root_path = './'; | ||
$phpEx = substr(strrchr(__FILE__, '.'), 1); | ||
include($root_path . 'common.' . $phpEx); | ||
|
||
//setup user | ||
$user->setup(); | ||
$user_id = (int) $user->data['user_id']; | ||
$username = $user->data['user_realname']; | ||
|
||
if( !$user_id ) | ||
{ | ||
login_box("$base_url"); | ||
} | ||
|
||
//setup user permissions | ||
$auth->setup($user_id); | ||
|
||
//build user dashboard | ||
$dashboard = new dashboard(); | ||
$dashboard->setup($user_id); | ||
|
||
$today = time(); | ||
|
||
if( isset($_POST['remove_file']) ) | ||
{ | ||
$message_id = $_POST['message_id']; | ||
$attachment_id = $_POST['attachment_id']; | ||
$sql = "UPDATE ".ATTACHMENTS_TABLE." SET status=0, status_date=$today WHERE attachment_id=$attachment_id"; | ||
$db->sql_query($sql); | ||
} | ||
elseif( isset($_POST['add_file']) ) | ||
{ | ||
$message_id = $_POST['message_id']; | ||
$attachment_id = $_POST['attachment_id']; | ||
$sql = "UPDATE ".ATTACHMENTS_TABLE." SET status=1, status_date=$today WHERE attachment_id=$attachment_id"; | ||
$db->sql_query($sql); | ||
} | ||
else | ||
{ | ||
//get out of here! | ||
exit; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
/**** | ||
* | ||
* @author: [email protected] | ||
* @SVN: $Id: auth.php 31 2010-05-24 03:15:38Z jake $ | ||
* @Copyright 2009,2010 Litwicki Media LLC | ||
* | ||
***/ | ||
|
||
define('MY_DASHBOARD', true); | ||
$root_path = './'; | ||
$phpEx = substr(strrchr(__FILE__, '.'), 1); | ||
include($root_path . 'common.' . $phpEx); | ||
|
||
if( isset($_POST['login']) ) | ||
{ | ||
$password = $_POST['password']; | ||
$username = sanitize($_POST['username']); | ||
$redirect_url = urldecode($_POST['redirect']); | ||
|
||
$expire_time = 0; | ||
|
||
if( $_POST['persist'] == "true" ) | ||
{ | ||
$expire_time = time() + 60 * 60 * 24 * $config['session_length']; | ||
} | ||
|
||
$sql = "SELECT * FROM ".USERS_TABLE." WHERE user_email='$username'"; | ||
$result = $db->sql_query($sql); | ||
$row = $db->sql_fetchrow($result); | ||
|
||
if( phpbb_check_hash($password, $row['user_password']) && $row['status'] == 1 ) | ||
{ | ||
$user->session_create($row, $expire_time); | ||
redirect($redirect_url); | ||
} | ||
else | ||
{ | ||
//update login attempts | ||
$user->login_attempts($username); | ||
|
||
$template->assign(array( | ||
'LOGIN_ERROR' => true, | ||
)); | ||
|
||
login_box($redirect_url); | ||
} | ||
} | ||
elseif( isset($_GET['logout']) ) | ||
{ | ||
$user->session_kill(); | ||
login_box($base_url); | ||
} | ||
else | ||
{ | ||
//are we already authorized with a session? | ||
$user->setup(); | ||
$user_id = (int) $user->data['user_id']; | ||
|
||
if( !$user_id ) | ||
{ | ||
$redirect_url = isset($_GET['r']) ? urlencode($_GET['r']) : urlencode($base_url); | ||
login_box($redirect_url); | ||
} | ||
else | ||
{ | ||
redirect($base_url); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<?php | ||
|
||
/**** | ||
* | ||
* @author: [email protected] | ||
* @SVN: $Id$ | ||
* @Copyright 2009,2010 Litwicki Media LLC | ||
* | ||
***/ | ||
|
||
define('MY_DASHBOARD', true); | ||
$root_path = './'; | ||
$phpEx = substr(strrchr(__FILE__, '.'), 1); | ||
include($root_path . 'common.' . $phpEx); | ||
|
||
$type = $_GET['type']; | ||
|
||
if( $type == 'invoice' ) | ||
{ | ||
$sql = "SELECT | ||
c.client_id as value, c.company, | ||
(SELECT COUNT(invoice_id) FROM ".INVOICES_TABLE." WHERE client_id=c.client_id) AS invoice_count | ||
FROM | ||
".CLIENTS_TABLE." c | ||
WHERE | ||
( | ||
company like '%" . sanitize($_GET['term']) . "%' | ||
OR company like '%" . ucwords(sanitize($_GET['term'])) . "%' | ||
AND client_id IN(SELECT client_id FROM ".INVOICES_TABLE.") | ||
)"; | ||
|
||
$result = $db->sql_query($sql); | ||
if( $db->sql_affectedrows($result) > 0 ) | ||
{ | ||
while( $row = $db->sql_fetchrow($result) ) | ||
{ | ||
$row['label'] = 'Client #' . $row['value'] . ' - ' . $row['company'] . ' (' . $row['invoice_count'] . ')'; | ||
$autocomplete[] = $row; | ||
} | ||
} | ||
else | ||
{ | ||
$row['label'] = 'No matches...'; | ||
$row['value'] = '0'; | ||
$autocomplete[] = $row; | ||
} | ||
} | ||
|
||
if( $type == 'clientuser' || $type == 'messageuser' ) | ||
{ | ||
$sql = "SELECT | ||
user_id, user_realname | ||
FROM | ||
".USERS_TABLE." | ||
WHERE | ||
user_realname like '%" . sanitize($_GET['term']) . "%' | ||
OR user_realname like '%" . ucwords(sanitize($_GET['term'])) . "%'"; | ||
|
||
$result = $db->sql_query($sql); | ||
|
||
if( $db->sql_affectedrows($result) > 0 ) | ||
{ | ||
while( $row = $db->sql_fetchrow($result) ) | ||
{ | ||
$row['label'] = $row['user_realname'] . ' (' . $row['user_id'] . ')'; | ||
$row['value'] = $row['user_id']; | ||
$autocomplete[] = $row; | ||
} | ||
} | ||
else | ||
{ | ||
$row['label'] = 'No matches...'; | ||
$row['value'] = '0'; | ||
$autocomplete[] = $row; | ||
} | ||
} | ||
|
||
if(!empty($autocomplete)) | ||
{ | ||
echo json_encode($autocomplete); | ||
} | ||
|
||
exit; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
10 | ||
|
||
dir | ||
48 | ||
svn+ssh://[email protected]/opt/SVN/dashboard/avatars | ||
svn+ssh://[email protected]/opt/SVN/dashboard | ||
|
||
|
||
|
||
2010-06-02T04:13:16.554081Z | ||
39 | ||
jake | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
85bd04ae-a507-4b06-88d8-2e27c24bfeda | ||
|
||
female.jpg | ||
file | ||
|
||
|
||
|
||
|
||
2010-06-02T18:13:27.713050Z | ||
632536506b7b4d07d2feaf1bf56a2b62 | ||
2010-06-02T04:13:16.554081Z | ||
39 | ||
jake | ||
has-props | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
3764 | ||
|
||
male.jpg | ||
file | ||
|
||
|
||
|
||
|
||
2010-06-02T18:13:27.715050Z | ||
9b06faa55780eb43d3b074c1e1496636 | ||
2010-06-02T04:13:16.554081Z | ||
39 | ||
jake | ||
has-props | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
3000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
K 13 | ||
svn:mime-type | ||
V 24 | ||
application/octet-stream | ||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
K 13 | ||
svn:mime-type | ||
V 24 | ||
application/octet-stream | ||
END |
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.