Example #1
0
    /** @see WP_Widget::widget */
    function widget($args, $instance)
    {
        extract($args);
        //these are our widget options
        $title = isset($instance['title']) ? $instance['title'] : "";
        $animation = isset($instance['animation']) ? $instance['animation'] : "";
        $login = isset($instance['login']) ? $instance['login'] : "";
        $count = isset($instance['count']) ? $instance['count'] : "";
        $consumer_key = isset($instance['consumer_key']) ? $instance['consumer_key'] : "";
        $consumer_secret = isset($instance['consumer_secret']) ? $instance['consumer_secret'] : "";
        $access_token = isset($instance['access_token']) ? $instance['access_token'] : "";
        $access_token_secret = isset($instance['access_token_secret']) ? $instance['access_token_secret'] : "";
        echo $before_widget;
        require_once locate_template("/libraries/tmhOAuth/tmhOAuth.php");
        require_once locate_template("/libraries/tmhOAuth/tmhUtilities.php");
        $tmhOAuth = new tmhOAuth(array('consumer_key' => $consumer_key, 'consumer_secret' => $consumer_secret, 'user_token' => $access_token, 'user_secret' => $access_token_secret));
        $code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/statuses/user_timeline'), array('screen_name' => $login, 'count' => $count, 'include_rts' => 'true'));
        $response = $tmhOAuth->response;
        ?>
		<div class="clearfix">
			<div class="header_left">
				<?php 
        if ($title) {
            echo ((int) $animation ? str_replace("box_header", "box_header animation-slide", $before_title) : str_replace("animation-slide", "", $before_title)) . apply_filters("widget_title", $title) . $after_title;
        }
        ?>
			</div>
			<div class="header_right">
				<a href="#" id="latest_tweets_prev" class="scrolling_list_control_left icon_small_arrow left_white"></a>
				<a href="#" id="latest_tweets_next" class="scrolling_list_control_right icon_small_arrow right_white"></a>
			</div>
		</div>
		<div class="scrolling_list_wrapper">
			<ul class="scrolling_list latest_tweets">
				<?php 
        //				require_once(get_template_directory() . "/libraries/lib_autolink.php");
        require_once locate_template("/libraries/lib_autolink.php");
        $tweets = json_decode($response['response']);
        if (count($tweets->errors)) {
            echo '<li class="icon_small_arrow right_white"><p>' . $tweets->errors[0]->message . '! ' . __('Please check your config under Appearance->Widgets->Twitter Feed!', 'medicenter') . '</p></li>';
        } else {
            foreach ($tweets as $tweet) {
                echo '<li class="icon_small_arrow right_white"><p>' . autolink($tweet->text, 20, ' target="_blank"') . '<abbr title="' . date('c', strtotime($tweet->created_at)) . '" class="timeago">' . $tweet->created_at . '</abbr></p></li>';
            }
        }
        ?>
			</ul>
		</div>
		<?php 
        echo $after_widget;
    }
Example #2
0
    /** @see WP_Widget::widget */
    function widget($args, $instance)
    {
        extract($args);
        //these are our widget options
        $title = $instance['title'];
        $login = $instance['login'];
        $count = $instance['count'];
        $consumer_key = $instance['consumer_key'];
        $consumer_secret = $instance['consumer_secret'];
        $access_token = $instance['access_token'];
        $access_token_secret = $instance['access_token_secret'];
        echo $before_widget;
        require_once get_template_directory() . '/libraries/tmhOAuth/tmhOAuth.php';
        require_once get_template_directory() . '/libraries/tmhOAuth/tmhUtilities.php';
        $tmhOAuth = new tmhOAuth(array('consumer_key' => $consumer_key, 'consumer_secret' => $consumer_secret, 'user_token' => $access_token, 'user_secret' => $access_token_secret));
        $code = $tmhOAuth->request('GET', $tmhOAuth->url('1.1/statuses/user_timeline'), array('screen_name' => $login, 'count' => $count, 'include_rts' => 'true'));
        $response = $tmhOAuth->response;
        ?>
		<div class="clearfix">
			<div class="header_left">
				<?php 
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
			</div>
			<div class="header_right">
				<a href="#" id="latest_tweets_prev" class="scrolling_list_control_left icon_small_arrow left_white"></a>
				<a href="#" id="latest_tweets_next" class="scrolling_list_control_right icon_small_arrow right_white"></a>
			</div>
		</div>
		<div class="scrolling_list_wrapper">
			<ul class="scrolling_list latest_tweets">
				<?php 
        require_once get_template_directory() . "/libraries/lib_autolink.php";
        $tweets = json_decode($response['response']);
        foreach ($tweets as $tweet) {
            echo '<li class="icon_small_arrow right_white"><p>' . autolink($tweet->text, 20, ' target="_blank"') . '<abbr title="' . date('c', strtotime($tweet->created_at)) . '" class="timeago">' . $tweet->created_at . '</abbr></p></li>';
        }
        ?>
			</ul>
		</div>
		<?php 
        echo $after_widget;
    }
 /**
  * @param $template
  * @param array $data
  * @return mixed|string
  */
 public function processVariables($template, array $data)
 {
     /** @var \App\Models\Account $account */
     $account = $data['account'];
     /** @var \App\Models\Client $client */
     $client = $data['client'];
     /** @var \App\Models\Invitation $invitation */
     $invitation = $data['invitation'];
     $invoice = $invitation->invoice;
     $passwordHTML = isset($data['password']) ? '<p>' . trans('texts.password') . ': ' . $data['password'] . '<p>' : false;
     $documentsHTML = '';
     if ($account->hasFeature(FEATURE_DOCUMENTS) && $invoice->hasDocuments()) {
         $documentsHTML .= trans('texts.email_documents_header') . '<ul>';
         foreach ($invoice->documents as $document) {
             $documentsHTML .= '<li><a href="' . HTML::entities($document->getClientUrl($invitation)) . '">' . HTML::entities($document->name) . '</a></li>';
         }
         foreach ($invoice->expenses as $expense) {
             foreach ($expense->documents as $document) {
                 $documentsHTML .= '<li><a href="' . HTML::entities($document->getClientUrl($invitation)) . '">' . HTML::entities($document->name) . '</a></li>';
             }
         }
         $documentsHTML .= '</ul>';
     }
     $variables = ['$footer' => $account->getEmailFooter(), '$client' => $client->getDisplayName(), '$account' => $account->getDisplayName(), '$dueDate' => $account->formatDate($invoice->due_date), '$invoiceDate' => $account->formatDate($invoice->invoice_date), '$contact' => $invitation->contact->getDisplayName(), '$firstName' => $invitation->contact->first_name, '$amount' => $account->formatMoney($data['amount'], $client), '$invoice' => $invoice->invoice_number, '$quote' => $invoice->invoice_number, '$link' => $invitation->getLink(), '$password' => $passwordHTML, '$viewLink' => $invitation->getLink() . '$password', '$viewButton' => Form::emailViewButton($invitation->getLink(), $invoice->getEntityType()) . '$password', '$paymentLink' => $invitation->getLink('payment') . '$password', '$paymentButton' => Form::emailPaymentButton($invitation->getLink('payment')) . '$password', '$customClient1' => $account->custom_client_label1, '$customClient2' => $account->custom_client_label2, '$customInvoice1' => $account->custom_invoice_text_label1, '$customInvoice2' => $account->custom_invoice_text_label2, '$documents' => $documentsHTML, '$autoBill' => empty($data['autobill']) ? '' : $data['autobill'], '$portalLink' => $invitation->contact->link, '$portalButton' => Form::emailViewButton($invitation->contact->link, 'portal')];
     // Add variables for available payment types
     foreach (Gateway::$gatewayTypes as $type) {
         if ($type == GATEWAY_TYPE_TOKEN) {
             continue;
         }
         $camelType = Utils::toCamelCase(GatewayType::getAliasFromId($type));
         $variables["\${$camelType}Link"] = $invitation->getLink('payment') . "/{$type}";
         $variables["\${$camelType}Button"] = Form::emailPaymentButton($invitation->getLink('payment') . "/{$type}");
     }
     $includesPasswordPlaceholder = strpos($template, '$password') !== false;
     $str = str_replace(array_keys($variables), array_values($variables), $template);
     if (!$includesPasswordPlaceholder && $passwordHTML) {
         $pos = strrpos($str, '$password');
         if ($pos !== false) {
             $str = substr_replace($str, $passwordHTML, $pos, 9);
         }
     }
     $str = str_replace('$password', '', $str);
     $str = autolink($str, 100);
     return $str;
 }
Example #4
0
                } else {
                    ?>
									<a href="#" class="fn"><span><?php 
                    echo $compost->name;
                    ?>
</span></a>
								<?php 
                }
                ?>
							</div>
							<time><?php 
                echo "{$compost->date} | {$compost->time}";
                ?>
</time>
							<p class="text"><?php 
                echo autolink($comcontent);
                ?>
</p>
						
					<?php 
            }
            ?>
						<div class="pagination magz-pagination">
							<ul class="pagination pull-right">
							<?php 
            $getpage = $val->validasi($_GET['page'], 'sql');
            $jmldata = $tabledcom->numRowByAnd(id_post, $idpost, active, 'Y');
            $jmlhalaman = $p->jumlahHalaman($jmldata, $batas);
            $linkHalaman = $p->navHalaman($getpage, $jmlhalaman, $website_url, "detailpost", $currentDpost->seotitle);
            echo "{$linkHalaman}";
            ?>
 public function testAutoUrl()
 {
     $url = 'http://githu.com/fgrehm/pearfarm';
     $out = autolink('bar ' . $url . ' foo');
     $this->assertEquals($out, 'bar ' . TagHelper::content_tag('a', $url, array('href' => $url, 'title' => $url, 'target' => '_blank')) . ' foo');
 }
