} /** IF THE NODE IS AN DEBATE ISSUE GET THE ACTIVITY ALSO FOR ALL THE ITEMS BELOW IN THE TREE **/ if ($nodetype == "Issue") { $conSet = getDebate($nodeid); $conns = $conSet->connections; $countl = count($conns); for ($l = 0; $l < $countl; $l++) { $con = $conns[$l]; $from = $con->from; $to = $con->to; $node = array(); $node['NodeID'] = $from->nodeid; $node['Name'] = $from->name; $node['NodeType'] = $from->role->name; $node['UserID'] = $from->users[0]->userid; $as = getNodeActivity($from->nodeid, $followlastrun, false); $activities = $as->activities; if (count($activities) > 0) { $nextMessage .= '<br /><br /><br />' . $LNG->ADMIN_CRON_FOLLOW_ACTIVITY_FOR . ' ' . getNodeTypeText($node['NodeType'], false) . ': <span style="font-weight:bold">' . $from->name . '</span> <a href="' . $CFG->homeAddress . 'ui/popups/activityviewer.php?nodeid=' . $from->nodeid . '&fromtime=' . $followlastrun . '">' . $LNG->ADMIN_CRON_FOLLOW_EXPLORE_LINK . '</a>'; $nextMessage .= processActivityList($activities, $node, $user); } } } } $user->updateFollowLastRun($now); if ($nextMessage != "") { $nextMessage = $LNG->ADMIN_CRON_FOLLOW_DATE_FROM_TO_PART1 . " " . date("d M Y", $followlastrun) . " " . $LNG->ADMIN_CRON_FOLLOW_DATE_FROM_TO_PART2 . " " . date("d M Y", $now) . "<br />" . $nextMessage; //email messages can't have more than 998 characters on one line or you get odd characters ! randomly through the email. $nextMessage = wordwrap($nextMessage, 900, "\n"); $nextMessage .= '<br><br><p style="font-size:8pt">' . $LNG->ADMIN_CRON_FOLLOW_UNSUBSCRIBE_PART1 . ' <a href="' . $CFG->homeAddress . 'user.php?userid=' . $userid . '"> ' . $LNG->ADMIN_CRON_FOLLOW_UNSUBSCRIBE_PART2 . '</a></p><br>'; //$myFile = $user->userid."C.html";
********************************************************************************/ include_once "../../config.php"; $me = substr($_SERVER["PHP_SELF"], 1); // remove initial '/' if ($HUB_FLM->hasCustomVersion($me)) { $path = $HUB_FLM->getCodeDirPath($me); include_once $path; die; } array_push($HEADER, '<script src="' . $HUB_FLM->getCodeWebPath('ui/users.js.php') . '" type="text/javascript"></script>'); checkLogin(); include_once $HUB_FLM->getCodeDirPath("ui/headerdialog.php"); $nodeid = required_param("nodeid", PARAM_ALPHANUMEXT); $fromtime = optional_param("fromtime", "0", PARAM_TEXT); $node = getNode($nodeid); $as = getNodeActivity($nodeid, $fromtime, 0, -1); $activities = $as->activities; ?> <script type="text/javascript"> var activityitems = new Object(); var useritems = new Object(); </script> <div id="activitydiv"> <div class="formrow"> <div id="formsdiv" class="forminput"> <?php echo "<table class='table' cellspacing='0' cellpadding='3' border='0'>"; echo "<tr>"; echo "<th width='100'>" . $LNG->FORM_ACTIVITY_TABLE_HEADING_DATE . "</th>";
$as = getUserActivity($nextuserid, $followlastrun); if ($as->totalno > 0) { $nextMessage .= '<br />' . $LNG->ADMIN_CRON_FOLLOW_USER_ACTIVITY_MESSAGE . ' <span style="font-weight:bold">' . $name . '</span>: <a href="' . $CFG->homeAddress . 'ui/popups/activityviewerusers.php?userid=' . $nextuserid . '&fromtime=' . $followlastrun . '">' . $LNG->ADMIN_CRON_FOLLOW_SEE_ACTIVITY_LINK . '</a>'; } } // GET ITEMS THEY FOLLOW $itemArray = getItemsBeingFollowedByMe($userid); $k = 0; $countk = count($itemArray); for ($k = 0; $k < $countk; $k++) { $array = $itemArray[$k]; $nodeid = $array['NodeID']; $nodename = $array['Name']; $nodetype = $array['NodeType']; $nextnode = getNode($nodeid); $as = getNodeActivity($nodeid, $followlastrun); $activities = $as->activities; if ($as->totalno > 0) { $nextMessage .= '<br /><br /><hr />' . $LNG->ADMIN_CRON_FOLLOW_ACTIVITY_FOR . ' ' . $nodetype . ': <span style="font-weight:bold">' . $nodename . '</span> <a href="' . $CFG->homeAddress . 'ui/popups/activityviewer.php?nodeid=' . $nodeid . '&fromtime=' . $followlastrun . '">' . $LNG->ADMIN_CRON_FOLLOW_EXPLORE_LINK . '</a>'; } foreach ($activities as $activity) { if ($activity->type == 'Follow') { $nextMessage .= '<br /><br /><span style="font-style:italic">' . $LNG->ADMIN_CRON_FOLLOW_ON_THE . ' ' . date("d M Y - H:i", $activity->modificationdate) . ' </span>'; $nextMessage .= ' ' . $activity->user->name . ' '; $nextMessage .= '<span style="font-weight:bold">' . $LNG->ADMIN_CRON_FOLLOW_STARTED . '</span> ' . $LNG->ADMIN_CRON_FOLLOW_THIS_ITEM; } else { if ($activity->type == 'Vote') { $nextMessage .= '<br /><br /><span style="font-style:italic">' . $LNG->ADMIN_CRON_FOLLOW_ON_THE . ' ' . date("d M Y - H:i", $activity->modificationdate) . ' </span>'; $nextMessage .= ' ' . $activity->user->name . ' '; if ($activity->changetype == 'Y') { $nextMessage .= '<span style="font-weight:bold">' . $LNG->ADMIN_CRON_FOLLOW_PROMOTED . '</span> ' . $LNG->ADMIN_CRON_FOLLOW_THIS_ITEM;