echo $fid; ?> " /> <input type="hidden" name="form_data[network_id]" id="form_data_network_id" value="<?php echo !empty($item['network_id']) ? $item['network_id'] : PA::$network_info->network_id; ?> " /> <input type="hidden" name="form_data[family_id]" id="form_data_family_id" value="<?php echo !empty($item['family_id']) ? $item['family_id'] : $fid; ?> " /> <input type="hidden" name="form_data[created]" id="form_data_created" value="<?php echo !empty($item['created']) ? PA::date($item['created'], 'short') : PA::date(time(), 'short'); ?> " /> <input type="hidden" name="form_data[updated]" id="form_data_updated" value="<?php echo PA::date(time(), 'short'); ?> " /> <input type="hidden" name="faction" id="faction" value="savePoints" /> <div class="field" style="height:32px"> <div id="buttonbar" style="float: right;"> <br /> <input type="button" name="back_btn" id="back_btn" value="Back" onclick="javascript:history.back()" /> <input type="submit" name="submit" id="submit_form" value="Save" /> </div> </div> </fieldset> </form> </div>
function uihelper_generate_center_content_permalink($cid, $show = 0) { global $app; $image_media_gallery = FALSE; $back_page = PA::$url . $app->current_route; $content = CNContent::load_content((int) $cid, (int) PA::$login_uid); // filter content fields for output $content->title = _out($content->title); $content->body = _out($content->body); if (strstr($back_page, PA_ROUTE_CONTENT) || strstr($back_page, PA_ROUTE_PERMALINK)) { if ($content->parent_collection_id > 0) { $collection = ContentCollection::load_collection((int) $content->parent_collection_id, PA::$login_uid); if ($collection->type == GROUP_COLLECTION_TYPE) { $back_page = PA::$url . PA_ROUTE_GROUP . "/gid=" . $content->parent_collection_id; } else { $back_page = PA::$url . PA_ROUTE_MEDIA_GALLEY_IMAGES . "/uid=" . $content->author_id; } // IF permalink content is a group content redirect to group homepage } else { //if coming from permalink page then redirect to user page $back_page = PA::$url . PA_ROUTE_USER_PRIVATE; } } $moderateduser = Group::is_admin((int) $content->parent_collection_id, (int) PA::$login_uid) ? 1 : 0; $back_page = urlencode($back_page); if (!$content->is_html) { $content->body = nl2br($content->body); } $media_gallery_content = NULL; $media_gallery_content = in_array(trim($content->type), array('Image', 'Audio', 'Video')); $editable = PA::$login_uid == $content->author_id || $moderateduser; $comments = Comment::get_comment_for_content($cid, '', 'ASC'); $number_of_comments = count($comments); $content->no_of_comments = $number_of_comments; $trackback = CNContent::get_trackbacks_for_content($cid); $number_of_trackbacks = count($trackback); $content->no_of_trackbacks = $number_of_trackbacks; $content->trackback_url = PA::$url . "/pa_trackback.php?cid=" . $cid; $content_user = new User(); $content_user->load((int) $content->author_id); $content->create_time = PA::date($content->changed, 'long'); // date("l, F d, Y", $content->changed); $tags = Tag::load_tags_for_content($cid); if ($tags) { $t = array(); for ($i = 0; $i < count($tags); $i++) { $name = _out($tags[$i]['name']); $uid = PA::$login_uid; $url = PA::$url . '/' . FILE_TAG_SEARCH . '?name_string=content_tag&keyword=' . $tags[$i]["name"]; $t[] = "<a href={$url}>" . $name . "</a>"; } $tag_string = "<b>Tags : </b>" . implode(", ", $t); } else { $tag_string = ""; } $content->tag_entry = $tag_string; if (property_exists($content, 'sbname')) { if (substr($content->sbname, 0, 5) == 'event') { $content->type = 'SBEvent'; } elseif (substr($content->sbname, 0, 6) == 'review') { $content->type = 'Review'; } elseif (substr($content->sbname, 0, 11) == 'media/audio') { $content->type = 'Audio'; } elseif (substr($content->sbname, 0, 11) == 'media/video') { $content->type = 'Video'; } elseif (substr($content->sbname, 0, 11) == 'media/image') { $content->type = 'Image'; } elseif (substr($content->sbname, 0, 14) == 'showcase/group') { $content->type = 'GroupShowCase'; } elseif (substr($content->sbname, 0, 15) == 'showcase/person') { $content->type = 'PersonShowCase'; } } // replace magic strings $content->replace_percent_strings(PA::$url); $type = $content->type; $type = $type . 'Permalink'; // comments $comments_list_tpl = new Template(CURRENT_THEME_FSPATH . "/cncontent_comments.php"); $comments_list_tpl->set('current_theme_path', PA::$theme_url); $comments_list_tpl->set('comments', $comments); $comments_list_tpl->set('author_id', $content->author_id); // Setting the variable for the abuse form ... $comments_list = $comments_list_tpl->fetch(); //comment form $cnform_comment_tpl = new Template(CURRENT_THEME_FSPATH . "/cnform_comment.php"); $cnform_comment_tpl->set('current_theme_path', PA::$theme_url); if (isset(PA::$login_uid)) { $user = new User(); $user->load((int) PA::$login_uid); $login_name = $user->login_name; $cnform_comment_tpl->set('name', $login_name); $cnform_comment_tpl->set('login_name', $user->login_name); } $cnform_comment_tpl->set('cid', $cid); if ($content->parent_collection_id > 0) { $cnform_comment_tpl->set('ccid', $content->parent_collection_id); } // abuse form $cnform_abuse_tpl = new Template(CURRENT_THEME_FSPATH . "/cnform_abuse.php"); /* Permalink and edit links for content */ if ($content->parent_collection_id != -1) { $perma_link = PA::$url . PA_ROUTE_PERMALINK . "/cid=" . $content->content_id . '&ccid=' . $content->parent_collection_id; } else { $perma_link = PA::$url . PA_ROUTE_PERMALINK . "/cid=" . $content->content_id; } $params = array('permissions' => 'edit_content', 'uid' => PA::$login_uid, 'cid' => $content->content_id); if (PermissionsHandler::can_user(PA::$login_uid, $params)) { if ($media_gallery_content) { $edit_link = PA::$url . '/edit_media.php?cid=' . $content->content_id; } else { $edit_link = PA::$url . "/cncontent_blog.php?cid=" . $content->content_id; } $delete_link = PA::$url . PA_ROUTE_CONTENT . "?action=deleteContent&cid=" . $content->content_id . '&back_page=' . $back_page; // handle Event separately if ($type == "EventPermalink") { $edit_link = PA::$url . '/calendar.php?cid=' . $content->content_id; $delete_link = $edit_link . "&delete=1" . '&back_page=' . $back_page; } } else { $edit_link = $delete_link = NULL; } $user_link = PA::$url . PA_ROUTE_USER_PUBLIC . '/' . $content->author_id; /* Code for Approval and Denial links for a content */ if ($moderateduser && $content->is_active == 2) { $approval_link = PA::$url . PA_ROUTE_PERMALINK . '/cid=' . $content->content_id . '&ccid=' . $content->parent_collection_id . '&apv=1'; $denial_link = PA::$url . PA_ROUTE_PERMALINK . '/cid=' . $content->content_id . '&ccid=' . $content->parent_collection_id . '&dny=1'; } else { $approval_link = $denial_link = NULL; } // Show comments form to logged in users, only if comments enabled. global $comments_disabled; // fix by Z.Hron; if group content - only members of group can comment it $can_user_comment = true; if (isset($_GET['gid']) && isset(PA::$login_uid)) { $can_user_comment = Group::member_exists((int) $_GET['gid'], PA::$login_uid); } if (!$comments_disabled && !empty(PA::$login_uid) && $can_user_comment) { $cnform_comment = $cnform_comment_tpl->fetch(); $cnform_abuse = $cnform_abuse_tpl->fetch(); } else { $cnform_comment = $cnform_abuse = NULL; } if (getShadowedPath(CURRENT_THEME_FSPATH . "/{$type}.php")) { $middle_content = new Template(getShadowedPath(CURRENT_THEME_FSPATH . "/{$type}.php")); $middle_content->set_object('contents', $content); $middle_content->set('editable', $editable); $middle_content->set('picture_name', $content_user->picture); // to set picture name for diplaying in contets $middle_content->set('user_id', $content_user->user_id); $middle_content->set('user_name', $content_user->first_name . ' ' . $content_user->last_name); $middle_content->set('current_theme_path', PA::$theme_url); $middle_content->set('back_page', $back_page); $middle_content->set('comments', $comments_list); $middle_content->set('cnform_comment', $cnform_comment); $middle_content->set('cnform_abuse', $cnform_abuse); $middle_content->set('media_gallery_content', $media_gallery_content); if ($show == 1) { $middle_content->set('show', $show); } $middle_content->set('permalink', $perma_link); $middle_content->set('edit_link', $edit_link); $middle_content->set('approval_link', $approval_link); $middle_content->set('denial_link', $denial_link); $middle_content->set('delete_link', $delete_link); $middle_content->set('user_link', $user_link); $return_content = $middle_content->fetch(); } else { $return_content = '<p>Content does not have a display template.</p><p>Create a ' . $type . '.php file to display this content type.</p>'; } return $return_content; }
} else { $value = ''; } break; case 'stateselect': $value = @$statesList[$attval]; break; case 'countryselect': $value = @$countryList[$attval]; break; case 'dateselect': $day = @$atts[$field['name'].'_day']['value']; $month = @$atts[$field['name'].'_month']['value']; $year = @$atts[$field['name'].'_year']['value']; if ($year && $month && $day) { $value = PA::date(mktime(0,0,0, $month, $day, $year)); } break; default: $value = $attval; break; } if (empty($value)) continue; // display only fields that have value ?> <tr><td><?=$label?></td><td><?=$value?></td></tr> <?php } ?> </table>
?> <td><input type="checkbox" name="uid[]" value="<?php echo $links[$i]['user_id']; ?> " /></td> <td><a href="<?php echo $user_url; ?> "> <?php echo uihelper_resize_mk_user_img($links[$i]['picture'], 35, 35, 'alt="facewall"'); ?> </a> </td> <td><?php echo PA::date($links[$i]['created'], 'short'); ?> </td> <td><a href="<?php echo $user_url; ?> "><?php echo $links[$i]['login_name']; ?> </a></td> <td><?php echo wordwrap($links[$i]['first_name'] . ' ' . $links[$i]['last_name'], 20, "<br />\n", true); ?> </td> <td><?php echo wordwrap($links[$i]['email'], 20, "<br />\n", true);
<div class="points_descr"><?php echo $item['description']; ?> </div> </div> <div class="points_details"> <table> <tr><td class="categ"><?php echo abbreviate_text($item['category'], 8, 3); ?> </td></tr> <tr><td><b><?php echo __("Date: "); ?> </b><?php echo PA::date($item['created'], 'short'); ?> </td></tr> <tr><td><?php echo abbreviate_text($item['place'], 20, 13); ?> </td></tr> </table> </div> <div class="points_user"> <?php echo uihelper_resize_mk_img($item['user']->picture, 64, 64, 'images/default.png', 'style=""'); ?> <a href="<?php echo PA::$url . PA_ROUTE_USER_PUBLIC . "/{$item['user']->user_id}"; ?>
$block_heading = !empty($block_heading) ? $block_heading : __('Community Blog'); ?> <!--Module box --> <div class="box" id="<?php echo $html_block_id; ?> "> <div class="box-header with-border"> <h3 class="box-title"><?php echo $block_heading; ?> </h3> <div class="box-tools pull-right"> <?php echo PA::date(time(), 'long'); ?> </div> </div> <div class="box-body"> <?php echo $inner_HTML; ?> </div> <!-- /.box-body --> <?php if ($page_links) { ?> <div class="box-footer with-border"> <nav> <ul class="pagination">
</tr> <tr> <td><?php echo __("Posts") . ":"; ?> </td><td><?php echo $statistics['nb_posts']; ?> </td> </tr> <tr> <td><?php echo __("Founded") . ":"; ?> </td><td><?php echo PA::date(strtotime($statistics['created_at']), 'short'); ?> </td> </tr> </table> <div class="box center"> Owner:<br /> <a href="<?php echo PA::$url . PA_ROUTE_USER_PUBLIC . '/' . $statistics['owner']->user_id; ?> "> <?php echo uihelper_resize_mk_img($statistics['owner']->picture, 90, 68, "files/img/image_not_available.png", 'alt="Picture of the forum owner."'); ?> </a><br /> <a href="<?php
?> </a> </div> <div class="smallfont"> <div><?php echo __('Posts'); ?> : <?php echo PaForumPost::countPaForumPost("user_id = {$created_by->user_id}"); ?> </div> <div><?php echo __('Last login'); ?> : <?php echo PA::date($created_by->last_login, 'short'); ?> </div> <div><?php echo __('Status'); ?> : <?php echo PaForumsUsers::getStatusString($created_by->user_id); ?> </div> </div> </td> <td class="post_odd"> <div class='forum_post'> <?php echo $thread->get_content();
public function month($date, $event_assocs = NULL, $may_edit = false) { $calendar_url = $this->calendar_url; $self_url = $this->self_url; $range = Calendar::range($date, 'month'); $days = Calendar::days($range, $event_assocs); $today_ts = mktime(0, 0, 0, date("m"), date("d"), date("Y")); $thism_ts = $days[0]['date_ts']; // find on which day this month starts $first_week_day = date('w', $thism_ts); // header with Month and Year $html = "<ul class=\"" . $this->display_mode . "\">\n"; $html .= "<li class=\"calendarcell header\">\n"; $prevm_ts = mktime(0, 0, 0, date("m", $thism_ts) - 1, 1, date("Y", $thism_ts)); $nextm_ts = mktime(0, 0, 0, date("m", $thism_ts) + 1, 1, date("Y", $thism_ts)); $html .= "<a class=\"month-prev\" href=\"{$self_url}&date=" . date("Y-m-d", $prevm_ts) . "#calendar\" title=\"" . date("F Y", $prevm_ts) . "\"><</a>"; $html .= "<a name=\"calendar\" class=\"month-next\" href=\"{$self_url}&date=" . date("Y-m-d", $nextm_ts) . "#calendar\" title=\"" . date("F Y", $nextm_ts) . "\">></a>"; $html .= date("F Y", $thism_ts); $html .= "</li>\n"; // render dayheaders $fd = $this->first_day_of_week; $ld = $fd + 7; for ($i = $fd; $i < $ld; $i++) { if ($i > 6) { $d = $i - 7; } else { $d = $i; } $html .= "<li class=\"calendarcell dayheader\">\n"; $html .= $this->week_days[$d]; $html .= "</li>\n"; } $grid_count = 0; // render empty days at start of month if required if ($first_week_day < $fd) { $ed = 7 - $first_week_day; } else { $ed = $first_week_day; } for ($i = $fd; $i < $ed; $i++) { $html .= "<li class=\"calendarcell\"> </li>\n"; $grid_count++; } // render actual days $cnt = count($days); $last_week_day = 0; for ($i = 0; $i < $cnt; $i++) { $events = $days[$i]['events']; $event_cnt = count($events); $html .= "<li class=\"calendarcell"; // mark today as special if ($days[$i]['date_ts'] == $today_ts) { $html .= " today"; } if ($event_cnt) { $html .= " hasevents"; } else { $html .= " noevents"; } $html .= "\">\n"; $html .= "<span class=\"daynumber\">"; $html .= date("d", $days[$i]['date_ts']); $html .= "</span>"; $html .= "<div class=\"hovertip\">"; // . "$event_cnt Events for " // . date("D jS", $days[$i]['date_ts']) if ($event_cnt) { $html .= "<ul class=\"eventlist\">\n"; foreach ($events as $n => $assoc) { $html .= "<li>"; if ($may_edit) { $html .= "<a href=\"{$calendar_url}&display_event=" . $assoc->event_id . "\">"; } $html .= "<b>" . _out($assoc->event_title); $html .= "</b><br /> on "; $html .= PA::date($assoc->start_time); if ($may_edit) { $html .= "</a>"; } $html .= "</li>\n"; } $html .= "</ul>\n"; } if ($may_edit) { // create link $html .= "<a class=\"create-event\" href=\"{$calendar_url}&date=" . date("Y-m-d", $days[$i]['date_ts']) . "\">New</a>"; } $html .= "</div>"; $html .= "</li>\n"; $grid_count++; } // render empty days at end of month if required for ($i = $grid_count; $i < 42; $i++) { $html .= "<li class=\"calendarcell\"> </li>\n"; } // add just the events for the list view foreach ($event_assocs as $i => $assoc) { $html .= '<li class="listview calendarcell">'; $cid = Event::get_cid_from_eid((int) $assoc->event_id); $html .= "<a href=\"" . PA::$url . PA_ROUTE_PERMALINK . "&cid=" . $cid . "\">"; $html .= "<b>" . _out($assoc->event_title); $html .= "</b></a><br /> starts "; $html .= PA::datetime($assoc->start_time); $html .= "<br /> ends "; $html .= PA::datetime($assoc->end_time); if ($may_edit) { $html .= " <a href=\"{$calendar_url}&display_event=" . $assoc->event_id . "\">"; $html .= __('Edit'); $html .= "</a>"; } $html .= '</li>'; } $html .= "<li class=\"calendarcell header\">"; if ($may_edit) { // edit link $html .= "<b><a class=\"goto-edit\" href=\"{$calendar_url}\">" . __("Edit") . "</a></b> "; } $html .= __("Display as") . ":\n"; $html .= "<a href=# class=\"list-style\">" . __("List") . "</a>"; $html .= "<a href=# class=\"calendar-style\">" . __("Calendar") . "</a>"; $html .= "</li>\n"; $html .= "</ul>\n"; return $html; }
?> </a> </div> <div class="smallfont"> <div><?php echo __('Posts'); ?> : <?php echo $post->user->user_id != -1 ? PaForumPost::countPaForumPost("user_id = " . $post->user->user_id) : ''; ?> </div> <div><?php echo __('Last login'); ?> : <?php echo $post->user->user_id != -1 ? PA::date($post->user->last_login, 'short') : ''; ?> </div> <div><?php echo __('Status'); ?> : <?php echo $post->user->user_id != -1 ? PaForumsUsers::getStatusString($post->user->user_id) : ''; ?> </div> </div> </td> <td class="post_<?php echo $even_odd; ?> ">
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @author [creator, or "Original Author"] * @license http://bit.ly/aVWqRV PayAsYouGo License * @copyright Copyright (c) 2010 Broadband Mechanics * @package PeopleAggregator */ ?> <div class="blog"> <?php foreach ($polls as $i => $poll) { ?> <div class="poll"> <h3> <span class="poll_date"> <?php echo PA::date($poll->changed, 'long'); ?> </span>: <span class="poll_title"> <?php echo $poll->title; ?> </span> <span class="poll_votes">(<?php echo $poll->total_votes; ?> votes)</span> </h3> <?php foreach ($poll->options as $option) {
) --> <?php } else { ?> From: <a href="<? echo PA::$url . PA_ROUTE_USER_PUBLIC . "/" . $message_details->sender_id ?>"> <?php echo $message_details->sender_name; ?> </a> <?php } ?> </strong></p> <p><?php echo PA::date($message_details->sent_time, 'short'); ?> , <?php echo PA::time($message_details->sent_time, 'short'); ?> </p> </li> <li class="message_text"> <p><?php echo nl2br($message_details->body); ?> </p> </li> </ul>