本文整理汇总了PHP中_go函数的典型用法代码示例。如果您正苦于以下问题:PHP _go函数的具体用法?PHP _go怎么用?PHP _go使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_go函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: novo
function novo($item = null)
{
if (isset($_POST['preview'])) {
//$conteudo = highlight_string($t, true);
//if(isset($_POST['salvar'])) $conteudo = strip_tags(str_replace('<?', '<?',$_POST['conteudo']), '<p><a><h2><h3><h4><h5><b><pre><code><blockquote><img><iframe>');
$cont = str_replace('<?', '<?', $_POST['conteudo']);
//$cont = $this->scaner($cont);
if (isset($_POST['preview'])) {
$conteudo = htmlentities($_POST['conteudo'], ENT_QUOTES, "UTF-8");
}
//_p($conteudo);
$conteudo = addslashes($conteudo);
//para salvar no banco de dados
} elseif (isset($_POST['cancelar'])) {
_go();
} else {
$cont = '';
$conteudo = '<pre><?php
namespace Lib\\Db;
class Admin
extends Base{
function __construct(){ //verificando se tem acesso ao ADMIN
$_SESSION["level"] = 2; //Desenvolvimento - DELETAR
if(!isset($_SESSION["level"]) || $_SESSION["level"] < 2 ) _go();
}
function novo($item = null){
$conteudo = "Nenhum conteúdo précarregado!";
if(isset($_POST["salvar"])) _p(htmlentities(str_replace("dt","code",$_POST["conteudo"])));
if(isset($_POST["salvar"])) $conteudo = str_replace("dt","code",$_POST["conteudo"]);
_view::val("data", date("d/m/Y"));
_view::val("conteudo", $conteudo);
_view::set("blog/admin/novo/artigo");
}</pre>';
}
_view::val('data', date('d/m/Y'));
_view::val('cont', '<pre>' . $cont . '</pre>');
_view::val('conteudo', stripslashes($conteudo));
_view::set('blog/admin/novo/artigo');
}
示例2: twitter_get_tweets
function twitter_get_tweets($twitteruser)
{
$cache = get_transient('revoke_twitter');
if (is_array($cache) && array_key_exists($twitteruser, $cache)) {
return $cache[$twitteruser];
}
$consumerkey = _go('twitter_consumerkey');
$consumersecret = _go('twitter_consumersecret');
$accesstoken = _go('twitter_accesstoken');
$accesstokensecret = _go('twitter_accesstokensecret');
if (empty($consumerkey) || empty($consumersecret) || empty($accesstoken) || empty($accesstokensecret)) {
return null;
}
$connection = getConnectionWithAccessToken($consumerkey, $consumersecret, $accesstoken, $accesstokensecret);
$tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=" . $twitteruser);
if (!is_array($cache)) {
$cache = array();
}
$cache[$twitteruser] = $tweets;
set_transient('revoke_twitter', $cache, 60);
return $tweets;
}
示例3: _eo
if (_go('error_title')) {
_eo('error_title');
} else {
_e('OOps! something went wrong', 'sevenfold');
}
?>
</h3>
<p><?php
if (_go('error_message')) {
_eo('error_message');
} else {
_e('The page you are trying to access seems to no longer exists.', 'sevenfold');
}
?>
</p>
<?php
get_search_form();
?>
</div>
</div>
<div class="col-md-5">
<div class="error-404-image"<?php
if (_go('error_image')) {
echo " style='background-image:url(\" " . _go('error_image') . "\");'";
}
?>
></div>
</div>
</div>
</div>
</div>
示例4: balanceTags
">
<div class="box-img"><span></span></div>
<div class="container intro-center">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="text-center">
<?php
echo balanceTags($tt_theme->lazy_img(_go('error_emblem')));
?>
<?php
if (_go('404_error')) {
?>
<div class="text-center">
<?php
echo _go('404_error');
?>
</div>
<?php
} else {
?>
<h3 class="font-alpha uppercase"><?php
_e('Sorry, the page not found!', 'megalith');
?>
</h3>
<h6><?php
_e('Go to', 'megalith');
?>
<a href="<?php
echo esc_url(home_url('/'));
?>
示例5: get_mailchimp_lists
public static function get_mailchimp_lists($custom_api_key = NULL)
{
$apikey = $custom_api_key ? $custom_api_key : _go('mailchimp_api_key');
if (preg_match('@-(.*)@is', $apikey, $dc_matches)) {
$dc = $dc_matches[1];
$url = "https://{$dc}.api.mailchimp.com/2.0/lists/list";
$post_data = array('apikey' => $apikey);
$result = curl_mailchimp($url, $post_data, true, true);
} else {
$result = __('Not a valid mailchimp api key.', 'TeslaFramework');
}
return $result;
}
示例6: get_search_form
?>
>
<div class="error-content">
<div class="error-head">
<?php
get_search_form();
?>
</div>
<h1><?php
_e('404', 'sevenfold');
?>
</h1>
<h3><?php
if (_go('error_title')) {
_eo('error_title');
} else {
_e('OOps! something went wrong', 'sevenfold');
}
?>
</h3>
<p><?php
if (_go('error_message')) {
_eo('error_message');
} else {
_e('The page you are trying to access seems to no longer exists.', 'sevenfold');
}
?>
</p>
</div>
</div>
</div>
示例7: home_url
<div class="header-logo">
<a href="<?php
echo home_url();
?>
" style="<?php
_estyle_changer('logo_text');
?>
" >
<?php
if (_go('logo_text')) {
?>
<?php
_eo('logo_text');
?>
<?php
} elseif (_go('logo_image')) {
?>
<img src="<?php
_eo('logo_image');
?>
" alt="<?php
echo THEME_PRETTY_NAME;
?>
logo">
<?php
} else {
?>
<?php
echo THEME_PRETTY_NAME;
?>
<?php
示例8: tt_ajax_contact_form
function tt_ajax_contact_form()
{
$receiver_mail = _go('email_contact') ? _go('email_contact') : get_bloginfo('admin_email');
if (!empty($_POST['name']) && !empty($_POST['email']) && !empty($_POST['message'])) {
$subject = !empty($_POST['website']) ? $_POST['name'] . ' from ' . $_POST['website'] : ' from ' . get_bloginfo('name') . ' Contact form';
$email = $_POST['email'];
$message = $_POST['message'];
$message = wordwrap($message, 70, "\r\n");
$header[] = 'From: ' . $_POST['name'] . '<' . $_POST['email'] . '>';
$header[] = 'Reply-To: ' . $email;
if (wp_mail($receiver_mail, $subject, $message, $header)) {
$result = __('Message successfully sent.', 'sevenfold');
} else {
$result = __('Message could not be sent.', 'sevenfold');
}
} else {
$result = __('Please fill all the fields', 'sevenfold');
}
die($result);
}
示例9: the_permalink
the_permalink();
?>
"><?php
the_title();
?>
</a><?php
if (is_sticky()) {
echo '<span class="blogEntryTitleFeatured">' . __('featured', 'revoke') . '</span>';
}
?>
</h2>
<div class="entry blogEntryExcerpt">
<?php
if (!is_archive()) {
if ('Content' === _go('blog_page_excerpt')) {
the_content();
} else {
the_excerpt();
}
}
?>
</div>
<div class="blogEntryFooter">
<div class="blogEntryFooterDate">
<?php
echo get_the_date('d M Y');
?>
</div>
<div class="blogEntryFooterDelimiter">
/
示例10: do_action
global $tt_theme;
?>
<footer class="main-footer">
<?php
do_action('tt_footer');
?>
<div class="footer-copyright">
<div class="container">
<div class="row">
<div class="col-md-9">
<p class="copyright align-center text-center text-white">
<?php
echo _go('footer_info') ? _go('footer_info') . ' | ' : '';
?>
<!-- <span> <?php
_e('Designed by', 'megalith');
?>
</span>
<a href="http://teslathemes.com"> Teslathemes</a>
-->
Last Updated: <?php
the_modified_time('F j, Y');
?>
|
<a href="https://www.facebook.com/UFSFA"><i class="icon-182"></i></a>
<a href="https://twitter.com/UFSFA"><i class="icon-510"></i></a>
</p>
</div>
示例11: main
function main()
{
$text = get('t');
$out = get('o');
if ($text === '') {
echo "Bad input";
return false;
}
if (get('k') == 'e') {
$memory = get('m');
$oText = $text;
$save = "false";
$bin = "false";
if ($m === '') {
$memory = 1024;
}
if (get('b') === '1') {
$text = base64_decode($text);
$bin = "true";
}
$encoded = _go($text, false, $memory);
if (get('v') === '1') {
$id = __store($encoded[1], $encoded[2], 0);
$save = "true";
} else {
$id = array(-1, _compact($encoded[2]));
}
$output = base64_encode($encoded[0]);
if ($out === 'JSON') {
echo '{"PRAF":{"input":{"kind":"encode","memory":' . $memory . ',"text":"' . $oText . '","save":' . $save . ',"binary":' . $bin . ',"output":"JSON"},"output":{"sorting":"' . $id[1] . '","filling":"' . $encoded[1] . '","id":' . $id[0] . ',"outputText":"' . $output . '"}}}';
} elseif ($out === 'XML') {
echo '<?xml version="1.0"?><PRAF><input><kind>encode</kind><memory>' . $memory . '</memory><text>' . $oText . '</text><save>' . $save . '</save><binary>' . $bin . '</binary><output>XML</output></input><output><sorting>' . $id[1] . '</sorting><filling>' . $encoded[1] . '</filling><id>' . $id[0] . '</id><outputText>' . $output . '</outputText></output></PRAF>';
} else {
echo $output . "<br />" . $encoded[1] . "<br />" . $id[1] . "<br />" . $id[0];
}
} elseif (get('k') == 'd') {
$id = get('i');
$save = "false";
$bin = "false";
if ($id === '') {
echo "Bad input";
return false;
}
if ($id === '0') {
$temp = array(get('p'), get('s'));
}
$memory = get('m');
if ($memory === '') {
$memory = 1024;
}
if ($id > 0) {
$temp = __get($id);
$save = "true";
}
if ($temp[0] === '' || $temp[1] === '') {
echo "Bad input";
return false;
}
$plain = _undo(base64_decode($text), $temp[0], $temp[1]);
$encoded = _go($plain, false, $memory);
if ($id > 0) {
$id = __store($encoded[1], $encoded[2], $id);
} else {
$id = array(-1, _compact($encoded[2]));
}
if (get('b') === '1') {
$plain = base64_encode($plain);
$bin = "true";
}
$output = base64_encode($encoded[0]);
if ($out === 'JSON') {
echo '{"PRAF":{"input":{"kind":"decode","memory":' . $memory . ',"id":' . $id[0] . ',"text":"' . $text . '","sorting":"' . $temp[1] . '","filling":"' . $temp[0] . '","save":' . $save . ',"binary":' . $bin . ',"output":"JSON"},"output":{"sorting":"' . $id[1] . '","filling":"' . $encoded[1] . '","id":' . $id[0] . ',"outputText":"' . $output . '"}}}';
} elseif ($out === 'XML') {
echo '<?xml version="1.0"?><PRAF><input><kind>decode</kind><memory>' . $memory . '</memory><id>' . $id[0] . '</id><text>' . $text . '</text><sorting>' . $temp[1] . '</sorting><filling>' . $temp[0] . '</filling><save>' . $save . '</save><binary>' . $bin . '<binary><output>XML</output></input><output><sorting>' . $id[1] . '</sorting><filling>' . $encoded[1] . '</filling><id>' . $id[0] . '</id><outputText>' . $output . '</outputText></output></PRAF>';
} else {
echo $plain . "<br />" . $output . "<br />" . $encoded[1] . "<br />" . $id[1] . "<br />" . $id[0];
}
} else {
echo "Bad input";
return false;
}
}
示例12: tt_share
}
?>
</li>
<?php
}
?>
</ul>
<?php
tt_share();
?>
</div>
</div>
</div>
</div>
<?php
if (_go('show_related_projects') && count($slide['related'])) {
?>
<div class="releated-products">
<h4><?php
_e('Related products', 'sevenfold');
?>
</h4>
<div class="filter-area">
<div class="row" data-tesla-plugin="masonry">
<?php
foreach ($slide['related'] as $nr => $related) {
if ($nr >= 4) {
break;
}
?>
示例13: get_header
<?php
get_header();
$sidebar = get_post_meta(get_the_id(), 'sevenfold_sidebar_position', true);
$share = get_post_meta(get_the_id(), 'sevenfold_page_share', true);
$sidebar = $sidebar === '' ? 'full_width' : $sidebar;
if (get_post_meta(get_the_id(), 'sevenfold_show_breadcrumbs', true)) {
?>
<?php
} else {
?>
<div class="breadcrumbs"<?php
if (_go('breadcrumbs_image')) {
echo " style='background-image:url(" . _go('breadcrumbs_image') . ")'";
}
?>
>
<div class="container">
<h1><?php
the_title();
?>
</h1>
</div>
</div>
<style>
.page-template-default .content {
padding-top: 0;
}
</style>
<?php
示例14: global_socials
/**
* Global social networks
*/
public function global_socials()
{
$networks = array('182' => 'facebook', '510' => 'twitter', '298' => 'linkedin', '397' => 'rss', '158' => 'dribbble', '244' => 'google');
$social_buttons = '';
foreach ($networks as $icon => $item) {
$network = _go('social_platforms_' . $item);
if (!empty($network)) {
$social_buttons .= sprintf('<li class="%s-network"><a href="%s"><i class="icon-%s"></i></a></li>', $item, _go('social_platforms_' . $item), $icon);
}
}
if (!empty($social_buttons)) {
return sprintf('<ul class="inline-list social-networks align-center text-white">%s</ul>', $social_buttons);
}
}
示例15: get_header
<?php
get_header();
$error_type = _go('error_type') ? _go('error_type') : 1;
get_template_part('theme_includes/404', $error_type);
get_footer();