当前位置: 首页>>代码示例>>PHP>>正文


PHP convert类代码示例

本文整理汇总了PHP中convert的典型用法代码示例。如果您正苦于以下问题:PHP convert类的具体用法?PHP convert怎么用?PHP convert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了convert类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showList

 function showList()
 {
     $mes = e107::getMessage();
     $sql = e107::getDb();
     $ns = e107::getRender();
     $tp = e107::getParser();
     $frm = e107::getForm();
     $gen = new convert();
     $count = $sql->select("gsitemap", "*", "gsitemap_id !=0 ORDER BY gsitemap_order ASC");
     if (!$count) {
         $text = "\n\t\t\t<form action='" . e_SELF . "?import' id='import' method='post'>\n\t\t\t" . GSLAN_39 . "<br /><br />" . $frm->admin_button('import', LAN_YES, 'submit') . "\n\t\t\t</form>";
         $mes->addInfo($text);
         $ns->tablerender(GSLAN_24, $mes->render());
         return;
     } else {
         $text = "\n\t\t\t<form action='" . e_SELF . "' id='display' method='post'>\n\t\t\t<table class='table adminlist'>\n            \t<colgroup span='2'>\n\t\t\t\t\t<col style='width:5%' />\n\t\t\t\t\t<col style='width:10%' />\n\t\t\t\t\t<col style='width:35%' />\n\t\t\t\t\t<col style='width:20%' />\n\t\t\t\t\t<col style='width:10%' />\n\t\t\t\t\t<col style='width:10%' />\n\t\t\t\t\t<col style='width:10%' />\n\t\t\t\t</colgroup>\n                <thead>\n\t\t\t\t<tr class='first last' >\n\t\t\t\t<th style='text-align: center;'>Id</th>\n\t\t\t\t<th>" . LAN_NAME . "</th>\n\t\t\t\t<th>" . LAN_URL . "</th>\n\t\t\t\t<th style='text-align: center'>" . GSLAN_27 . "</th>\n\t\t\t\t<th style='text-align: center' >" . GSLAN_28 . "</th>\n\t\t\t\t<th style='text-align: center' >" . GSLAN_9 . "</th>\n\t\t\t\t<th style='text-align: center'>" . LAN_OPTIONS . "</th>\n\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t";
         $glArray = $sql->db_getList();
         foreach ($glArray as $row2) {
             $datestamp = $gen->convert_date($row2['gsitemap_lastmod'], "short");
             $rowStyle = vartrue($rowStyle) == "odd" ? "even" : "odd";
             $text .= "<tr class='{$rowStyle}'>\n\t\t\t\t<td style='; text-align: center;'>" . $row2['gsitemap_id'] . "</td>\n\t\t\t\t<td>" . $tp->toHTML($row2['gsitemap_name'], "", "defs") . "</td>\n\t\t\t\t<td>" . $row2['gsitemap_url'] . "</td>\n\t\t\t\t<td style='; text-align: center;'>" . $datestamp . "</td>\n\t\t\t\t<td style='; text-align: center;'>" . $this->freq_list[$row2['gsitemap_freq']] . "</td>\n\t\t\t\t<td style='; text-align: center;'>" . $row2['gsitemap_priority'] . "</td>\n\n\t\t\t\t<td class='center' style='white-space:nowrap'>\n\t\t\t\t<div>\n\t\t\t\t<button class='btn btn-default' type='submit' name='edit[{$row2['gsitemap_id']}]' value='edit' alt='" . LAN_EDIT . "' title='" . LAN_EDIT . "' style='border:0px' >" . ADMIN_EDIT_ICON . "</button>\n\t\t\t\t<button class='btn btn-default action delete' type='submit' name='delete[{$row2['gsitemap_id']}]' value='del' data-confirm='" . $tp->toJS(LAN_CONFIRMDEL . " [" . $row2['gsitemap_name'] . "]") . "' title='" . LAN_DELETE . "' >" . ADMIN_DELETE_ICON . "</button>\n\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t";
         }
     }
     $text .= "</tbody></table>\n</form>";
     $ns->tablerender(GSLAN_24, $mes->render() . $text);
 }
开发者ID:gitter-badger,项目名称:e107,代码行数:26,代码来源:admin_config.php

