From da766f1159b7f2dbc5a83fab6fa1a68d2294ed93 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Wed, 28 Jul 2010 04:45:07 -0700 Subject: [PATCH] starting on email --- mod/message.php | 55 ++++++++++++++++++++++++++++++++++++++++++++ view/prv_message.tpl | 24 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 mod/message.php create mode 100644 view/prv_message.tpl diff --git a/mod/message.php b/mod/message.php new file mode 100644 index 000000000..b2cfcf402 --- /dev/null +++ b/mod/message.php @@ -0,0 +1,55 @@ +argc > 1) && ($a->argv[1] == 'new')) { + + $tpl = file_get_contents('view/jot-header.tpl'); + + $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl())); + + $select .= contact_select('messageto','message-to-select'); + $tpl = file_get_contents('view/prv_message.tpl'); + $o = replace_macros($tpl,array( + '$select' => $select + + )); + + return $o; + } + + if($a->argc == 1) { + + $r = q("SELECT * FROM `mail` WHERE `seen` = 0 AND `uid` = %d LIMIT %d , %d ", + intval($_SESSION['uid']), + intval($a->pager['start']), + intval($a->pager['itemspage']) + ); + if(! count($r)) { + notice( t('No messages.') . EOL); + return; + } + + + } + + +} \ No newline at end of file diff --git a/view/prv_message.tpl b/view/prv_message.tpl new file mode 100644 index 000000000..6a0b161ef --- /dev/null +++ b/view/prv_message.tpl @@ -0,0 +1,24 @@ + +
+
+ +$select + + + +
+
+ +
+
Upload Photo
+
+ +
+ +
+
+
+ +