Example #6
0
        <tr>
          <td width="50" align="right"><img src="images/memo_date.gif" width="23" height="15"></td>
          <td><img src="images/t.gif" width="10" height="3"><br>
            <?php 
    echo date("Y년 m월 d일 H시 i분", $now_data[reg_date]);
    ?>
</td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#EBD9D9" align="center" style=padding:0px;><img src="images/t.gif" width="10" height="1"></td>
        </tr>
        <tr>
          <td align="right" valign="top"><img src="images/memo_memo.gif" width="31" height="15"></td>
          <td style='word-break:break-all;'><img src="images/t.gif" width="10" height="3"><br>
            <?php 
    echo autolink(nl2br(stripslashes(del_html($now_data[memo]))));
    ?>
<br>
            <br>
          </td>
        </tr>
        <tr>
          <td align="right" valign="top">&nbsp;</td>
          <td><a href=<?php 
    echo $PHP_SELF;
    ?>
?exec=del&no=<?php 
    echo $no;
    ?>
&page=<?php 
    echo $page;
Example #7
0
 /**
  * @since version 0.90
  *
  * @param $rand
  **/
 function showTimeline($rand)
 {
     global $CFG_GLPI, $DB, $autolink_options;
     //get ticket actors
     $ticket_users_keys = $this->getTicketActors();
     $user = new User();
     $group = new Group();
     $followup_obj = new TicketFollowup();
     $pics_url = $CFG_GLPI['root_doc'] . "/pics/timeline";
     $timeline = $this->getTimelineItems();
     $autolink_options['strip_protocols'] = false;
     //display timeline
     echo "<div class='timeline_history'>";
     $tmp = array_values($timeline);
     $first_item = array_shift($tmp);
     // show approbation form on top when ticket is solved
     if ($this->fields["status"] == CommonITILObject::SOLVED) {
         echo "<div class='approbation_form' id='approbation_form{$rand}'>";
         $followup_obj->showApprobationForm($this);
         echo "</div>";
     }
     // show title for timeline
     self::showTimelineHeader();
     $timeline_index = 0;
     foreach ($timeline as $item) {
         $options = array('parent' => $this, 'rand' => $rand);
         if ($obj = getItemForItemtype($item['type'])) {
             $obj->fields = $item['item'];
         } else {
             $obj = $item;
         }
         Plugin::doHook('pre_show_item', array('item' => &$obj, 'options' => &$options));
         if (is_array($obj)) {
             $item_i = $obj['item'];
         } else {
             $item_i = $obj->fields;
         }
         $date = "";
         if (isset($item_i['date'])) {
             $date = $item_i['date'];
         }
         if (isset($item_i['date_mod'])) {
             $date = $item_i['date_mod'];
         }
         // check if curent item user is assignee or requester
         $user_position = 'left';
         if (isset($ticket_users_keys[$item_i['users_id']]) && $ticket_users_keys[$item_i['users_id']] == CommonItilActor::ASSIGN || $item['type'] == 'Assign') {
             $user_position = 'right';
         }
         //display solution in middle
         if ($timeline_index == 0 && $item['type'] == "Solution" && $this->fields["status"] == CommonITILObject::SOLVED) {
             $user_position .= ' middle';
         }
         echo "<div class='h_item {$user_position}'>";
         echo "<div class='h_info'>";
         echo "<div class='h_date'>" . Html::convDateTime($date) . "</div>";
         if ($item_i['users_id'] !== false) {
             echo "<div class='h_user'>";
             if (isset($item_i['users_id']) && $item_i['users_id'] != 0) {
                 $user->getFromDB($item_i['users_id']);
                 echo "<div class='tooltip_picture_border'>";
                 echo "<img class='user_picture' alt=\"" . __s('Picture') . "\" src='" . User::getThumbnailURLForPicture($user->fields['picture']) . "'>";
                 echo "</div>";
                 echo "<span class='h_user_name'>";
                 $userdata = getUserName($item_i['users_id'], 2);
                 echo $user->getLink() . "&nbsp;";
                 echo Html::showToolTip($userdata["comment"], array('link' => $userdata['link']));
                 echo "</span>";
             } else {
                 _e("Requester");
             }
             echo "</div>";
             // h_user
         }
         echo "</div>";
         //h_date
         echo "<div class='h_content " . $item['type'] . (isset($item_i['status']) ? " " . $item_i['status'] : "") . "'" . "id='viewitem" . $item['type'] . $item_i['id'] . $rand . "'>";
         if (isset($item_i['can_edit']) && $item_i['can_edit']) {
             echo "<div class='edit_item_content'></div>";
             echo "<span class='cancel_edit_item_content'></span>";
         }
         echo "<div class='displayed_content'>";
         if (!in_array($item['type'], array('Document_Item', 'Assign')) && $item_i['can_edit']) {
             echo "<span class='edit_item' ";
             echo "onclick='javascript:viewEditSubitem" . $this->fields['id'] . "{$rand}(event, \"" . $item['type'] . "\", " . $item_i['id'] . ", this, \"viewitem" . $item['type'] . $item_i['id'] . $rand . "\")'";
             echo "></span>";
         }
         if (isset($item_i['requesttypes_id']) && file_exists("{$pics_url}/" . $item_i['requesttypes_id'] . ".png")) {
             echo "<img src='{$pics_url}/" . $item_i['requesttypes_id'] . ".png' title='' class='h_requesttype' />";
         }
         if (isset($item_i['content'])) {
             $content = $item_i['content'];
             $content = autolink($content, 40);
             //$content = nl2br($content);
             $long_text = "";
             if (substr_count($content, "<br") > 30 || strlen($content) > 2000) {
                 $long_text = "long_text";
             }
             echo "<div class='item_content {$long_text}'>";
             echo "<p>";
             if (isset($item_i['state'])) {
                 $onClick = "onclick='change_task_state(" . $item_i['id'] . ", this)'";
                 if (!$item_i['can_edit']) {
                     $onClick = "style='cursor: not-allowed;'";
                 }
                 echo "<span class='state state_" . $item_i['state'] . "'\n                           {$onClick}\n                           title='" . Planning::getState($item_i['state']) . "'>";
                 echo "</span>";
             }
             echo $content;
             echo "</p>";
             if (!empty($long_text)) {
                 echo "<p class='read_more'>";
                 echo "<a class='read_more_button'>.....</a>";
                 echo "</p>";
             }
             echo "</div>";
         }
         echo "<div class='b_right'>";
         if (isset($item_i['solutiontypes_id']) && !empty($item_i['solutiontypes_id'])) {
             echo Dropdown::getDropdownName("glpi_solutiontypes", $item_i['solutiontypes_id']) . "<br>";
         }
         if (isset($item_i['taskcategories_id']) && !empty($item_i['taskcategories_id'])) {
             echo Dropdown::getDropdownName("glpi_taskcategories", $item_i['taskcategories_id']) . "<br>";
         }
         if (isset($item_i['requesttypes_id']) && !empty($item_i['requesttypes_id'])) {
             echo Dropdown::getDropdownName("glpi_requesttypes", $item_i['requesttypes_id']) . "<br>";
         }
         if (isset($item_i['actiontime']) && !empty($item_i['actiontime'])) {
             echo "<span class='actiontime'>";
             echo Html::timestampToString($item_i['actiontime'], false);
             echo "</span>";
         }
         if (isset($item_i['begin'])) {
             echo "<span class='planification'>";
             echo Html::convDateTime($item_i["begin"]);
             echo " &rArr; ";
             echo Html::convDateTime($item_i["end"]);
             echo "</span>";
         }
         if (isset($item_i['users_id_tech']) && $item_i['users_id_tech'] > 0) {
             echo "<div class='users_id_tech' id='users_id_tech_" . $item_i['users_id_tech'] . "'>";
             $user->getFromDB($item_i['users_id_tech']);
             echo Html::image($CFG_GLPI['root_doc'] . "/pics/user.png") . "&nbsp;";
             $userdata = getUserName($item_i['users_id_tech'], 2);
             echo $user->getLink() . "&nbsp;";
             echo Html::showToolTip($userdata["comment"], array('link' => $userdata['link']));
             echo "</div>";
         }
         if (isset($item_i['groups_id_tech']) && $item_i['groups_id_tech'] > 0) {
             echo "<div class='groups_id_tech'>";
             $group->getFromDB($item_i['groups_id_tech']);
             echo Html::image($CFG_GLPI['root_doc'] . "/pics/group.png") . "&nbsp;";
             echo $group->getLink() . "&nbsp;";
             echo Html::showToolTip($group->getComments(), array('link' => $group->getLinkURL()));
             echo "</div>";
         }
         // show "is_private" icon
         if (isset($item_i['is_private']) && $item_i['is_private']) {
             echo "<div class='private'>" . __('Private') . "</div>";
         }
         echo "</div>";
         // b_right
         if ($item['type'] == 'Document_Item') {
             $filename = $item_i['filename'];
             $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
             echo "<img src='";
             if (empty($filename)) {
                 $filename = $item_i['name'];
             }
             if (file_exists(GLPI_ROOT . "/pics/icones/{$ext}-dist.png")) {
                 echo $CFG_GLPI['root_doc'] . "/pics/icones/{$ext}-dist.png";
             } else {
                 echo "{$pics_url}/file.png";
             }
             echo "' title='file' />&nbsp;";
             echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/document.send.php?docid=" . $item_i['id'] . "&tickets_id=" . $this->getID() . "' target='_blank'>{$filename}";
             if (in_array($ext, array('jpg', 'jpeg', 'png', 'bmp'))) {
                 echo "<div class='timeline_img_preview'>";
                 echo "<img src='" . $CFG_GLPI['root_doc'] . "/front/document.send.php?docid=" . $item_i['id'] . "&tickets_id=" . $this->getID() . "'/>";
                 echo "</div>";
             }
             echo "</a>";
             if (!empty($item_i['mime'])) {
                 echo "&nbsp;(" . $item_i['mime'] . ")";
             }
             echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/document.form.php?id=" . $item_i['id'] . "' class='edit_document' title='" . _sx("button", "Update") . "'>";
             echo "<img src='{$pics_url}/edit.png' /></a>";
             echo "<a href='" . $CFG_GLPI['root_doc'] . "/front/ticket.form.php?delete_document&documents_id=" . $item_i['id'] . "&tickets_id=" . $this->getID() . "' class='delete_document' title='" . _sx("button", "Delete permanently") . "'>";
             echo "<img src='{$pics_url}/delete.png' /></a>";
         }
         echo "</div>";
         // displayed_content
         echo "</div>";
         //end h_content
         echo "</div>";
         //end  h_info
         $timeline_index++;
         Plugin::doHook('post_show_item', array('item' => $obj, 'options' => $options));
     }
     // end foreach timeline
     echo "<div class='break'></div>";
     // recall ticket content (not needed in classic and splitted layout)
     if (!CommonGLPI::isLayoutWithMain()) {
         echo "<div class='h_item middle'>";
         echo "<div class='h_info'>";
         echo "<div class='h_date'>" . Html::convDateTime($this->fields['date']) . "</div>";
         echo "<div class='h_user'>";
         $dem = '0';
         foreach ($DB->request("glpi_tickets_users", "`tickets_id` = " . $this->fields['id'] . " AND `type` = 1") as $req) {
             $dem = $req['users_id'];
         }
         if ((!isset($item_i['users_id_recipient']) || $item_i['users_id_recipient'] == 0) && $dem == 0) {
             _e("Requester");
         } else {
             if (isset($item_i['users_id_recipient']) && $item_i['users_id_recipient'] != 0) {
                 $user->getFromDB($this->fields['users_id_recipient']);
             } else {
                 if ($dem > 0) {
                     $requester = new User();
                     if ($requester->getFromDB($dem)) {
                         $user = $requester;
                     }
                 }
             }
             echo "<div class='tooltip_picture_border'>";
             $picture = "";
             if (isset($user->fields['picture'])) {
                 $picture = $user->fields['picture'];
             }
             echo "<img class='user_picture' alt=\"" . __s('Picture') . "\" src='" . User::getThumbnailURLForPicture($picture) . "'>";
             echo "</div>";
             echo $user->getLink();
         }
         echo "</div>";
         // h_user
         echo "</div>";
         //h_info
         echo "<div class='h_content TicketContent'>";
         echo "<div class='b_right'>" . __("Ticket recall") . "</div>";
         echo "<div class='ticket_title'>";
         echo html_entity_decode($this->fields['name']);
         echo "</div>";
         echo "<div class='ticket_description'>";
         echo $this->setSimpleTextContent($this->fields['content']);
         echo "</div>";
         echo "</div>";
         // h_content TicketContent
         echo "</div>";
         // h_item middle
         echo "<div class='break'></div>";
     }
     // end timeline
     echo "</div>";
     // h_item $user_position
     echo "<script type='text/javascript'>read_more();</script>";
 }