示例2: SaveDeployment

 function SaveDeployment($data, $form)
 {
     $id = convert::raw2sql($data['DeploymentID']);
     // Only loaded if it belongs to current user
     $Deployment = $form->controller->LoadDeployment($id);
     // If a deployment wasn't returned, we'll create a new one
     if (!$Deployment) {
         $Deployment = new Deployment();
         $Deployment->OrgID = Member::currentUser()->getCurrentOrganization()->ID;
         $newDeploy = true;
     }
     $form->saveInto($Deployment);
     $survey = $form->controller->GetCurrentSurvey();
     $Deployment->DeploymentSurveyID = $survey->ID;
     $Deployment->UpdateDate = SS_Datetime::now()->Rfc2822();
     $Deployment->OrgID = $survey->OrgID;
     $Deployment->write();
     /**/
     $survey->CurrentStep = 'MoreDeploymentDetails';
     $survey->HighestStepAllowed = 'MoreDeploymentDetails';
     $survey->UpdateDate = SS_Datetime::now()->Rfc2822();
     $survey->write();
     // If it is a new deployment and it is public, we send an email...
     if (isset($newDeploy) && $Deployment->IsPublic === 1) {
         global $email_new_deployment;
         global $email_from;
         $email = EmailFactory::getInstance()->buildEmail($email_from, $email_new_deployment, 'New Deployment');
         $email->setTemplate('NewDeploymentEmail');
         $email->populateTemplate(array('Deployment' => $Deployment));
         $email->send();
     }
     Session::set('CurrentDeploymentID', $Deployment->ID);
     Controller::curr()->redirect($form->controller->Link() . 'MoreDeploymentDetails');
 }
开发者ID:Thingee,项目名称:openstack-org,代码行数:34,代码来源:DeploymentSurveyDeploymentDetailsForm.php

示例3: email_item

function email_item($thread_id)
{
    global $tp;
    $gen = new convert();
    include_once e_PLUGIN . 'forum/forum_class.php';
    $forum = new e107forum();
    $thread_info = $forum->thread_get($thread_id, 0, 999);
    $thread_name = $tp->toHTML($thread_info[0]['thread_name'], TRUE);
    $text = "<b>" . $thread_name . "</b><br />\n\t" . $thread_info[0]['user_name'] . ", " . $gen->convert_date($thread_info[0]['thread_datestamp'], "forum") . "<br /><br />\n\t" . $tp->toHTML($thread_info[0]['thread_thread'], TRUE);
    $count = 1;
    unset($thread_info[0], $thread_info['head']);
    foreach ($thread_info as $reply) {
        $text .= "<br /><br />Re: <b>" . $thread_name . "</b><br />\n\t\t" . $reply['user_name'] . ", " . $gen->convert_date($reply['thread_datestamp'], "forum") . "<br /><br />\n\t\t" . $tp->toHTML($reply['thread_thread'], TRUE);
    }
    return $text;
}
开发者ID:notzen,项目名称:e107,代码行数:16,代码来源:e_emailprint.php

示例4: INSERT

 public function INSERT($username, $password)
 {
     if (mssql_num_rows(mssql_query("SELECT * FROM [user] WHERE username='{$username}'")) == 0) {
         $insertQuery = "INSERT INTO\r\n\t\t\t\t[dbo].[user]\r\n\t\t\t\t(\r\n\t\t\t\t\tusername,\r\n\t\t\t\t\tpassword,\r\n\t\t\t\t\tinsert_userID,\r\n\t\t\t\t\tinsert_datetime\r\n\t\t\t\t)VALUES(\r\n\t\t\t\t\t'" . convert::fromUTF($name) . "',\r\n\t\t\t\t\t'{$password}',\r\n\t\t\t\t\t'" . $_COOKIE['id'] . "',\r\n\t\t\t\t\t'" . date('Y-d-m H:i:s', time()) . "'\r\n\t\t\t\t)";
         mssql_query($insertQuery);
     } else {
         echo "username is taken";
     }
 }
开发者ID:Tacit007,项目名称:Tacit007-php-framework,代码行数:9,代码来源:user.php

示例5: get_history

