} ?> " /></td> </tr> </table> </div> <div class="pm_mess"> <textarea tabindex="3" rows="12" name="message" id="message"><?php if ($mType == 'quote') { echo '[quote][quoteAuthor]' . __('Quote from:', 'osclass_pm') . ' ' . $user['s_name'] . ' ' . __('on: ', 'osclass_pm') . osc_format_date($pm['message_date']) . ', ' . osclass_pm_format_time($pm['message_date']) . "[/quoteAuthor]\n" . $pm['pm_message'] . "\n[/quote]"; } ?> </textarea> <br /> <?php if (pmSent()) { ?> <p> <label for="outbox"><input <?php if (pmSaveSent() == 1) { echo 'checked'; } ?> tabindex="4" type="checkbox" class="input_check" tabindex="5" value="1" id="outbox" name="outbox"><?php _e(' Save a copy in my outbox', 'osclass_pm'); ?> </label> </p> <?php } ?>
} else { $locking = pmBlocking() != '' ? pmBlocking() : ''; } $pmDrafts = ''; $dao_preference = new Preference(); if (Params::getParam('pmDrafts') != '') { $pmDrafts = Params::getParam('pmDrafts'); } else { $pmDrafts = pmDrafts() != '' ? pmDrafts() : ''; } $pmSent = ''; $dao_preference = new Preference(); if (Params::getParam('pmSent') != '') { $pmSent = Params::getParam('pmSent'); } else { $pmSent = pmSent() != '' ? pmSent() : ''; } $pmAdmin = ''; $dao_preference = new Preference(); if (Params::getParam('pmAdmin') != '') { $pmAdmin = Params::getParam('pmAdmin'); } else { $pmAdmin = pmAdmin() != '' ? pmAdmin() : ''; } if (Params::getParam('option') == 'stepone') { $dao_preference->update(array("s_value" => $sendEmail), array("s_section" => "plugin-osclass_pm", "s_name" => "sendEmail")); $dao_preference->update(array("s_value" => $maxPm), array("s_section" => "plugin-osclass_pm", "s_name" => "maxPMs")); $dao_preference->update(array("s_value" => $deletePM), array("s_section" => "plugin-osclass_pm", "s_name" => "deletePM")); $dao_preference->update(array("s_value" => $pmBlocking), array("s_section" => "plugin-osclass_pm", "s_name" => "pmBlocking")); $dao_preference->update(array("s_value" => $pmDrafts), array("s_section" => "plugin-osclass_pm", "s_name" => "pmDrafts")); $dao_preference->update(array("s_value" => $pmSent), array("s_section" => "plugin-osclass_pm", "s_name" => "pmSent"));
function osclass_pm_user_menu() { $newPMs = ModelPM::newInstance()->getRecipientMessages(osc_logged_user_id(), 1, 1, 'pm_id', 'DESC'); $newPMdrafts = ModelPM::newInstance()->getDrafts(osc_logged_user_id(), 'pm_id', 'DESC'); $countPMs = count($newPMs); $countPMdrafts = count($newPMdrafts); echo '<a class="list-group-item" href="' . osc_render_file_url(osc_plugin_folder(__FILE__) . 'user-inbox.php') . '" >' . __('Inbox', 'osclass_pm') . ' (' . $countPMs . ')</a>'; if (pmDrafts()) { echo '<a class="list-group-item" href="' . osc_render_file_url(osc_plugin_folder(__FILE__) . 'user-drafts.php') . '" >' . __('Drafts', 'osclass_pm') . ' (' . $countPMdrafts . ')</a>'; } if (pmSent()) { echo '<a class="list-group-item" href="' . osc_render_file_url(osc_plugin_folder(__FILE__) . 'user-outbox.php') . '" >' . __('Outbox', 'osclass_pm') . '</a>'; } echo '<a class="list-group-item" href="' . osc_render_file_url(osc_plugin_folder(__FILE__) . 'user-pm-settings.php') . '" >' . __('PM Settings', 'osclass_pm') . '</a>'; }