Example #8
0
        }
        </style>
    </head>
    <body>
        <div id="dataStore">
            <h1>FearlessBot Data Storage</h1>
            <table>
                <tr>
                    <th>Keyword</th>
                    <th>Value</th>
                    <th>Added By</th>
                </tr>
                <?php 
$query = $db->query("SELECT keyword, value, username FROM data_store LEFT JOIN members ON data_store.owner=members.id WHERE approved=1 ORDER BY keyword");
while ($row = $query->fetch_array()) {
    echo "<tr><td>" . autolink($row['keyword'], 50) . "</td><td>" . autolink($row['value'], 50) . "</td><td>" . $row['username'] . "</td></tr>";
}
?>
            </table>
        </div>
        <div id="channelStats">
            <h1>Channel Stats</h1>
            <table>
                <tr><th>Channel</th><th>Total Messages</th></tr>
                <?php 
$query = $db->query("SELECT * FROM channel_stats WHERE channel IN ('119490967253286912', '115332333745340416')");
while ($row = $query->fetch_array()) {
    echo "<tr><td>" . $row['name'] . "</td><td>" . $row['total_messages'] . "</td></tr>";
}
?>
            </table>
Example #9
0
 function convert_text($text = '', $nl2br = true)
 {
     // {{{
     if ($nl2br) {
         $str = nl2br(strip_tags($text));
     } else {
         $str = strip_tags($text);
     }
     return autolink($str);
 }
 private function processVariables($template, $data)
 {
     $account = $data['account'];
     $client = $data['client'];
     $invitation = $data['invitation'];
     $invoice = $invitation->invoice;
     $passwordHTML = isset($data['password']) ? '<p>' . trans('texts.password') . ': ' . $data['password'] . '<p>' : false;
     $variables = ['$footer' => $account->getEmailFooter(), '$client' => $client->getDisplayName(), '$account' => $account->getDisplayName(), '$dueDate' => $account->formatDate($invoice->due_date), '$invoiceDate' => $account->formatDate($invoice->invoice_date), '$contact' => $invitation->contact->getDisplayName(), '$firstName' => $invitation->contact->first_name, '$amount' => $account->formatMoney($data['amount'], $client), '$invoice' => $invoice->invoice_number, '$quote' => $invoice->invoice_number, '$link' => $invitation->getLink(), '$password' => $passwordHTML, '$viewLink' => $invitation->getLink() . '$password', '$viewButton' => Form::emailViewButton($invitation->getLink(), $invoice->getEntityType()) . '$password', '$paymentLink' => $invitation->getLink('payment') . '$password', '$paymentButton' => Form::emailPaymentButton($invitation->getLink('payment')) . '$password', '$customClient1' => $account->custom_client_label1, '$customClient2' => $account->custom_client_label2, '$customInvoice1' => $account->custom_invoice_text_label1, '$customInvoice2' => $account->custom_invoice_text_label2];
     // Add variables for available payment types
     foreach (Gateway::$paymentTypes as $type) {
         $camelType = Gateway::getPaymentTypeName($type);
         $type = Utils::toSnakeCase($camelType);
         $variables["\${$camelType}Link"] = $invitation->getLink('payment') . "/{$type}";
         $variables["\${$camelType}Button"] = Form::emailPaymentButton($invitation->getLink('payment') . "/{$type}");
     }
     $includesPasswordPlaceholder = strpos($template, '$password') !== false;
     $str = str_replace(array_keys($variables), array_values($variables), $template);
     if (!$includesPasswordPlaceholder && $passwordHTML) {
         $pos = strrpos($str, '$password');
         if ($pos !== false) {
             $str = substr_replace($str, $passwordHTML, $pos, 9);
         }
     }
     $str = str_replace('$password', '', $str);
     $str = autolink($str, 100);
     return $str;
 }
