• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP convert类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: __construct

 public function __construct($id, $name)
 {
     $this->id = $id;
     $this->name = convert::toUTF($name);
 }
开发者ID:Tacit007,项目名称:Tacit007-php-framework,代码行数:5,代码来源:priority.php


示例17: header

 *
 *
 * $Source: /cvs_backup/e107_0.8/e107_plugins/poll/oldpolls.php,v $
 * $Revision$
 * $Date$
 * $Author$
 */
require_once "../../class2.php";
if (!e107::isInstalled('poll')) {
    header("Location: " . e_BASE . "index.php");
    exit;
}
require_once HEADERF;
require_once e_HANDLER . "comment_class.php";
$cobj = new comment();
$gen = new convert();
if (!defined("USER_WIDTH")) {
    define("USER_WIDTH", "width:95%");
}
include_lan(e_PLUGIN . "poll/languages/" . e_LANGUAGE . ".php");
if (e_QUERY) {
    $query = "SELECT p.*, u.user_id, u.user_name FROM #polls AS p\n\tLEFT JOIN #user AS u ON p.poll_admin_id = u.user_id\n\tWHERE p.poll_type=1 AND p.poll_id=" . intval(e_QUERY);
    if ($sql->db_Select_gen($query)) {
        $row = $sql->db_Fetch();
        extract($row);
        $optionArray = explode(chr(1), $poll_options);
        $optionArray = array_slice($optionArray, 0, -1);
        $voteArray = explode(chr(1), $poll_votes);
        $voteArray = array_slice($voteArray, 0, -1);
        $voteTotal = array_sum($voteArray);
        $percentage = array();
开发者ID:armpit,项目名称:e107,代码行数:31,代码来源:oldpolls.php


示例18: print_item_pdf

function print_item_pdf($id)
{
    global $tp, $pref, $content_shortcodes;
    global $CONTENT_PRINT_IMAGES, $row, $content_image_path, $content_pref, $mainparent;
    //in this section you decide what to needs to be output to the pdf file
    $con = new convert();
    require_once e_PLUGIN . "content/content_shortcodes.php";
    require_once e_PLUGIN . "content/handlers/content_class.php";
    $aa = new content();
    if (!is_object($sql)) {
        $sql = new db();
    }
    $sql->db_Select($plugintable, "content_id, content_heading, content_subheading, content_text, content_image, content_author, content_parent, content_datestamp, content_class, content_pref", "content_id='" . intval($id) . "' ");
    $row = $sql->db_Fetch();
    if (!check_class($row['content_class'])) {
        header("location:" . e_PLUGIN . "content/content.php");
        exit;
    }
    $authordetails = $aa->getAuthor($row['content_author']);
    $row['content_datestamp'] = $con->convert_date($row['content_datestamp'], "long");
    $img = $tp->parseTemplate('{CONTENT_PRINT_IMAGES}', FALSE, $content_shortcodes);
    $mainparent = $aa->getMainParent(intval($id));
    $content_pref = $aa->getContentPref($mainparent);
    $content_icon_path = $tp->replaceConstants($content_pref["content_icon_path"]);
    $content_image_path = $tp->replaceConstants($content_pref["content_image_path"]);
    $img = $tp->parseTemplate('{CONTENT_PDF_IMAGES}', FALSE, $content_shortcodes);
    //add custom and preset tags if present
    $custom = e107::unserialize($row['content_pref']);
    //$custom						= $eArrayStorage->ReadxxxArray($row['content_pref']);
    $months = array(CONTENT_ADMIN_DATE_LAN_0, CONTENT_ADMIN_DATE_LAN_1, CONTENT_ADMIN_DATE_LAN_2, CONTENT_ADMIN_DATE_LAN_3, CONTENT_ADMIN_DATE_LAN_4, CONTENT_ADMIN_DATE_LAN_5, CONTENT_ADMIN_DATE_LAN_6, CONTENT_ADMIN_DATE_LAN_7, CONTENT_ADMIN_DATE_LAN_8, CONTENT_ADMIN_DATE_LAN_9, CONTENT_ADMIN_DATE_LAN_10, CONTENT_ADMIN_DATE_LAN_11);
    $CONTENT_CONTENT_TABLE_CUSTOM_TAGS = "";
    if (!empty($custom)) {
        foreach ($custom as $k => $v) {
            if ($k == "content_custom_presettags") {
                if (isset($content_pref["content_content_presettags"]) && $content_pref["content_content_presettags"]) {
                    foreach ($v as $ck => $cv) {
                        if (is_array($cv)) {
                            //date
                            if (!($cv['day'] == "" && $cv['month'] == "" && $cv['year'] == "")) {
                                $vv = $cv['day'] . " " . $months[$cv['month'] - 1] . " " . $cv['year'];
                            }
                        } else {
                            $vv = $cv;
                        }
                        if (isset($ck) && $ck != "" && isset($vv) && $vv != "") {
                            $CUSTOM_TAGS = TRUE;
                            $CONTENT_CONTENT_TABLE_CUSTOM_KEY = $tp->toHTML($ck, true);
                            $CONTENT_CONTENT_TABLE_CUSTOM_VALUE = $tp->toHTML($vv, true);
                            $CONTENT_CONTENT_TABLE_CUSTOM_TAGS .= $CONTENT_CONTENT_TABLE_CUSTOM_KEY . " : " . $CONTENT_CONTENT_TABLE_CUSTOM_VALUE . "<br />";
                        }
                    }
                }
            } else {
                if (isset($content_pref["content_content_customtags"]) && $content_pref["content_content_customtags"]) {
                    $key = substr($k, 15);
                    if (isset($key) && $key != "" && isset($v) && $v != "") {
                        $CUSTOM_TAGS = TRUE;
                        $CONTENT_CONTENT_TABLE_CUSTOM_KEY = $tp->toHTML($key, true);
                        $CONTENT_CONTENT_TABLE_CUSTOM_VALUE = $tp->toHTML($v, true);
                        $CONTENT_CONTENT_TABLE_CUSTOM_TAGS .= $CONTENT_CONTENT_TABLE_CUSTOM_KEY . " : " . $CONTENT_CONTENT_TABLE_CUSTOM_VALUE . "<br />";
                    }
                }
            }
        }
    }
    $text = "\n\t<b>" . $row['content_heading'] . "</b><br />\n\t" . $row['content_subheading'] . "<br />\n\t" . $authordetails[1] . ", " . $row['content_datestamp'] . "<br />\n\t<br />\n\t" . $row['content_text'] . "<br />\n\t" . ($CONTENT_CONTENT_TABLE_CUSTOM_TAGS ? $CONTENT_CONTENT_TABLE_CUSTOM_TAGS : "") . "\n\t<div style='float:left; padding-left:10px;'>" . $img . "</div>\n\t";
    //the following defines are processed in the document properties of the pdf file
    //Do NOT add parser function to the variables, leave them as raw data !
    //as the pdf methods will handle this !
    $text = $text;
    //define text
    $creator = SITENAME;
    //define creator
    $author = $authordetails[1];
    //define author
    $title = $row['content_heading'];
    //define title
    $subject = $row['content_subheading'];
    //define subject
    $keywords = "";
    //define keywords
    //define url to use in the header of the pdf file
    $url = SITEURLBASE . e_PLUGIN_ABS . "content/content.php?content." . $row['content_id'];
    //always return an array with the following data:
    return array($text, $creator, $author, $title, $subject, $keywords, $url);
}
开发者ID:Jimmi08,项目名称:content,代码行数:86,代码来源:e_emailprint.php


示例19: while

         while ($row = $e107->sql->db_Fetch()) {
             $ga = new convert();
             $newsletter_datestamp = $ga->convert_date($row['newsletter_datestamp'], 'long');
             $text .= "<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . $row['newsletter_issue'] . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<a href='" . e_PLUGIN . "newsletter/nl_archive.php?show." . $action_parent_id . "." . $row['newsletter_id'] . "'>" . $tp->toHTML($row['newsletter_title'], true) . "</a>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t" . $newsletter_datestamp . "\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t  </tr>";
         }
         $text .= "</table>";
         if ($limit_start + $page_size < $nl_count) {
             $text .= "<form id='nl' method='post' action='" . e_PLUGIN . "newsletter/nl_archive.php?showp." . $action_parent_id . "'>\n\t\t\t\t<br /><input class='button' name='submit' type='submit' value='View older newsletters in archive'/>\n\t\t\t\t<input type='hidden' name='limit_start' value='" . $limit_start . "'/></form>";
         }
     } else {
         $e107->sql->db_Select('newsletter', '*', "newsletter_parent='" . $action_parent_id . "' AND newsletter_id='" . $action_nl_id . "' AND newsletter_flag='1'");
         if ($row = $e107->sql->db_Fetch()) {
             // Display parent header
             $text .= "{$parent_newsletter_title}<br />\n\t\t\t\t\t\t  <div style='text-align: left;'>{$parent_newsletter_text}</div><br /><br />\n\t\t\t\t\t\t  {$parent_newsletter_header}<br /><br />";
             // Display newsletter text
             $ga = new convert();
             $newsletter_datestamp = $ga->convert_date($row['newsletter_datestamp'], "long");
             $text .= $newsletter_datestamp . "<br />" . $tp->toHTML($row['newsletter_title'], true) . "<br />\n\t\t\t\t\t\t <div style='text-align: left;'>" . $tp->toHTML($row['newsletter_text'], true) . "</div><br /><br />";
             // Display parent footer
             $text .= "{$parent_newsletter_footer}<br />";
             // Display back to newsletter overview button
             $text .= "<br /><a href='javascript:history.go(-1);'><input class='button' type='submit' value='" . NLLAN_71 . "'</a>";
         } else {
             $text .= NLLAN_70;
             //Selected newsletter does not exist
         }
     }
 } else {
     $text .= NLLAN_69;
     // No send newsletters available for selected parent
 }
开发者ID:notzen,项目名称:e107,代码行数:31,代码来源:nl_archive.php


示例20: convert


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP cookie类代码示例发布时间:2022-05-23
下一篇:
PHP controller类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap