本文整理汇总了PHP中language_translate函数的典型用法代码示例。如果您正苦于以下问题:PHP language_translate函数的具体用法?PHP language_translate怎么用?PHP language_translate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了language_translate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeFromWishList
function removeFromWishList()
{
$id_user = $this->input->get('id_user', 0);
$wishlistdata = $this->seekWishListRecord($owner_id = getAccountUserId(), $id_user);
if ($wishlistdata) {
$this->db->where('id_owner', getAccountUserId())->where('id_user', $id_user)->delete(TBL_WISHLIST);
}
echo "<a href=\"javascript:void(0);\" onclick=\"callFuncAddToWishListThisPet({$id_user});\">\r\n\t\t\t\t" . language_translate('wishlist_addto') . "\r\n\t\t\t</a>";
exit;
}
示例2: search
function search()
{
if (isLogin()) {
$search_title = language_translate('sys_search_title');
$action = site_url("user/search");
$keyword = $this->input->get('keyword');
$value = strlen($keyword) ? $keyword : $search_title;
$html = "<div class=\"box-search\">\r\n\t\t\t\t\t<form method='get' action='{$action}'>\r\n\t\t\t\t\t\t<input type=\"text\" value=\"{$value}\" name=\"keyword\" id=\"search_keyword\" class=\"text\">\r\n\t\t\t\t\t\t<input type=\"submit\" value=\"\" class=\"submit\">\r\n\t\t\t\t\t</form>\r\n\t\t\t\t</div>";
$html .= "<script type='text/javascript'>\r\n\t\t\t\t\t\t\$(document).ready(function(){\r\n\t\t\t\t\t\t\t\$('#search_keyword').focusin(function(){\r\n\t\t\t\t\t\t\t\tvar name = '{$search_title}';\r\n\t\t\t\t\t\t\t\tif(\$(this).attr('value') == name){\r\n\t\t\t\t\t\t\t\t\t\$(this).attr('value','');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t</script>";
return $html;
} else {
return '';
}
}
示例3: addUserToMyFvList
function addUserToMyFvList()
{
$to_id_user = $this->input->post('id_user');
$from_id_user = getAccountUserId();
$rs = $this->db->where('from_id_user', $from_id_user)->where('to_id_user', $to_id_user)->get(TBL_CHAT_FAVOURITE)->result();
if (!$rs) {
$data['to_id_user'] = $to_id_user;
$data['from_id_user'] = $from_id_user;
$data['datetime'] = mysqlDate();
$this->mod_io_m->insert_map($data, TBL_CHAT_FAVOURITE);
}
$userdata = getAccountUserDataObject();
$touserdata = $this->user_io_m->init('id_user', $to_id_user);
$CMCHATMSG = str_replace(array('$u1', '$u2'), array($userdata->username, $touserdata->username), language_translate('hook_chat_add_chat_favourite'));
echo json_encode(array('result' => 'ok', 'message' => 'Add to favorite successfully.', 'CMCHATMSG' => $CMCHATMSG));
exit;
}
示例4: submitBuyPeepedAccess
function submitBuyPeepedAccess()
{
$userdataobj = getAccountUserDataObject(true);
$id_user = $this->input->post('id_user', 0);
$sellerdataobj = $this->user_io_m->init('id_user', $id_user);
$days = $this->input->post('days', 0);
$amountfee = $days * $sellerdataobj->peep_access;
$cash = $userdataobj->cash;
if ($cash < $amountfee) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Your balance is not enough to access peeped.'));
exit;
}
if ($days < 1) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Unknown error.'));
exit;
}
$data['id_buyer'] = getAccountUserId();
$data['id_user'] = $id_user;
$data['amount'] = $amountfee;
$data['ip'] = $this->geo_lib->getIpAddress();
$data['access_days'] = $days;
$data['buy_date'] = mysqlDate();
$data['exp_date'] = sysDateTimeFormat(mysql_to_unix($data['buy_date']) + 86400 * $days, 'Y-m-d H:i:s');
$id_history = $this->mod_io_m->insert_map($data, TBL_PEEPBOUGHT_HISTORY);
$site_amt = $amountfee * ($GLOBALS['global']['PEEP_PRICE']['site'] / 100);
$user_amt = $amountfee * ($GLOBALS['global']['PEEP_PRICE']['user'] / 100);
$transaction_data = array();
$transaction_data['id_owner'] = getAccountUserId();
$transaction_data['id_user'] = $data['id_user'];
$transaction_data['amount'] = $data['amount'];
$transaction_data['trans_type'] = $GLOBALS['global']['TRANS_TYPE']['buy_peeped'];
$transaction_data['site_amt'] = $site_amt;
$transaction_data['user_amt'] = $user_amt;
$transaction_data['trans_date'] = mysqlDate();
$transaction_data['ip'] = $this->geo_lib->getIpAddress();
$transaction_id = $this->mod_io_m->insert_map($transaction_data, TBL_TRANSACTION);
if ($transaction_id) {
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $site_amt . "' WHERE id_admin=1");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash -'" . $data['amount'] . "' WHERE id_user='" . getAccountUserId() . "'");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $user_amt . "' WHERE id_user='" . $data['id_user'] . "'");
}
$CMCHATMSG = str_replace(array('$u1', '$u2', '$p3'), array($userdataobj->username, $sellerdataobj->username, $amountfee), language_translate('hook_chat_buy_peep_access'));
echo json_encode(array('result' => 'ok', 'message' => 'Buy peeped access successfully.', 'CMCHATMSG' => $CMCHATMSG));
$this->email_sender->juzonSendEmail_JUZ_WHO_BOUGHT_WHO_PEEPED_ME($transaction_data['id_owner'], $transaction_data['id_user'], $transaction_data['amount']);
exit;
}
示例5: juzTimeDisplay
if ($item->asked_by) {
echo $this->user_m->getProfileDisplayName($item->asked_by);
} else {
echo "Anonymous";
}
?>
</td>
<td><?php
echo juzTimeDisplay($item->ques_date);
?>
</td>
<td><a href="javascript:void(0);" onclick="callFuncAnswerQuestion(<?php
echo $item->id_askmeq;
?>
)"><?php
echo language_translate('question_button_answer');
?>
</a></td>
<td><a href="javascript:void(0);" onclick="callFuncDeleteQuestion(<?php
echo $item->id_askmeq;
?>
)"><?php
echo language_translate('question_button_delete');
?>
</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
示例6: language_translate
">
<img src="<?php
echo $this->user_m->getProfileAvatar($item->id_user);
?>
" />
</a>
</div>
<div class="user-profile-username">
<?php
echo $this->user_m->getProfileDisplayName($item->id_user);
?>
</div>
<div class="user-profile-cash">
<strong><?php
echo language_translate('left_menu_label_cash');
?>
</strong> <?php
echo $this->user_m->getCash($item->id_user);
?>
</div>
</div>
<?php
if ($i % 2 == 0) {
?>
<div class="clear"></div>
<?php
}
?>
示例7: langTranslatePost
function langTranslatePost($keys)
{
//set incoming POST values for languages
if (!getOption('languages')) {
return false;
}
global $_POST;
//make sure do translations checkbox is checked
if (!isset($_POST['translations_do'])) {
return false;
}
//list of fields to translate
$keys = array_separated($keys);
//get list of languages to translate to
$languages = db_array('SELECT code FROM languages WHERE id <> ' . $_SESSION['language_id']);
foreach ($keys as $key) {
foreach ($languages as $language) {
$_POST[$key . langExt($language)] = language_translate($_POST[$key . langExt()], $_SESSION['language'], $language);
}
}
}
示例8: language_translate
echo language_translate('left_menu_label_to');
?>
</b> </label>
<?php
echo form_dropdown('gender', genderOptionData_ioc(), array($oppsex), 'id="gender"');
?>
<?php
echo form_dropdown('type', sendRandomMessageOptionData_ioc(), array(), 'id="type"');
?>
<div class="clear sep"></div>
<input type="submit" value="<?php
echo language_translate('left_menu_label_send');
?>
" name="submit" onclick="callFuncSendRandomMessage();" />
<?php
echo loader_image_s("id=\"sendRandomMessageContextLoader\" class='hidden'");
?>
<div class="clear"></div>
</div>
</div>
示例9: defined
<?php
defined('BASEPATH') or exit('No direct script access allowed');
?>
<div id="page-login">
<div class="input">
<?php
echo language_translate('member_active_password_notify');
?>
</div>
<div class="clear"></div>
</div>
示例10: language_translate
echo $this->user_m->calculatePetPrice($item->id_user);
?>
J$
</a>
</div>
<div class="user-profile-button" id="wishlistInfoDivID_<?php
echo $item->id_user;
?>
">
<a href="javascript:void(0);" onclick="callFuncAddToWishListThisPet(<?php
echo $item->id_user;
?>
);">
<?php
echo language_translate('wishlist_addto');
?>
</a>
</div>
<div class="user-profile-button">
<a href="javascript:void(0);" onclick="jqcc.cometchat.chatWith('<?php
echo $item->id_user;
?>
');">
Chat
</a>
</div>
<div class="clear"></div>
</div>
示例11: render_options_form
function render_options_form()
{
log_debug("table", "Executing render_options_form()");
// if the user has not configured any default options, display the dropdown
// link bar instead of the main options table.
if (!isset($_SESSION["form"][$this->tablename]["custom_options_active"])) {
if (isset($_SESSION["user"]["shrink_tableoptions"]) && $_SESSION["user"]["shrink_tableoptions"] == "on") {
print "<div id=\"" . $this->tablename . "_link\">";
print "<table class=\"table_options_dropdown\">";
print "<tr>";
print "<td onclick=\"obj_show('" . $this->tablename . "_form'); obj_hide('" . $this->tablename . "_link');\">";
print "ADJUST TABLE OPTIONS >>";
print "</td>";
print "</tr>";
print "</table><br>";
print "</div>";
}
}
// border table / div object
print "<div id=\"" . $this->tablename . "_form\">";
print "<table class=\"table_options\"><tr><td>";
// create tmp array to prevent excessive use of array_keys
$columns_available = array_keys($this->structure);
// get labels for all the columns
$labels = language_translate($this->language, $columns_available);
// start the form
print "<form method=\"get\" class=\"form_standard\">";
$form = new form_input();
$form->formname = $this->tablename;
$form->language = $this->language;
// include page name
$structure = NULL;
$structure["fieldname"] = "page";
$structure["type"] = "hidden";
$structure["defaultvalue"] = $_GET["page"];
$form->add_input($structure);
$form->render_field("page");
// include any other fixed options
foreach (array_keys($this->option) as $fieldname) {
$structure = NULL;
$structure["fieldname"] = $fieldname;
$structure["type"] = "hidden";
$structure["defaultvalue"] = $this->option[$fieldname];
$form->add_input($structure);
$form->render_field($fieldname);
}
// flag this form as the table_display_options form
$structure = NULL;
$structure["fieldname"] = "table_display_options";
$structure["type"] = "hidden";
$structure["defaultvalue"] = $this->tablename;
$form->add_input($structure);
$form->render_field("table_display_options");
/*
Check box options
*/
// configure all the checkboxes
$num_cols = count($columns_available);
$num_cols_half = sprintf("%d", $num_cols / 2);
for ($i = 0; $i < $num_cols; $i++) {
$column = $columns_available[$i];
// define the checkbox
$structure = NULL;
$structure["fieldname"] = $column;
$structure["type"] = "checkbox";
if (isset($this->structure[$column]["custom"]["label"])) {
$structure["options"]["label"] = lang_trans($this->structure[$column]["custom"]["label"]);
}
if (in_array($column, $this->columns)) {
$structure["defaultvalue"] = "on";
}
$form->add_input($structure);
// split the column options boxes into two different columns
if ($i < $num_cols_half) {
$column_a1[] = $column;
} else {
$column_a2[] = $column;
}
}
// structure table
print "<table width=\"100%\"><tr>";
print "<td width=\"50%\" valign=\"top\" style=\"padding: 4px;\">";
print "<b>Fields to display:</b><br><br>";
print "<table width=\"100%\">";
print "<td width=\"50%\" valign=\"top\">";
// display the checkbox(s)
foreach ($column_a1 as $column) {
$form->render_field($column);
print "<br>";
}
print "</td>";
print "<td width=\"50%\" valign=\"top\">";
// display the checkbox(s)
foreach ($column_a2 as $column) {
$form->render_field($column);
print "<br>";
}
print "</td>";
print "</table>";
print "</td>";
//.........这里部分代码省略.........
示例12: language_translate
if ($tmp = $this->rate_m->getRateScore($item->id_image)) {
echo $tmp;
}
?>
</div>
<?php
if (!$this->collection_m->isMyCollectionPhoto($item->id_image)) {
?>
<div class="user-profile-button">
<a href="javascript:void(0);" onclick="callFuncBuyThisBackstagePhoto(<?php
echo $item->id_image;
?>
)">
<?php
echo language_translate('show_backstage_buyfor');
?>
<?php
echo currencyDisplay($item->price) . JC;
?>
</a>
</div>
<?php
}
?>
<div class="clear"></div>
</div>
<?php
示例13: submitExtendAccessMapFlirts
function submitExtendAccessMapFlirts()
{
$userdataobj = getAccountUserDataObject(true);
$id_user = $this->input->post('id_user', 0);
$sellerdataobj = $this->user_io_m->init('id_user', $id_user);
$days = $this->input->post('days', 0);
$amountfee = $days * $sellerdataobj->map_access;
$cash = $userdataobj->cash;
if ($cash < $amountfee) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Your balance is not enough to access map flirts.'));
exit;
}
if ($days < 1) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Unknown error.'));
exit;
}
if ($this->mapflirt_m->checkUserBlockedOther($id_user, getAccountUserId())) {
echo json_encode(array('result' => 'ERROR', 'message' => 'Error. This user was blocked you from access map location.'));
exit;
}
$historydata = $this->mapflirt_m->getHistory($id_user);
if ($historydata) {
$data['id_buyer'] = getAccountUserId();
$data['id_seller'] = $id_user;
$data['amount'] = $amountfee;
$data['ip'] = $this->geo_lib->getIpAddress();
if (mysql_to_unix($historydata->exp_date) > mysql_to_unix(mysqlDate())) {
// extend
$data['buy_date'] = $historydata->buy_date;
$data['exp_date'] = sysDateTimeFormat(mysql_to_unix($historydata->exp_date) + 86400 * $days, 'Y-m-d H:i:s');
$data['map_days'] = $days + (int) (mysql_to_unix($historydata->exp_date) / 86400);
} else {
//re-buy
$data['buy_date'] = mysqlDate();
$data['exp_date'] = sysDateTimeFormat(mysql_to_unix($data['buy_date']) + 86400 * $days, 'Y-m-d H:i:s');
$data['map_days'] = $days;
}
$id_history = $this->mod_io_m->update_map($data, array('id_map_history' => $historydata->id_map_history), TBL_MAP_HISTORY);
$site_amt = $amountfee * ($GLOBALS['global']['MAP_PRICE']['site'] / 100);
$user_amt = $amountfee * ($GLOBALS['global']['MAP_PRICE']['user'] / 100);
$transaction_data = array();
$transaction_data['id_owner'] = getAccountUserId();
$transaction_data['id_user'] = $data['id_seller'];
$transaction_data['amount'] = $data['amount'];
$transaction_data['trans_type'] = $GLOBALS['global']['TRANS_TYPE']['map'];
$transaction_data['site_amt'] = $site_amt;
$transaction_data['user_amt'] = $user_amt;
$transaction_data['trans_date'] = mysqlDate();
$transaction_data['ip'] = $this->geo_lib->getIpAddress();
$transaction_id = $this->mod_io_m->insert_map($transaction_data, TBL_TRANSACTION);
if ($transaction_id) {
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $site_amt . "' WHERE id_admin=1");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash -'" . $data['amount'] . "' WHERE id_user='" . getAccountUserId() . "'");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $user_amt . "' WHERE id_user='" . $data['id_seller'] . "'");
}
debug("extend/buy map location transaction id={$transaction_id} ");
$this->email_sender->juzonSendEmail_JUZ_WHO_BOUGHT_MY_MAPFLIRTS($transaction_data['id_owner'], $transaction_data['id_user'], $transaction_data['amount']);
} else {
$i = 0;
if (!$this->mapflirt_m->wasIMapedUser($id_user)) {
$sellerdataobj = $this->user_io_m->init('id_user', $id_user);
$data[$i]['id_buyer'] = getAccountUserId();
$data[$i]['id_seller'] = $id_user;
$data[$i]['amount'] = $sellerdataobj->map_access;
$data[$i]['map_days'] = 1;
$data[$i]['buy_date'] = mysqlDate();
$data[$i]['exp_date'] = sysDateTimeFormat(mysql_to_unix($data[$i]['buy_date']) + 86400, 'Y-m-d H:i:s');
$data[$i]['ip'] = $this->geo_lib->getIpAddress();
foreach ($data as $key => $value) {
$id_history = $this->mod_io_m->insert_map($value, TBL_MAP_HISTORY);
$site_amt = $value['amount'] * ($GLOBALS['global']['MAP_PRICE']['site'] / 100);
$user_amt = $value['amount'] * ($GLOBALS['global']['MAP_PRICE']['user'] / 100);
$transaction_data = array();
$transaction_data['id_owner'] = getAccountUserId();
$transaction_data['id_user'] = $value['id_seller'];
$transaction_data['amount'] = $value['amount'];
$transaction_data['trans_type'] = $GLOBALS['global']['TRANS_TYPE']['map'];
$transaction_data['site_amt'] = $site_amt;
$transaction_data['user_amt'] = $user_amt;
$transaction_data['trans_date'] = mysqlDate();
$transaction_data['ip'] = $this->geo_lib->getIpAddress();
$transaction_id = $this->mod_io_m->insert_map($transaction_data, TBL_TRANSACTION);
if ($transaction_id) {
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $site_amt . "' WHERE id_admin=1");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash -'" . $value['amount'] . "' WHERE id_user='" . getAccountUserId() . "'");
$this->db->query("UPDATE " . TBL_USER . " SET cash= cash +'" . $user_amt . "' WHERE id_user='" . $value['id_seller'] . "'");
}
debug("extend/buy map location transaction id={$transaction_id} ");
$this->email_sender->juzonSendEmail_JUZ_WHO_BOUGHT_MY_MAPFLIRTS($transaction_data['id_owner'], $transaction_data['id_user'], $transaction_data['amount']);
}
}
}
$context = $this->input->post('context');
if ($context == 'CMCHAT') {
$CMCHAT = str_replace(array('$u1', '$u2', '$p3'), array($userdataobj->username, $sellerdataobj->username, $amountfee), language_translate('hook_chat_buy_map'));
} else {
$CMCHAT = '';
}
echo json_encode(array('result' => 'ok', 'message' => 'Buy successfully.', 'CMCHATMSG' => $CMCHAT));
exit;
//.........这里部分代码省略.........
示例14: language_translate
<?php
$this->load->view("user/leftsite/friends_list");
?>
<div class="clear"></div>
<div class="widget" style="position:relative;">
<div id="petlistBoxAsync">
<?php
$this->load->view("user/leftsite/pets_list");
?>
</div>
</div>
<div class="clear"></div>
<div class="widget">
<h4><?php
echo language_translate('left_menu_label_wishlist');
?>
</h4>
<div id="wishlistBoxAsync">
<?php
$this->load->view("user/leftsite/wishlist_async");
?>
</div>
</div>
</aside>
示例15: language_translate
<?php
if (!$this->friend_m->isMyFriend($userdataobj->id_user) and notMe($userdataobj->id_user)) {
?>
<div class="user-profile-button">
<a onclick="callFuncAddFriend(<?php
echo $userdataobj->id_user;
?>
)" href="javascript:void(0);" id="addFriendContext_<?php
echo $userdataobj->id_user;
?>
">
<?php
if ($this->friend_m->isPendingAddFriend($userdataobj->id_user)) {
?>
<?php
echo language_translate('request_add_friend_success');
?>
<?php
} else {
?>
Add Friend
<?php
}
?>
</a>
</div>
<div class="clear"></div>
<?php
}
?>