Example #11
0
}
if (isset($_REQUEST['add'])) {
    $name = Utf8ToWin(substr(replacer(strip_tags($_REQUEST['name'])), 0, $maxname));
    $comment = Utf8ToWin(str_replace("\n", '<br>', substr(replacer($_REQUEST['comment']), 0, $maxmes)));
    $name = wordwrap($name, $namewrap, ' ', 1);
    $comment = wordwrap($comment, $comwrap, ' ', 1);
    $timezone = floor($timezone);
    if ($timezone < -12 || $timezone > 12) {
        $timezone = 0;
    }
    $date = gmdate('d.m.Y', time() + 3600 * ($timezone + (date('I') == 1 ? 0 : 1)));
    $time = gmdate('H:i', time() + 3600 * ($timezone + (date('I') == 1 ? 0 : 1)));
    //$datetime=date('d.m.Y H:i');
    //if ($liteurl==1) {$comment=preg_replace("#([^\[img\]])(http|https|ftp|goper):\/\/([a-zA-Z0-9\.\?&=\;\-\/_]+)([\W\s<\[]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>\\4", $comment);}
    if ($liteurl == 1) {
        $comment = autolink($comment);
    }
    if ($antimat == 1) {
        $name = removeBadWords($name);
        $email = removeBadWords($email);
        $comment = removeBadWords($comment);
    }
    $ip = getIpAddress();
    if ($ipinfodb == 1) {
        $url = "http://api.ipinfodb.com/v3/ip-city/?key={$key}&ip={$ip}&format=json";
        $data = json_decode(utf8_encode(file_get_contents($url)));
        $country_code = $data->countryCode;
        $country_city = ucwords(strtolower($data->cityName . ', ' . $data->countryName));
        //$image = strtolower($country_code) . ".png";
        $image = strtolower($country_code);
        $country_img = "<div class=\"{$image}\" title=\"{$country_city}\"></div>";
Example #12
0
include "koneksi.php";
include "header.php";
include "fungsi_autolink.php";
$sql = "SELECT * FROM\ttopik\n\t\t   WHERE id_topik='{$_GET['id']}'";
$hasil = mysql_query($sql);
while ($r = mysql_fetch_array($hasil)) {
    echo "<h3>Topik: {$r['subjek']}</h3>";
    $sql2 = "SELECT tanggapan.id_topik, tanggapan.isi_tanggapan, tanggapan.tgl_tanggapan, tanggapan.username, anggota.username, anggota.email  \t\n          FROM tanggapan LEFT JOIN anggota \n          ON tanggapan.username=anggota.username \n          WHERE id_topik='{$_GET['id']}'";
    $hasil2 = mysql_query($sql2);
    while ($r2 = mysql_fetch_array($hasil2)) {
        $tgl_tanggapan = date('d-m-Y/H:i:s', strtotime($r2['tgl_tanggapan']));
        $email = $r2['email'];
        $hurufkecil = strtolower($email);
        $gambar = md5($hurufkecil);
        $isi = nl2br($r2['isi_tanggapan']);
        // membuat paragraf pada isi komentar
        $isi_tanggapan = autolink($isi);
        //echo ;
        echo "<table>\n          <tr>\n\t\t\t\t\t<td colspan=2 bgcolor=#cccccc><small><i>{$tgl_tanggapan}</i></small></td>\n          </tr>\n          <tr>\t\t      \n\t\t\t\t\t<td width=150 bgcolor=#EFF0F4 align=center>{$r2['username']}<br />\n          <img src='http://www.gravatar.com/avatar.php?gravatar_id={$gambar}'></td>\n\t\t\t\t\t<td width=550>{$isi_tanggapan}</td>\n\t\t\t\t\t</tr></table>";
    }
    if (!$_SESSION['signed_in']) {
        echo "Anda harus <a href=signin.php>Login</a> dulu untuk bisa berdiskusi. <br />\n          Atau Anda juga bisa <a href=signup.php>Daftar</a> dulu menjadi anggota baru.";
    } else {
        //show reply box
        echo "<h3>Tanggapan:</h3>\n\t\t\t\t\t<form method=post action=tanggapan.php?id={$r['id_topik']}>\n\t\t\t\t\t\t<textarea name=isi_tanggapan cols=60 rows=5 /></textarea><br />\n\t\t\t\t\t\t<input type=submit value=Kirim />\n\t\t\t\t\t</form>";
    }
    // Apabila topik dibaca, maka tambahkan berapa kali dibacanya
    $sql3 = mysql_query("UPDATE topik SET dibaca={$r['dibaca']}+1 WHERE id_topik='{$_GET['id']}'");
}
include "footer.php";
Example #13
0
 public function getQuoteAttribute($value)
 {
     return autolink(htmlentities($value), 50, ' rel="nofollow" target="_blank"');
 }
Example #14
0
        ?>
 <a href="mensaje.php?accion=eliminar&amp;mensaje=<?php 
        echo $msg['id_mensaje'];
        ?>
" style="font-size:xx-small">Eliminar mensaje</a><?php 
    }
    ?>
</td>
		<td align="right"><?php 
    echo $msg['diashow'];
    ?>
</td>
	</tr>
	<tr>
		<td colspan="2"><?php 
    echo autolink(nl2br($msg['mensaje']));
    ?>
</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<?php 
}
?>
	<tr>
		<td colspan="2"><a href="mensaje.php">Ver m&aacute;s mensajes</a></td>
	</tr>
</table>
</div>
</body>
 private function processVariables($template, $data)
 {
     $account = $data['account'];
     $client = $data['client'];
     $invitation = $data['invitation'];
     $invoice = $invitation->invoice;
     $variables = ['$footer' => $account->getEmailFooter(), '$client' => $client->getDisplayName(), '$account' => $account->getDisplayName(), '$dueDate' => $account->formatDate($invoice->due_date), '$invoiceDate' => $account->formatDate($invoice->invoice_date), '$contact' => $invitation->contact->getDisplayName(), '$firstName' => $invitation->contact->first_name, '$amount' => $account->formatMoney($data['amount'], $client), '$invoice' => $invoice->invoice_number, '$quote' => $invoice->invoice_number, '$link' => $invitation->getLink(), '$viewLink' => $invitation->getLink(), '$viewButton' => HTML::emailViewButton($invitation->getLink(), $invoice->getEntityType()), '$paymentLink' => $invitation->getLink('payment'), '$paymentButton' => HTML::emailPaymentButton($invitation->getLink('payment')), '$customClient1' => $account->custom_client_label1, '$customClient2' => $account->custom_client_label2, '$customInvoice1' => $account->custom_invoice_text_label1, '$customInvoice2' => $account->custom_invoice_text_label2];
     // Add variables for available payment types
     foreach (Gateway::$paymentTypes as $type) {
         $camelType = Gateway::getPaymentTypeName($type);
         $type = Utils::toSnakeCase($camelType);
         $variables["\${$camelType}Link"] = $invitation->getLink() . "/{$type}";
         $variables["\${$camelType}Button"] = HTML::emailPaymentButton($invitation->getLink('payment') . "/{$type}");
     }
     $str = str_replace(array_keys($variables), array_values($variables), $template);
     $str = autolink($str, 100);
     return $str;
 }
<code>
	pear install <?php 
echo $package->user->pear_farm_url();
?>
/<?php 
echo $package->name;
?>
-<?php 
echo $version->version;
?>
</code>
<br />
<br />
<div id='summary'>
	<?php 
echo autolink($data['summary']);
?>
</div>
<br />
<br />
<div id='maintainers'>
<h3>Maintainers:</h3>
<?php 
foreach (array('lead', 'developer', 'contributor', 'helper') as $type) {
    if (!isset($data[$type])) {
        continue;
    }
    ?>
	<ul class='maintainer_info'>
		<?php 
    if (is_assoc($data[$type])) {
        } else {
            foreach ($data[$type] as $lead) {
                ?>
					<li><span class='title'><?php 
                echo ucwords($type);
                ?>
:</span> <?php 
                echo h($lead['name']);
                ?>
</li>
				<?php 
            }
        }
        ?>
				
			</ul>
		<?php 
    }
    ?>
		</li>
		<li><span class='title'>License:</span> <?php 
    echo link_to(h($data['license']['_content']), $data['license']['attribs']['uri'], array('target' => '_blank'));
    ?>
</li>
		<li><span class='title'>Notes:</span> <?php 
    echo autolink(h($data['notes']));
    ?>
</li>
	</ul>