function get_history($page)
{
    global $sql;
    $r = "<script>\n\tfunction urldecode( str ) {\n\t    var ret = str;\n\t    ret = ret.replace(/\\+/g, '%20');\n\t    ret = decodeURIComponent(ret);\n\t    ret = ret.toString();\n\t    return ret;\n\t}\n\t</script><ul>";
    $sql->db_Select("wiki", "*", "ORDER BY page_datestamp DESC", false);
    $gen = new convert();
    while ($row = $sql->db_Fetch()) {
        $r .= "<li><a href='#' onclick=\"document.getElementById('wiki_content').value=urldecode('" . urlencode(stripslashes($row['page_content'])) . "');\" >" . $gen->convert_date($row['page_datestamp']) . " by " . get_username($row['page_author']) . "</a></li>";
    }
    return $r . "</ul>";
}
开发者ID:alcides,项目名称:e107wiki,代码行数:11,代码来源:utils.php

示例6: member

 public function member()
 {
     $EmailAddress = "";
     $Member = "";
     // Make sure the access is POST, not GET
     if (!$this->request->isPOST()) {
         return $this->httpError(403, 'Access Denied.');
     }
     if (!defined('APPSEC')) {
         return $this->httpError(403, 'Access Denied.');
     }
     // Make sure the APPSEC shared secret matches
     if ($this->request->postVar('APPSEC') != APPSEC) {
         return $this->httpError(403, 'Access Denied.');
     }
     // Pull email address from POST variables
     $EmailAddress = $this->request->postVar('email');
     // Sanitize the input
     $EmailAddress = convert::raw2sql($EmailAddress);
     // If an email address was provided, try to find a member with it
     if ($EmailAddress) {
         $Member = Member::get()->filter('Email', $EmailAddress)->first();
     }
     $response = new SS_HTTPResponse();
     // If a member was found return status 200 and 'OK'
     if ($Member && $Member->isFoundationMember()) {
         $response->setStatusCode(200);
         $response->setBody('OK');
         $response->output();
     } elseif ($EmailAddress) {
         $response->setStatusCode(404);
         $response->setBody('No Member Found.');
         $response->output();
     } else {
         $response->setStatusCode(500);
         $response->setBody('An error has occurred retrieving a member.');
         $response->output();
     }
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:39,代码来源:MemberVerifyPage.php

示例7: __construct

 /**
  * @param Controller $controller
  * @param String $name
  * @param Order $order
  * @param String
  */
 function __construct(Controller $controller, $name, Order $order, $returnToLink = '')
 {
     $fields = new FieldList(new HiddenField('OrderID', '', $order->ID));
     if ($returnToLink) {
         $fields->push(new HiddenField("returntolink", "", convert::raw2att($returnToLink)));
     }
     $bottomFields = new CompositeField();
     $bottomFields->addExtraClass('bottomOrder');
     if ($order->Total() > 0) {
         $paymentFields = EcommercePayment::combined_form_fields($order->getTotalAsMoney()->NiceLongSymbol(false), $order);
         foreach ($paymentFields as $paymentField) {
             $bottomFields->push($paymentField);
         }
         if ($paymentRequiredFields = EcommercePayment::combined_form_requirements($order)) {
             $requiredFields = array_merge($requiredFields, $paymentRequiredFields);
         }
     } else {
         $bottomFields->push(new HiddenField("PaymentMethod", "", ""));
     }
     $fields->push($bottomFields);
     $actions = new FieldList(new FormAction('dopayment', _t('OrderForm.PAYORDER', 'Pay balance')));
     $requiredFields = array();
     $validator = OrderForm_Payment_Validator::create($requiredFields);
     $form = parent::__construct($controller, $name, $fields, $actions, $validator);
     //extension point
     $this->extend('updateFields', $fields);
     $this->setFields($fields);
     $this->extend('updateActions', $actions);
     $this->setActions($actions);
     $this->extend('updateValidator', $validator);
     $this->setValidator($validator);
     $this->setFormAction($controller->Link($name));
     $oldData = Session::get("FormInfo.{$this->FormName()}.data");
     if ($oldData && (is_array($oldData) || is_object($oldData))) {
         $this->loadDataFrom($oldData);
     }
     $this->extend('updateOrderForm_Payment', $this);
 }
开发者ID:helpfulrobot,项目名称:sunnysideup-ecommerce,代码行数:44,代码来源:OrderForm_Payment.php

示例8: znajdz

 static function znajdz($KOD, $ISBN, $dir = 'covers')
 {
     if (strlen($KOD) <= 8 && ctype_digit($KOD)) {
         validate::KOD($KOD);
         if (file_exists('./' . $dir . '/own/' . $KOD)) {
             return './' . $dir . '/own/' . $KOD;
         }
     }
     if (strlen($ISBN) == 13) {
         validate::EAN($ISBN);
         if (substr($ISBN, 0, 3) == '978') {
             $ISBN10 = convert::ISBN13_to_ISBN10($ISBN);
         } else {
             $ISBN10 = $ISBN;
         }
         if (file_exists('./' . $dir . '/own/' . $ISBN)) {
             return './' . $dir . '/own/' . $ISBN;
         }
         if (self::librarything($ISBN, $dir) !== FALSE) {
             return './' . $dir . '/' . $ISBN;
         }
     }
     return FALSE;
 }
开发者ID:Alambos,项目名称:books,代码行数:24,代码来源:okladki.php

示例9: simpleXmlToArray

 public static function simpleXmlToArray($xml, &$recursion_depth = 0)
 {
     if ($recursion_depth > 25) {
         // Fatal error. Exit now.
         return null;
     }
     if ($recursion_depth == 0) {
         if (get_class($xml) != 'SimpleXMLElement') {
             // If the external caller doesn't call this function initially
             // with a SimpleXMLElement object, return now.
             return null;
         } else {
             // Store the original SimpleXmlElementObject sent by the caller.
             // We will need it at the very end when we return from here for good.
             $provided_xml = $xml;
         }
     }
     if (get_class($xml) == 'SimpleXMLElement') {
         // Get a copy of the simpleXmlElementObject
         $copy_xml = $xml;
         // Get the object variables in the SimpleXmlElement object for us to iterate.
         $xml = get_object_vars($xml);
     }
     // It needs to be an array of object variables.
     if (is_array($xml)) {
         // Initialize the result array.
         $result_array = array();
         // Is the input array size 0? Then, we reached the rare CDATA text if any.
         if (count($xml) <= 0) {
             // Let us return the lonely CDATA. It could even be
             // an empty element or just filled with whitespaces.
             return trim(strval($copy_xml));
         }
         // Let us walk through the child elements now.
         foreach ($xml as $key => $value) {
             // When this block of code is commented, XML attributes will be
             // added to the result array.
             // Uncomment the following block of code if XML attributes are
             // NOT required to be returned as part of the result array.
             /*
             if((is_string($key)) && ($key == SIMPLE_XML_ELEMENT_OBJECT_PROPERTY_FOR_ATTRIBUTES)) {
               continue;
             }
             */
             // Let us recursively process the current element we just visited.
             // Increase the recursion depth by one.
             $recursion_depth++;
             $result_array[$key] = convert::simpleXmlToArray($value, $recursion_depth);
             // Decrease the recursion depth by one.
             $recursion_depth--;
         }
         if ($recursion_depth == 0) {
             // That is it. We are heading to the exit now.
             // Set the XML root element name as the root [top-level] key of
             // the associative array that we are going to return to the caller of this
             // recursive function.
             $temp_array = $result_array;
             $result_array = array();
             $result_array[$provided_xml->getName()] = $temp_array;
         }
         return $result_array;
     } else {
         // We are now looking at either the XML attribute text or
         // the text between the XML tags.
         return trim(strval($xml));
     }
     // End of else
 }
开发者ID:uxturtle,项目名称:core-module,代码行数:68,代码来源:convert.php

示例10: __construct

 function __construct($controller, $name, $order, $returnToLink = '')
 {
     $fields = new FieldSet(new HiddenField('OrderID', '', $order->ID));
     if ($returnToLink) {
         $fields->push(new HiddenField("returntolink", "", convert::raw2att($returnToLink)));
     }
     $totalAsCurrencyObject = $order->TotalAsCurrencyObject();
     $totalOutstandingAsMoneyObject = $order->TotalOutstandingAsMoneyObject();
     $paymentFields = Payment::combined_form_fields($totalOutstandingAsMoneyObject->Nice());
     foreach ($paymentFields as $paymentField) {
         if ($paymentField->class == "HeaderField") {
             $paymentField->setTitle(_t("OrderForm.MAKEPAYMENT", "Make Payment"));
         }
         $fields->push($paymentField);
     }
     $requiredFields = array();
     if ($paymentRequiredFields = Payment::combined_form_requirements()) {
         $requiredFields = array_merge($requiredFields, $paymentRequiredFields);
     }
     $actions = new FieldSet(new FormAction('dopayment', _t('OrderForm.PAYORDER', 'Pay balance')));
     $form = parent::__construct($controller, $name, $fields, $actions, $requiredFields);
     if ($this->extend('updateFields', $fields) !== null) {
         $this->setFields($fields);
     }
     if ($this->extend('updateActions', $actions) !== null) {
         $this->setActions($actions);
     }
     if ($this->extend('updateValidator', $validator) !== null) {
         $this->setValidator($validator);
     }
     $this->setFormAction($controller->Link($name));
     $this->extend('updateOrderFormPayment', $this);
 }
开发者ID:nieku,项目名称:silverstripe-ecommerce,代码行数:33,代码来源:OrderForm.php

示例11: UPDATE

 public function UPDATE($id, $name, $login, $password, $owner)
 {
     $updateQuery = "UPDATE \r\n\t\t\t\t[dbo].[registrator]\r\n\t\t\tSET \r\n\t\t\t\tname = '" . convert::fromUTF($name) . "',\r\n\t\t\t\tupdate_userID \t= '" . $_COOKIE['id'] . "',\r\n\t\t\t\tupdate_datetime = '" . date('m-d-Y H:i:s', time()) . "',\r\n\t\t\t\tlogin = '{$login}',\r\n\t\t\t\tpassword = '{$password}',\r\n\t\t\t\towner = '{$owner}'\r\n\t\t\tWHERE \r\n\t\t\t\tid={$id}\r\n\t\t\t;";
     mssql_query($updateQuery);
 }
开发者ID:Tacit007,项目名称:Tacit007-php-framework,代码行数:5,代码来源:registrator.php

示例12: getListData

 function getListData()
 {
     $list_caption = $this->parent->settings['caption'];
     $list_display = $this->parent->settings['open'] ? "" : "none";
     $bullet = $this->parent->getBullet($this->parent->settings['icon']);
     if ($this->parent->mode == 'new_page' || $this->parent->mode == 'new_menu') {
         // New posts since last visit, up to limit
         $lvisit = $this->parent->getlvisit();
         $qry = "\n\t\t\tSELECT tp.thread_name AS parent_name, tp.thread_id as parent_id, \n\t\t\tf.forum_id, f.forum_name, f.forum_class, \n\t\t\tu.user_name, lp.user_name AS lp_name, \n\t\t\tt.thread_id, t.thread_views as tviews, t.thread_name, t.thread_datestamp, t.thread_user,\n\t\t\ttp.post_thread, tp.post_user, t.thread_lastpost, t.thread_lastuser, t.thread_total_replies\n\t\t\tFROM #forum_thread AS t\n\t\t\tLEFT JOIN #forum_post AS tp ON t.thread_id = tp.post_thread\n\t\t\tLEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id\n\t\t\tLEFT JOIN #user AS u ON tp.post_user = u.user_id\n\t\t\tLEFT JOIN #user AS lp ON t.thread_lastuser = lp.user_id\n\t\t\tWHERE find_in_set(forum_class, '" . USERCLASS_LIST . "')\n\t\t\tAND t.thread_lastpost > {$lvisit}\n\t\t\tORDER BY tp.post_datestamp DESC LIMIT 0," . intval($this->parent->settings['amount']);
     } else {
         // Most recently updated threads up to limit
         $qry = "\n\t\t\tSELECT t.thread_id, t.thread_name AS parent_name, t.thread_datestamp, t.thread_user, t.thread_views, t.thread_lastpost, \n\t\t\tt.thread_lastuser, t.thread_total_replies, f.forum_id, f.forum_name, f.forum_class, u.user_name, lp.user_name AS lp_name\n\t\t\tFROM #forum_thread AS t\n\t\t\tLEFT JOIN #forum AS f ON f.forum_id = t.thread_forum_id\n\t\t\tLEFT JOIN #user AS u ON t.thread_user = u.user_id\n\t\t\tLEFT JOIN #user AS lp ON t.thread_lastuser = lp.user_id\n\t\t\tWHERE find_in_set(f.forum_class, '" . USERCLASS_LIST . "')\n\t\t\tORDER BY t.thread_lastpost DESC LIMIT 0," . intval($this->parent->settings['amount']);
     }
     if (!($results = $this->parent->e107->sql->gen($qry))) {
         $list_data = LIST_FORUM_2;
     } else {
         $forumArray = $this->parent->e107->sql->db_getList();
         $path = e_PLUGIN . "forum/";
         foreach ($forumArray as $forumInfo) {
             extract($forumInfo);
             $record = array();
             //last user
             $r_id = substr($thread_lastuser, 0, strpos($thread_lastuser, "."));
             $r_name = substr($thread_lastuser, strpos($thread_lastuser, ".") + 1);
             if (strstr($thread_lastuser, chr(1))) {
                 $tmp = explode(chr(1), $thread_lastuser);
                 $r_name = $tmp[0];
             }
             $thread_lastuser = $r_id;
             //user
             $u_id = substr($thread_user, 0, strpos($thread_user, "."));
             $u_name = substr($thread_user, strpos($thread_user, ".") + 1);
             $thread_user = $u_id;
             if (isset($thread_anon)) {
                 $tmp = explode(chr(1), $thread_anon);
                 $thread_user = $tmp[0];
                 $thread_user_ip = $tmp[1];
             }
             $gen = new convert();
             $r_datestamp = $gen->convert_date($thread_lastpost, "short");
             if ($thread_total_replies) {
                 $LASTPOST = "";
                 if ($lp_name) {
                     $LASTPOST = "<a href='" . e_HTTP . "user.php ?id.{$thread_lastuser}'>{$lp_name}</a>";
                 } else {
                     if ($thread_lastuser[0] == "0") {
                         $LASTPOST = substr($thread_lastuser, 2);
                     } else {
                         //$LASTPOST = NFPM_L16;
                     }
                 }
                 $LASTPOST .= " " . LIST_FORUM_6 . " <span class='smalltext'>{$r_datestamp}</span>";
             } else {
                 $LASTPOST = " - ";
                 $LASTPOSTDATE = '';
             }
             if ($parent_name == '') {
                 $parent_name = $thread_name;
             }
             $rowheading = $this->parent->parse_heading($parent_name);
             $lnk = $parent_id ? $thread_id . ".post" : $thread_id;
             $record['heading'] = "<a href='" . $path . "forum_viewtopic.php?{$lnk}'>" . $rowheading . "</a>";
             $record['author'] = $this->parent->settings['author'] ? $thread_anon ? $thread_user : "<a href='" . e_HTTP . "user.php ?id.{$thread_user}'>{$user_name}</a>" : "";
             $record['category'] = $this->parent->settings['category'] ? "<a href='" . $path . "forum_viewforum.php?{$forum_id}'>{$forum_name}</a>" : "";
             $record['date'] = $this->parent->settings['date'] ? $this->parent->getListDate($thread_datestamp) : "";
             $record['icon'] = $bullet;
             $VIEWS = $thread_views;
             $REPLIES = $thread_total_replies;
             if ($thread_total_replies) {
                 $record['info'] = "[ " . LIST_FORUM_3 . " " . $VIEWS . ", " . LIST_FORUM_4 . " " . $REPLIES . ", " . LIST_FORUM_5 . " " . $LASTPOST . " ]";
             } else {
                 $record['info'] = "[ " . LIST_FORUM_3 . " " . intval($tviews) . " ]";
             }
             $list_data[] = $record;
         }
     }
     //return array with 'records', (global)'caption', 'display'
     return array('records' => $list_data, 'caption' => $list_caption, 'display' => $list_display);
 }
开发者ID:armpit,项目名称:e107,代码行数:79,代码来源:e_list.php

示例13: switch

    switch ($_GET['f']) {
        case 'mfar':
            $forum->forumMarkAsRead($id);
            header('location:' . e_SELF);
            exit;
            break;
        case 'rules':
            include_once HEADERF;
            forum_rules('show');
            include_once FOOTERF;
            exit;
            break;
    }
}
$fVars = new e_vars();
$gen = new convert();
$fVars->FORUMTITLE = LAN_PLUGIN_FORUM_NAME;
$fVars->THREADTITLE = LAN_FORUM_0002;
$fVars->REPLYTITLE = LAN_FORUM_0003;
$fVars->LASTPOSTITLE = LAN_FORUM_0004;
$fVars->INFOTITLE = LAN_FORUM_0009;
$fVars->LOGO = IMAGE_e;
$fVars->NEWTHREADTITLE = LAN_FORUM_0075;
$fVars->POSTEDTITLE = LAN_FORUM_0074;
$fVars->NEWIMAGE = IMAGE_new_small;
$fVars->TRACKTITLE = LAN_FORUM_0073;
$rules_text = forum_rules('check');
$fVars->USERINFO = "<a href='" . e_BASE . "top.php?0.top.forum.10'>" . LAN_FORUM_0010 . "</a> | <a href='" . e_BASE . "top.php?0.active'>" . LAN_FORUM_0011 . "</a>";
if (USER) {
    $fVars->USERINFO .= " | <a href='" . e_BASE . 'userposts.php?0.forums.' . USERID . "'>" . LAN_FORUM_0012 . "</a> | <a href='" . e_BASE . "usersettings.php'>" . LAN_FORUM_0013 . "</a> | <a href='" . e_HTTP . "user.php ?id." . USERID . "'>" . LAN_FORUM_0014 . "</a>";
    if ($forum->prefs->get('attach') && (check_class($pref['upload_class']) || getperms('0'))) {
开发者ID:rmuzzini,项目名称:e107,代码行数:31,代码来源:forum.php

示例14: define

    $texta .= "</div>\n</form>\n";
}
if ($emessage != "") {
    $texta .= "<div style='text-align:center'><b>" . $emessage . "</b></div>";
}
if (!($text = $e107cache->retrieve("nq_chatbox"))) {
    global $pref, $tp;
    $pref['chatbox_posts'] = $pref['chatbox_posts'] ? $pref['chatbox_posts'] : 10;
    $chatbox_posts = $pref['chatbox_posts'];
    if (!isset($pref['cb_mod'])) {
        $pref['cb_mod'] = e_UC_ADMIN;
    }
    define("CB_MOD", check_class($pref['cb_mod']));
    $qry = "\n\tSELECT c.*, u.user_name FROM #chatbox AS c\n\tLEFT JOIN #user AS u ON SUBSTRING_INDEX(c.cb_nick,'.',1) = u.user_id\n\tORDER BY c.cb_datestamp DESC LIMIT 0, " . intval($chatbox_posts);
    if ($sql->db_Select_gen($qry)) {
        $obj2 = new convert();
        $cbpost = $sql->db_getList();
        $text .= "<div id='chatbox-posts-block'>\n";
        foreach ($cbpost as $cb) {
            // get available vars
            list($cb_uid, $cb_nick) = explode(".", $cb['cb_nick'], 2);
            if ($cb['user_name']) {
                $cb_nick = "<a href='" . e_HTTP . "user.php?id.{$cb_uid}'>{$cb['user_name']}</a>";
            } else {
                $cb_nick = $tp->toHTML($cb_nick, FALSE, 'USER_TITLE, emotes_off, no_make_clickable');
                $cb_nick = str_replace("Anonymous", LAN_ANONYMOUS, $cb_nick);
            }
            $datestamp = $obj2->convert_date($cb['cb_datestamp'], "short");
            $emotes_active = $pref['cb_emote'] ? 'USER_BODY, emotes_on' : 'USER_BODY, emotes_off';
            $cb_message = $tp->toHTML($cb['cb_message'], FALSE, $emotes_active, $cb_uid, $pref['menu_wordwrap']);
            $replace[0] = "[";
开发者ID:notzen,项目名称:e107,代码行数:31,代码来源:chatbox_menu.php

示例15: markForeignAccount

 public function markForeignAccount()
 {
     try {
         $foreign_id = intval(convert::raw2sql($this->request->param('FOREIGN_MEMBER_ID')));
         $current_member = Member::currentUser();
         $this->manager->markAsNotMyAccount($current_member->ID, $foreign_id);
         return $this->ok();
     } catch (NotFoundEntityException $ex1) {
         SS_Log::log($ex1, SS_Log::WARN);
         return $this->notFound($ex1->getMessage());
     } catch (EntityValidationException $ex2) {
         SS_Log::log($ex2, SS_Log::WARN);
         return $this->validationError($ex2->getMessages());
     } catch (Exception $ex) {
         SS_Log::log($ex, SS_Log::ERR);
         return $this->serverError();
     }
 }
开发者ID:OpenStackweb,项目名称:openstack-org,代码行数:18,代码来源:DupesMembersApi.php


注:本文中的convert类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。