diff options
-rw-r--r-- | mod/message.php | 55 | ||||
-rw-r--r-- | view/prv_message.tpl | 24 |
2 files changed, 79 insertions, 0 deletions
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 @@ +<?php + +require_once('view/acl_selectors.php'); + +function message_init(&$a) { + + +} + + + + + + + +function message_content(&$a) { + + if(! local_user()) { + notice( t('Permission denied.') . EOL); + return; + } + + if(($a->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 @@ + +<div id="prvmail-wrapper" > +<form id="prvmail-form" action="message" method="post" > + +$select + +<textarea rows="5" cols="64" class="prvmail-text" id="prvmail-text" name="body" ></textarea> + +</div> +<div id="prvmail-submit-wrapper" > +<input type="submit" id="prvmail-submit" name="submit" value="Submit" /> + <div id="prvmail-upload-wrapper" > + <div id="prvmail-upload-div" ><img id="prvmail-upload" src="images/camera-icon.gif" alt="Upload Photo" title="Upload Photo" /></div> + </div> + <div id="prvmail-link-wrapper" > + <img id="prvmail-link" src="images/link-icon.gif" alt="Insert web link" title="Insert web link" onclick="jotGetLink();" /> + </div> + <div id="prvmail-rotator-wrapper" > + <img id="prvmail-rotator" src="images/rotator.gif" alt="Please wait" title="Please wait" style="display: none;" /> + </div> +</div> +<div id="prvmail-end"></div> +</form> +</div> |