<?php 
}
Example #18
0
$username = $_POST["username"];
$submittedanswer = $_POST["submittedanswer"];
$lines = file($filename);
function decodeURIComponent($str)
{
    $str = preg_replace("/%u([0-9a-f]{3,4})/i", "&#x\\1;", urldecode($str));
    return html_entity_decode($str, null, 'UTF-8');
}
//doesn't work
function autolink($content)
{
    $re = '/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/';
    $content = preg_replace($re, '<a href="$0" rel="nofollow">$0</a>', $content);
    return $content;
}
$submittedanswer = autolink($submittedanswer);
$submittedanswer = str_replace("\n", '\\-n', $submittedanswer);
for ($seeifalreadyanswered = 10; $seeifalreadyanswered < count($lines); $seeifalreadyanswered++) {
    $individualparts = preg_split("/(!n!)/", $lines[$seeifalreadyanswered], -1, PREG_SPLIT_DELIM_CAPTURE);
    if ($individualparts[6] == $username) {
        exit("You've already answered!");
    }
}
$submittedanswer = strip_tags($submittedanswer);
$submittedanswer = str_replace("!n!", '', $submittedanswer);
$submittedanswer = str_replace("!c!", '', $submittedanswer);
//sanitaze stuff here
array_push($lines, "\n" . "0!n!.!f!.!n!.!n!" . $username . "!n!" . $submittedanswer);
file_put_contents($filename, $lines);
$filename = substr($filename, 0, strlen($filename) - 4);
$title = $filename;
Example #19
0
// 메일
$subject = $reply_data[subject] = stripslashes($reply_data[subject]);
// 제목
$subject = cut_str($subject, $setup[cut_length]);
// 제목 자르는 부분
if ($member[level] <= $setup[grant_view]) {
    $subject = "<a href=view.php?{$href}{$sort}&no={$reply_data['no']}>" . $subject . "</a>";
}
// 제목에 링크 거는 부분;
$homepage = $reply_data[homepage] = stripslashes($reply_data[homepage]);
if ($homepage) {
    $homepage = "<a href={$homepage} target=_blank>{$homepage}</a>";
}
$memo = $reply_data[memo] = nl2br(stripslashes($reply_data[memo]));
// 내용
$memo = autolink($memo);
// 자동링크 거는 부분;;
$hit = $reply_data[hit];
// 조회수
$vote = $reply_data[vote];
// 투표수
if ($setup[use_showip] || $is_admin) {
    $ip = "IP Address : " . $reply_data[ip] . "&nbsp;";
}
// 아이피
$comment_num = "[" . $reply_data[total_comment] . "]";
// 간단한 답글 수
$sitelink1 = $reply_data[sitelink1] = stripslashes($reply_data[sitelink1]);
$sitelink2 = $reply_data[sitelink2] = stripslashes($reply_data[sitelink2]);
if ($sitelink1) {
    $sitelink1 = "<a href={$sitelink1} target=_blank>{$sitelink1}</a>";
Example #20
0
function list_check(&$data, $view_check = 0)
{
    global $keyword, $sn, $ss, $sc, $setup, $member, $href, $id, $dir, $category_data, $is_admin, $_zbResizeCheck, $name, $email, $subject, $sort, $prev_no, $no, $homepage, $memo, $hit, $vote, $ip, $comment_num, $sitelink1, $sitelink2, $file_name1, $file_name2, $file_download1, $file_download2, $file_size1, $file_size2, $upload_image1, $upload_image2, $category_name, $date, $reg_date, $insert, $icon, $face_image, $number, $loop_number, $a_file_link1, $a_file_link2, $a_reply, $a_delete, $a_modify, $zbLayer, $_zbCheckNum, $_listCheckTime;
    $_listCheckTimeStart = getmicrotime();
    if ($view_check) {
        $setup[only_board] = 0;
    }
    // 제목에 5줄로 툴바 만듬
    if ($setup[use_status]) {
        $tmpData = explode("\n", stripslashes($data[memo]));
        $totalCommentLineNum = count($tmpData);
        if ($totalCommentLineNum > 10) {
            $showCommentStr_tail .= "\n" . ($totalCommentLineNum - 10) . " lines more... (total : {$totalCommentLineNum} lines)";
            $tmpData_Count = 10;
        } else {
            $tmpData_Count = $totalCommentLineNum;
        }
        $showCommentStr = "";
        for ($i = 0; $i < $tmpData_Count; $i++) {
            $tmpStr = trim($tmpData[$i]);
            if ($tmpStr) {
                $showCommentStr .= $tmpStr . "\n";
            }
        }
        $showCommentStr = str_replace("'", "", $showCommentStr);
        $showCommentStr = str_replace("\"", "", $showCommentStr);
        $showCommentStr .= $showCommentStr_tail;
    }
    $_zbCount = check_zbLayer($data);
    // HTML 사용일 경우 현재 회원의 html 권한이 없거나 관리자가 아니라면 style 속성을 제거
    if ($data[use_html] && $data[islevel] > $setup[grant_html]) {
        $style_pattern = "/(\\<.*?)style=(.*?)(\\>?)/i";
        $data[memo] = preg_replace($style_pattern, "\\1\\3", $data[memo]);
    }
    // 검색어에 해당하는 글자를 빨간;; 색으로 바꾸어줌;;
    if ($keyword) {
        $keyword_pattern = "/{$keyword}/i";
        if ($sn == "on") {
            $data[name] = preg_replace($keyword_pattern, "<font color=FF001E style=background-color:FFF000;>{$keyword}</font>", $data[name]);
        }
        if ($ss == "on") {
            $data[subject] = preg_replace($keyword_pattern, "<font color=FF001E style=background-color:FFF000;>{$keyword}</font>", $data[subject]);
        }
        if ($ss == "on" && $setup[cut_length] > 0) {
            $setup[cut_length] = $setup[cut_length] + 52;
        }
    }
    // ' 등의 특수문자때문에 붙인 \(역슬래쉬)를 떼어낸다
    $name = $data[name] = stripslashes($data[name]);
    // 이름
    $temp_name = get_private_icon($data[ismember], "2");
    if ($temp_name) {
        $name = "<img src='{$temp_name}' border=0 align=absmiddle>";
    }
    $subject = $data[subject] = stripslashes($data[subject]);
    // 제목
    //$subject=$data[subject];
    $subject = cut_str($subject, $setup[cut_length]);
    // 제목 자르는 부분
    $hit = $data[hit];
    // 조회수
    $vote = $data[vote];
    // 투표수
    $comment_num = "[" . $data[total_comment] . "]";
    // 간단한 답글 수
    if ($data[total_comment] == 0) {
        $comment_num = "";
    }
    if ($setup[use_alllist]) {
        $view_file = "zboard.php";
    } else {
        $view_file = "view.php";
    }
    // 제목에 링크 거는 부분;
    if ($member[level] <= $setup[grant_view] || $is_admin) {
        //if($setup[use_status]&&!$data[is_secret]) $addShowComment = " onMouseOver=\"showComment('$showCommentStr',true)\" onMouseOut=\"showComment('',false)\" ";
        if ($setup[use_status] && !$data[is_secret]) {
            $addShowComment = " title=\"{$showCommentStr}\" ";
        }
        $subject = "<a href=\"" . $view_file . "?{$href}{$sort}&no={$data['no']}\" {$addShowComment} >" . $subject . "</a>";
    }
    if (!$setup[only_board]) {
        $homepage = $data[homepage] = stripslashes($data[homepage]);
        if ($homepage) {
            $homepage = "<a href='{$homepage}' target=_blank>{$homepage}</a>";
        }
        // 이미지 박스 사용을 위해서 정규표현식 사용
        if ($data[ismember]) {
            $imageBoxPattern = "/\\[img\\:(.+?)\\.(jpg|gif)\\,align\\=([a-z]){0,}\\,width\\=([0-9]+)\\,height\\=([0-9]+)\\,vspace\\=([0-9]+)\\,hspace\\=([0-9]+)\\,border\\=([0-9]+)\\]/i";
            $data[memo] = preg_replace($imageBoxPattern, "<img src='icon/member_image_box/{$data['ismember']}/\\1.\\2' align='\\3' width='\\4' height='\\5' vspace='\\6' hspace='\\7' border='\\8'>", stripslashes($data[memo]));
        } else {
            $data[memo] = stripslashes($data[memo]);
        }
        if ($data[use_html] < 2) {
            $memo = $data[memo] = nl2br($data[memo]);
        }
        $memo = $data[memo];
        // 자동링크 거는 부분;;
        if ($setup[use_autolink]) {
            $memo = autolink($memo);
        }
        $memo .= "<!--\"<-->";
        // 검색어가 있을경우 내용의 키워드를 변경
        if ($sc == "on" && $keyword) {
            $keyword_pattern = "/([^<]*){$keyword}([^>]*)/i";
            $memo = preg_replace($keyword_pattern, "\\1<font color=FF001E style=background-color:FFF000;>{$keyword}</font>\\2", $memo);
            $keyword_pattern2 = "/<img(.*)<font color=FF001E style=background-color:FFF000;>{$keyword}<\\/font>(.*)>/i";
            $memo = preg_replace($keyword_pattern2, "<img\\1{$keyword}\\2>", $memo);
        }
        // 이미지 리사이즈를 위해서 처리하는 부분
        $memo = preg_replace("/(\\<img)(.*)(\\>?)/i", "\\1 name=zb_target_resize style=\"cursor:hand\" onclick=window.open(this.src) \\2 \\3", $memo);
        $memo = "<table border=0 cellspacing=0 cellpadding=0 width=100% style=\"table-layout:fixed;\"><col width=100%></col><tr><td valign=top>" . $memo . "</table>";
        $_zbResizeCheck = true;
        // 아이피
        if ($is_admin) {
            $ip = "IP Address : " . $data[ip] . "&nbsp;";
        }
        $sitelink1 = $data[sitelink1] = stripslashes($data[sitelink1]);
        $sitelink2 = $data[sitelink2] = stripslashes($data[sitelink2]);
        if ($sitelink1) {
            $sitelink1 = "<a href='{$sitelink1}' target=_blank>{$sitelink1}</a>";
        }
        if ($sitelink2) {
            $sitelink2 = "<a href='{$sitelink2}' target=_blank>{$sitelink2}</a>";
        }
        $file_name1 = $data[s_file_name1];
        $file_name2 = $data[s_file_name2];
        $file_download1 = $data[download1];
        $file_download2 = $data[download2];
        if ($file_name1) {
            $file_size1 = @GetFileSize(filesize($data[file_name1]));
            $a_file_link1 = "<a href='download.php?{$href}{$sort}&no={$data['no']}&filenum=1'>";
        } else {
            $file_size1 = 0;
            $a_file_link1 = "<Zeroboard";
        }
        if ($file_name2) {
            $file_size2 = @GetFileSize(filesize($data[file_name2]));
            $a_file_link2 = "<a href='download.php?{$href}{$sort}&no={$data['no']}&filenum=2'>";
        } else {
            $file_size2 = 0;
            $a_file_link2 = "<Zeroboard";
        }
        $upload_image1 = $upload_image2 = "";
        if (eregi("\\.jpg", $file_name1) || eregi("\\.gif", $file_name1) || eregi("\\.png", $file_name1)) {
            $upload_image1 = "<img src={$data['file_name1']} border=0 name=zb_target_resize style=\"cursor:hand\" onclick=window.open(this.src)><br>";
        }
        if (eregi("\\.jpg", $file_name2) || eregi("\\.gif", $file_name2) || eregi("\\.png", $file_name2)) {
            $upload_image2 = "<img src={$data['file_name2']} border=0 name=zb_target_resize style=\"cursor:hand\" onclick=window.open(this.src)><br>";
        }
    }
    // 카테고리의 이름을 구함
    if ($data[category] && $setup[use_category]) {
        $category_name = $category_data[$data[category]];
    } else {
        $category_name = "&nbsp;";
    }
    // 글쓴 시간을 년월일 시분초 로 변환함
    $reg_date = "<span title='" . date("Y년 m월 d일 H시 i분 s초", $data[reg_date]) . "'>" . date("Y/m/d", $data[reg_date]) . "</span>";
    $date = date("Y-m-d H:i:s", $data[reg_date]);
    // 폼메일을 사용하고 관련메뉴가 생성이 되면 레이어오픈
    if ($_zbCount && $setup[use_formmail]) {
        $name = "<span onMousedown=\"ZB_layerAction('zbLayer{$_zbCheckNum}','visible')\" style=cursor:hand>{$name}</span>";
        // 폼메일을 사용안할 경우 무조건 메일링크
    } else {
        if ($data[email]) {
            $name = "<a href=\"javascript:void(window.open('open_window.php?mode=m&str=" . urlencode(base64_encode($data[email])) . "','ZBremote','width=1,height=1,left=1,top=1'))\">{$name}</a>";
        }
        //$name="<a href=\"javascript:void(window.open('view_info.php?to=$email&id=$id&member_no=$data[ismember]','mailform','width=400,height=510,statusbar=no,scrollbars=yes,toolbar=no'))\">$name</a>";
    }
    // Depth에 의한 들임값을 정함
    $insert = "";
    if ($data[depth] > 15) {
        $data[depth] = 15;
    }
    for ($z = 0; $z < $data[depth]; $z++) {
        $insert .= "&nbsp; ";
    }
    $icon = get_icon($data);
    // 이름앞에 붙는 아이콘 정의;;
    $face_image = get_face($data);
    $number = $loop_number;
    // 바로 전에 본 글인 경우 번호를 아이콘으로 바꿈
    if ($prev_no == $data[no]) {
        $number = "<img src={$dir}/arrow.gif border=0 align=absmiddle>";
    } elseif ($number != "&nbsp;") {
        $number = $loop_number;
    }
    // 답글 버튼
    if (($is_admin || $member[level] <= $setup[grant_reply]) && $data[headnum] > -2000000000 && $data[headnum] != -1) {
        $a_reply = "<a href='write.php?{$href}{$sort}&no={$data['no']}&mode=reply'>";
    } else {
        $a_reply = "<Zeroboard";
    }
    // 삭제버튼
    if (($is_admin || $member[level] <= $setup[grant_delete] || $data[ismember] == $member[no] || !$data[ismember]) && !$data[child]) {
        $a_delete = "<a href='delete.php?{$href}{$sort}&no={$data['no']}'>";
    } else {
        $a_delete = "<Zeroboard";
    }
    // 수정버튼
    if ($is_admin || $member[level] <= $setup[grant_delete] || $data[ismember] == $member[no] || !$data[ismember]) {
        $a_modify = "<a href='write.php?{$href}{$sort}&no={$data['no']}&mode=modify'>";
    } else {
        $a_modify = "<Zeroboard";
    }
    // 스팸메일러 금지
    $mail = $data[email] = "";
    $_listCheckTime += getmicrotime() - $_listCheckTimeStart;
}
Example #21
0
function walk_preprocess_node(&$vars)
{
    $vars['classes_array'][] = $vars['view_mode'];
    $vars['theme_hook_suggestions'][] = 'node__' . $vars['type'] . '__' . $vars['view_mode'];
    //dpm($vars);
    $vars['submitted'] = t(format_date($vars['created'], 'tiny'));
    switch ($vars['type']) {
        case 'instagram':
            // 			dpm($vars);
            //if($vars['view_mode'] == 'teaser') {
            //$vars['classes_array'][] = 'col-lg-6';
            //dpm($vars['field_instagram_picture'][0]['timestamp']);
            //$vars['content']['body'][0]['#markup'] = $vars['body'][0]['value'] . '<div class="post-date"><i class="fa fa-instagram"></i> ' . date("j F, Y", $vars['created']) . '</div>';
            //dpm( date("l jS \of F Y h:i:s A", $vars['created']));
            //dpm($vars);
            break;
            //}
            break;
        case 'tweet':
            $vars['content']['field_tweet_user'][0]['#markup'] = l('@' . $vars['field_tweet_user'][0]['value'], 'https://twitter.com/' . $vars['field_tweet_user'][0]['value']);
            //dpm(date('H:i - j m, Y',$vars['created']));
            //makeClickableLinks();
            $vars['content']['body'][0]['#markup'] = autolink($vars['content']['body'][0]['#markup']);
            break;
        case 'walk':
            //dpm($vars);
            switch ($vars['view_mode']) {
                case 'full':
                    /*
                    					$vars['content']['field_walk_location'] = array(
                    						'#theme' => 'field',
                    						'#weight' => 3,
                    						'#title' => 'Walk Meeting Location',
                    						'#access' => true,
                    						'#label_display' => 'above',
                    						'#view_mode' => 'full',
                    						'#language' => 'und',
                    						'#field_name' => 'field_walk_location',
                    						'#entity_type' => 'node',
                    						'#bundle' => 'walk',
                    						'#field_type' => 'text',
                    						'#items' => array(
                    							'value' => 'sssss',
                    							
                    						),
                    					);
                    */
                    $vars['content']['field_doctor']['#title'] = 'Doctors';
                    $vars['content']['field_full_name']['#title'] = 'Walk Organizer';
                    $vars['content']['field_date_of_walk']['title'] = 'When';
                    //dpm($vars);
                    break;
                case 'teaser':
                    break;
            }
        case 'story':
            //dpm($vars);
            if ($vars['view_mode'] == 'teaser') {
                if ($vars['body'][0]['summary']) {
                    $vars['content']['links']['node']['#links']['node-readmore']['attributes']['class'] = 'btn btn-default';
                    $vars['content']['body'][0]['#markup'] = $vars['body'][0]['summary'];
                } else {
                    unset($vars['content']['links']);
                    $vars['content']['body'][0]['#markup'] = $vars['body'][0]['value'];
                }
            }
            break;
    }
    if ($vars['nid'] == 401) {
        if (isset($_GET['walkid'])) {
            $walknid = $_GET['walkid'];
            $walk = node_load($walknid);
            // 			dpm($walk);
            //dpm($vars);
            //$vars['content'] = $walk;
        } else {
            drupal_set_message(t('There has been an error, no walk specified. You have not been registered for a walk, if you arrived at this page after submitting the Walk Registration from, please go back and register again.'), 'error');
        }
    }
}
Example #22
0
    $jml = mysql_num_rows($sql);
    // Apabila sudah ada komentar, tampilkan
    if ($jml > 0) {
        while ($s = mysql_fetch_array($sql)) {
            $tanggal = tgl_indo($s[tgl]);
            // Apabila ada link website diisi, tampilkan dalam bentuk link
            if ($s[url] != '') {
                echo "<span class=komentar><a name={$s['id_komentar']} id={$s['id_komentar']}><a href='http://{$s['url']}' target='_blank'>{$s['nama_komentar']}</a></a></span><br />";
            } else {
                echo "<span class=komentar>{$s['nama_komentar']}</span><br />";
            }
            echo "<span class=tanggal>{$tanggal} - {$s['jam_komentar']} WIB</span><br /><br />";
            $isian = nl2br($s[isi_komentar]);
            // membuat paragraf pada isi komentar
            $isikan = sensor($isian);
            echo autolink($isikan);
            echo "<hr color=#CCC noshade=noshade />";
        }
        $jmldata = mysql_num_rows(mysql_query("SELECT * FROM komentar WHERE id_berita='" . $val->validasi($_GET['id'], 'sql') . "' AND aktif='Y'"));
        $jmlhalaman = $p->jumlahHalaman($jmldata, $batas);
        $linkHalaman = $p->navHalaman($_GET['halkomentar'], $jmlhalaman);
        echo "{$linkHalaman}";
    }
    // Form komentar
    echo "<br /><br /><b>\n        \n\t\t<div class=contentberita><div class=contentberitaborder><div class=contentberitaborder2> \n\t\t<div class=feature>       \n\t\t\t\n            <div align=justify>\n              <p>&nbsp;</p>\n              <p>&nbsp;</p>\n            <div class=formkomentar><b>Silahkan beri komentar disini:</b>\n            <form name='form' action=simpankomentar.php method=POST onSubmit=\"return validasi(this)\" >\n  \t\t\t    <input type=hidden name=id value=" . $val->validasi($_GET['id'], 'sql') . ">\n  \t\t\t    <input type=hidden name=judul_seo value='{$d['judul_seo']}'>\n            <div class=komentarku>\n            <div class=inputkomentar>\n            <textarea name='isi_komentar' maxlength=50 style='width: 250px; height: 147px;' title=Tulis Pesan Disini ></textarea>\n            </div></div>\n            \n            <div class=namakomentar>\n            <div class=inputnama><input type=text onfocus=this.value='' value=*Name name=nama_komentar  maxlength=30 title=Tulis Nama Disini />\n            </div></div> \n            \n            <div class=emailkomentar>\n            <div class=inputemail><input type=text name=email onfocus=this.value='' value=*Email  maxlength=50 title=Tulis Email Disini />\n            </div></div>\n\t\t\n            <div class=kodekomentar>\n            <div class=inputkode><input type=text name=kode onfocus=this.value='' value=*Kode maxlength=50 title=Tulis Kode Validasi Disini />        \n            </div></div>\n                        \n            <div class=capcha><img src='captcha.php'  ></div>\n              <div class=kirimja><input type=submit name=submit value=Kirim></div>\n            </form> \n            </div>\n      \n            </div>\n          </div>\n\t\t<br />";
    echo "</div></div></div></div></div>";
} elseif ($_GET['module'] == 'detailkategori') {
    echo "<div id='content'>          \n           <div id='content-detail'>";
    // Tampilkan nama kategori
    $sq = mysql_query("SELECT nama_kategori from kategori where id_kategori='" . $val->validasi($_GET['id'], 'sql') . "'");
    $n = mysql_fetch_array($sq);
Example #23
0
                echo str_replace('_', '/posts/', $item->id);
                ?>
" target="_blank"><span>Link</span></a></li>
                  </ul>
                  <div class="social__slider--feed__content">
                    <div class="social__slider--feed__header">
                      <a href="https://facebook.com/profile.php?id=<?php 
                echo $item->from->id;
                ?>
"><?php 
                echo $item->from->name;
                ?>
</a>
                    </div>
                    <p><?php 
                echo autolink($item->message);
                ?>
</p>
                  </div>
                </div>
              </li>
            <?php 
            }
            ?>
          <?php 
        }
        ?>
        <?php 
    }
    ?>
      <?php 
Example #24
0
 public static function auto_link_text($string)
 {
     return autolink($string);
 }
Example #25
0
function print_bbs($skinname, $title, $id, $num = 5, $textlen = 30, $datetype = "Y/m/d")
{
    global $_zb_path, $_zb_url, $connect, $t_board, $admin_table;
    if (!$skinname || !$id || !$title) {
        return;
    }
    $str = zReadFile($_zb_path . "latest_skin/" . $skinname . "/main.html");
    if (!$str) {
        echo "No existence for the skin({$skinname}).<br>";
        return;
    }
    $setup = mysql_fetch_array(mysql_query("select use_alllist from {$admin_table} where name='{$id}'"));
    if ($setup[use_alllist]) {
        $target = "zboard.php?id=" . $id;
    } else {
        $target = "view.php?id=" . $id;
    }
    $result = mysql_query("select * from {$t_board}" . "_{$id} where is_secret=0 order by no desc limit {$num}", $connect) or die(mysql_error());
    $tmpStr = explode("[loop]", $str);
    $header = $tmpStr[0];
    $tmpStr2 = explode("[/loop]", $tmpStr[1]);
    $loop = $tmpStr2[0];
    $footer = $tmpStr2[1];
    // 공지사항 형식을 만들때 사용
    if (eregi("\\[notice\\_", $header)) {
        $data = mysql_fetch_array($result);
        $memo = stripslashes($data[memo]);
        if ($data[use_html] < 2) {
            $memo = nl2br($memo);
        } else {
            $memo = strip_tags($memo);
        }
        $filename1 = $data[file_name1];
        $filename2 = $data[file_name2];
        if (eregi("\\.gif|\\.jpg", $filename1)) {
            $uploadimage1 = "<img src=" . $_zb_url . $filename1 . " border=0><br>";
        } else {
            $uploadimage1 = "";
        }
        if (eregi("\\.gif|\\.jpg", $filename2)) {
            $uploadimage2 = "<img src=" . $_zb_url . $filename1 . " border=0><br>";
        } else {
            $uploadimage2 = "";
        }
        $memo = autolink($uploadimage1 . $uploadimage2 . $memo);
        if ($data[ismember]) {
            $imageBoxPattern = "/\\[img\\:(.+?)\\.(jpg|gif)\\,align\\=([a-z]){0,}\\,width\\=([0-9]+)\\,height\\=([0-9]+)\\,vspace\\=([0-9]+)\\,hspace\\=([0-9]+)\\,border\\=([0-9]+)\\]/i";
            $memo = preg_replace($imageBoxPattern, "<img src='" . $_zb_url . "icon/member_image_box/{$data['ismember']}/\\1.\\2' align='\\3' width='\\4' height='\\5' vspace='\\6' hspace='\\7' border='\\8'>", stripslashes($memo));
        }
        $subject = cut_str(stripslashes($data[subject]), $textlen) . "</font></b>";
        $date = date($datetype, $data[reg_date]);
        $header = str_replace("[notice_memo]", $memo, $header);
        $header = str_replace("[notice_subject]", $subject, $header);
        $header = str_replace("[notice_date]", $date, $header);
    }
    $main_data = "";
    while ($data = mysql_fetch_array($result)) {
        $name = stripslashes($data[name]);
        $subject = cut_str(stripslashes($data[subject]), $textlen) . "</font></b>";
        $date = date($datetype, $data[reg_date]);
        if ($data[total_comment]) {
            $comment = "[" . $data[total_comment] . "]";
        } else {
            $comment = "";
        }
        $main = $loop;
        $main = str_replace("[name]", $name, $main);
        $main = str_replace("[date]", $date, $main);
        $main = str_replace("[subject]", "<a href='" . $_zb_url . $target . "&no={$data['no']}'>" . $subject . "</a>", $main);
        $main = str_replace("[comment]", $comment, $main);
        $main_data .= "\n" . $main;
    }
    $list = $header . $main_data . $footer;
    $list = str_replace("[title]", "<a href='" . $_zb_url . "zboard.php?id=" . $id . "'>" . $title . "</a>", $list);
    $list = str_replace("[dir]", $_zb_url . "latest_skin/" . $skinname . "/images/", $list);
    echo $list;
}
Example #26
0
 public static function out($key)
 {
     if ($key === 'count' && isset(self::$current_token['__loop__'])) {
         return count(self::$current_token['__loop__']);
     }
     $parameters = array('separator' => ' ', 'utc' => true, 'autolink' => null);
     preg_match_all('/([a-z_]+)=["\']([^"\']+)["|\']/', $key, $matches);
     foreach ($matches[1] as $i => $name) {
         $key = str_replace($matches[0][$i], '', $key);
         $parameters[$name] = $matches[2][$i];
     }
     $is_archive = strpos($key, 'archive.type') !== false;
     $key = str_replace(' ', '', $key);
     $count = $plural = $singular = $math = $to_json = false;
     if (strpos($key, '|') === false) {
         $globals = array('site', 'location', '_parent', 'rss', 'profile', 'source', 'settings', 'routed_variables', 'page_variables', 'pjax', 'labels', 'messages', 'language');
         if (strpos($key, '.length') !== false) {
             $key = str_replace('.length', '', $key);
             $count = true;
         }
         if (preg_match('/_on$/', $key)) {
             $key .= '.timestamp';
             if (!isset($parameters['date_format'])) {
                 if (isset($parameters['date_only'])) {
                     $parameters['date_format'] = self::$site['date_format'];
                 } else {
                     if (isset($parameters['time_only'])) {
                         $parameters['date_format'] = self::$site['time_format'];
                     } else {
                         $parameters['date_format'] = self::$site['date_format'] . ' ' . self::$site['time_format'];
                     }
                 }
             }
         }
         if (preg_match('~\\s*([+\\-/\\*])\\s*(([0-9]+)|([a-z_\\.]+))\\s*?~', $key, $maths)) {
             $math = array('operator' => $maths[1], 'num' => is_numeric($maths[2]) ? $maths[2] : self::out($maths[2]));
             $key = str_replace($maths[0], '', $key);
         }
         $keys = explode('.', $key);
         if (in_array($keys[0], $globals)) {
             $global_key = array_shift($keys);
             if ($global_key === 'labels') {
                 $return = self::$site['url_data'];
             } else {
                 if ($global_key === 'rss') {
                     $return = self::$rss_feeds;
                 } else {
                     $return = self::${$global_key};
                 }
             }
         } else {
             if (in_array($key, self::$template_variable_keys)) {
                 return self::$template_variables[$key];
             } else {
                 $return = self::$current_token;
             }
         }
         if (count($keys) === 1 && $keys[0] === 'now') {
             $return = time();
         } else {
             if (count($keys) === 1 && $keys[0] === 'year') {
                 $return = date('Y');
             } else {
                 while (count($keys)) {
                     $index = array_shift($keys);
                     if ($index === 'index') {
                         $index = '__loop_index';
                     } else {
                         if ($index === 'first') {
                             $index = 0;
                         }
                     }
                     if (is_array($return) && isset($return['utc'])) {
                         $parameters['utc'] = $return['utc'];
                     }
                     if ((!is_array($return) || !isset($return[$index])) && $index === 'type' && isset($return['__koken__'])) {
                         if (count($keys)) {
                             $next = array_shift($keys);
                         } else {
                             $next = 'plural';
                         }
                         $return = self::$site['url_data'][$return['__koken__']][$next];
                         if (!isset($parameters['case'])) {
                             $parameters['case'] = 'title';
                         }
                         $plural = $singular = false;
                         $keys = array();
                     } else {
                         if ((!is_array($return) || !isset($return[$index])) && $index === 'clean' && !isset($return['raw'])) {
                             $parameters['clean'] = true;
                         } else {
                             if (!isset($return[$index]) && $index === 'title' && isset($return['year'])) {
                                 if (isset($return['month'])) {
                                     $return = self::title_from_archive($return, isset($parameters['date_format']) ? $parameters['date_format'] : false);
                                 } else {
                                     $return = $return['year'];
                                 }
                                 unset($parameters['date_format']);
                             } else {
                                 if (isset($global_key) && $global_key === 'settings' && isset(Koken::$settings['__scoped_' . str_replace('.', '-', Koken::$location['template']) . '_' . $index])) {
                                     $return = Koken::$settings['__scoped_' . str_replace('.', '-', Koken::$location['template']) . '_' . $index];
                                 } else {
                                     if (($index === 'plural' || $index === 'singular') && $is_archive && isset(self::$site['url_data'][$return]) && isset(self::$site['url_data'][$return][$index])) {
                                         $return = self::$site['url_data'][$return][$index];
                                         if (!isset($parameters['case'])) {
                                             $parameters['case'] = 'lower';
                                         }
                                     } else {
                                         if ($index === 'to_json') {
                                             $to_json = true;
                                         } else {
                                             if ($index === 'plural' && (!is_array($return) || !isset($return['plural']))) {
                                                 $plural = true;
                                             } else {
                                                 if ($index === 'singular' && (!is_array($return) || !isset($return['singular']))) {
                                                     $singular = true;
                                                 } else {
                                                     $return = isset($return[$index]) ? $return[$index] : '';
                                                     if (is_string($return)) {
                                                         $parts = explode('.', $return);
                                                         if (in_array($parts[0], $globals)) {
                                                             $return = self::out($return);
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     } else {
         $candidates = explode('|', $key);
         $return = '';
         while (empty($return) && count($candidates)) {
             $return = self::out(array_shift($candidates));
         }
     }
     if ($count) {
         $return = count($return);
         if (isset($parameters['plural']) && isset($parameters['singular']) && is_numeric($return)) {
             $pparts = explode('.', $parameters['plural']);
             $sparts = explode('.', $parameters['singular']);
             if (in_array($pparts[0], $globals)) {
                 $parameters['plural'] = self::out($parameters['plural']);
             }
             if (in_array($sparts[0], $globals)) {
                 $parameters['singular'] = self::out($parameters['singular']);
             }
             return $return === 1 ? $parameters['singular'] : $parameters['plural'];
         } else {
             return $return;
         }
     } else {
         if (isset($parameters['truncate'])) {
             $return = self::truncate(strip_tags($return), $parameters['truncate'], isset($parameters['after_truncate']) ? $parameters['after_truncate'] : '…');
         }
         if (isset($parameters['case'])) {
             $return = self::case_convert($return, $parameters['case']);
         }
         if (isset($parameters['paragraphs'])) {
             $return = self::format_paragraphs($return);
             if (is_null($parameters['autolink']) || $parameters['autolink']) {
                 $return = autolink($return);
             }
         } else {
             if ($parameters['autolink']) {
                 $return = autolink($return);
             }
         }
         if (isset($parameters['date_format'])) {
             if (is_array($return) && isset($return['timestamp'])) {
                 $return = $return['timestamp'];
             }
             if (!$parameters['utc']) {
                 date_default_timezone_set('UTC');
             }
             $return = date($parameters['date_format'], $return);
             date_default_timezone_set(Koken::$site['timezone']);
         }
         if (isset($parameters['strip_html'])) {
             $return = preg_replace('/\\s+/', ' ', preg_replace('/\\n+/', ' ', strip_tags($return)));
             $parameters['html_encode'] = true;
         }
         if (isset($parameters['find']) && isset($parameters['replace'])) {
             $return = str_replace($parameters['find'], $parameters['replace'], $return);
         }
         if (isset($parameters['collate'])) {
             $args = explode(',', str_replace(' ', '', $parameters['collate']));
             foreach ($args as &$a) {
                 $a = self::out(trim($a));
             }
             unset($a);
             $return = vsprintf($return, $args);
         }
         if (isset($parameters['url_encode'])) {
             $return = urlencode($return);
         }
         if (isset($parameters['html_encode'])) {
             $return = htmlspecialchars($return);
         }
         if (isset($parameters['if_true'])) {
             $return = $return ? $parameters['if_true'] : '';
         }
         if (isset($parameters['clean'])) {
             $return = preg_replace('/\\s+/', ' ', preg_replace('/[^\\-_A-Za-z0-9]+/', ' ', preg_replace('/\\.[a-z]+$/', '', $return)));
         }
         if (isset($parameters['plural']) && isset($parameters['singular']) && is_numeric($return)) {
             $pparts = explode('.', $parameters['plural']);
             $sparts = explode('.', $parameters['singular']);
             if (in_array($pparts, $globals)) {
                 $parameters['plural'] = self::out($parameters['plural']);
             }
             if (in_array($sparts, $globals)) {
                 $parameters['singular'] = self::out($parameters['singular']);
             }
             $return = $return === 1 ? $parameters['singular'] : $parameters['plural'];
         }
         if ($plural) {
             $return = self::plural($return);
         }
         if ($singular) {
             $return = self::singular($return);
         }
         if ($math) {
             switch ($math['operator']) {
                 case '+':
                     $return += $math['num'];
                     break;
                 case '-':
                     $return -= $math['num'];
                     break;
                 case '/':
                     $return /= $math['num'];
                     break;
                 case '*':
                     $return *= $math['num'];
                     break;
             }
         }
         if (is_array($return) && !isset($parameters['debug'])) {
             if ($to_json) {
                 unset($return['counts']);
                 $fields = false;
                 if (isset($parameters['fields'])) {
                     $fields = explode(',', str_replace(' ', '', $parameters['fields']));
                 }
                 if (isset($return[0])) {
                     $fresh = array();
                     foreach ($return as $r) {
                         if ($fields) {
                             $slim = array();
                             foreach ($fields as $f) {
                                 if (isset($r[$f])) {
                                     $slim[$f] = $r[$f];
                                 }
                             }
                             $fresh[] = $slim;
                         } else {
                             $fresh[] = $r;
                         }
                     }
                     $return = $fresh;
                 } else {
                     if ($fields) {
                         $slim = array();
                         foreach ($fields as $f) {
                             if (isset($return[$f])) {
                                 $slim[$f] = $return[$f];
                             }
                         }
                         $return = $slim;
                     }
                 }
                 $return = json_encode($return);
             } else {
                 if (isset($return['clean'])) {
                     $return = $return['clean'];
                 } else {
                     if (isset($return['raw'])) {
                         $return = $return['raw'];
                     } else {
                         if (count($return)) {
                             if (is_array($return[0])) {
                                 if (!isset($parameters['field'])) {
                                     $parameters['field'] = 'title';
                                 }
                                 if (isset($parameters['field']) && isset($return[0][$parameters['field']])) {
                                     $return = array_map(create_function('$arr', 'return $arr["' . $parameters['field'] . '"];'), $return);
                                 } else {
                                     $return = array();
                                 }
                             }
                             $return = join($parameters['separator'], $return);
                         } else {
                             $return = '';
                         }
                     }
                 }
             }
         }
         return isset($parameters['debug']) ? var_dump($return) : $return;
     }
 }
Example #27
0
          <div class="mblockwrapper">
            <table class="mblock"><tr>
              <td class="pp"><profpic style="background-image: url('<?php 
        echo $m['frompic'];
        ?>
');"></profpic></td>
              <td><data>
                <name><?php 
        echo $m['fromname'];
        ?>
</name><time><?php 
        echo $m['time'];
        ?>
</time>
                <text><?php 
        echo nl2br(autolink($m['msg']));
        ?>
</text>
              </data></td>
            </tr></table>
          </div>
        <?php 
    }
    ?>
        <div class="mblockwrapper">
          <table class="mblock">
            <td class="pp"><profpic style="background-image: url('asdf');"></profpic></td>
            <td><data>
              <form method="post" action="?id=<?php 
    vecho('currentid');
    ?>
Example #28
0
 <?php 
        echo T_("CP_FORUM_THIS_WILL_REALLY_DEL");
        ?>
.
      <input type="submit" name="delcat" class="button" value="Delete" />
      </form>
<?php 
        end_frame();
        stdfoot();
    }
    if ($_GET["do"] == "edit_forumcat") {
        $id = (int) $_GET["id"];
        $q = SQL_Query_exec("SELECT * FROM forumcats WHERE id = '{$id}'");
        $r = mysql_fetch_array($q);
        if (!$r) {
            autolink("admincp.php?action=forum", T_("FORUM_INVALID_CAT"));
        }
        begin_frame(T_("CP_CATEGORY_EDIT"));
        ?>
    <form action="admincp.php?action=forum" method="post">
    <input type="hidden" name="do" value="save_editcat" />
    <input type="hidden" name="id" value="<?php 
        echo $id;
        ?>
" />
    <table class='f-border a-form' align='center' width='80%' cellspacing='2' cellpadding='5'>
    <tr class='f-title'><td><?php 
        echo T_("CP_FORUM_NEW_NAME_CAT");
        ?>
:</td></tr>
    <tr><td align='center'><input type="text" name="changed_forumcat" class="option" size="35" value="<?php 
                <thead>
                <tr>
                    <th>Keyword</th>
                    <th>Value</th>
                    <th>Added By</th>
                    <th>Uses</th>
                </tr>
                </thead>
                <tbody>
                <?php 
$stmt = $db->prepare("SELECT keyword, value, uses, username FROM data_store\n                LEFT JOIN members ON data_store.owner=members.id AND data_store.server=members.server WHERE approved=1 AND data_store.server= ? ORDER BY keyword ");
$stmt->bind_param("s", $server);
$stmt->execute();
$stmt->bind_result($keyword, $value, $uses, $username);
while ($stmt->fetch()) {
    echo "<tr><td>" . htmlspecialchars($keyword) . "</td><td>" . nl2br(autolink(htmlspecialchars($value, 50))) . "</td><td>" . htmlspecialchars($username) . "</td><td>" . $uses . "</td></tr>";
}
?>
                </tbody>
            </table>
        </div>
        <?php 
if ($server == PRIMARY_GUILD) {
    ?>
            <div id="channelStats">
                <h1>Channel Stats</h1>
                <table>
                    <tr><th>Channel</th><th>Total Messages</th><th>Date Tracking Started</th><th>Avg Msgs/Day</th></tr>
                    <?php 
    $query = $db->query("SELECT * FROM channel_stats WHERE web=1");
    $total = 0;
Example #30
0
?>
<div id="ppal">
<?php 
include "inc/fechas.php";
if (empty($_GET['encuesta'])) {
    ?>
	<h1>Encuestas</h1>
	<?php 
    while ($enc = mysql_fetch_assoc($q_encuestas)) {
        ?>
	<p>&nbsp;</p>
	<form action="encuesta.php" method="post">
	<table cellspacing="0">
		<tr>
			<th colspan="2" align="left"><?php 
        echo autolink(htmlentities($enc['pregunta']));
        ?>
</th>
		</tr>
		<tr>
			<td colspan="2">Hasta el: <?php 
        echo $enc['fechashow'];
        ?>
</td>
		</tr>
		<tr>
			<td width="24"><input type="radio" name="opcion[<?php 
        echo $enc['id_encuesta'];
        ?>
]" value="1" id="encuesta<?php 
        echo $enc['id_encuesta'];