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


PHP RandomString函数代码示例

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


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

示例1: rd_cta

function rd_cta($atts, $content = null)
{
    extract(shortcode_atts(array('style' => '', 'title' => '', 'title_color' => '', 'text_color' => '', 'bg_color' => '', 'border_color' => '', 'left_border_color' => '', 'button_text' => '', 'button_link' => '', 'button_color' => '', 'button_bg_color' => '', 'button_hover_color' => '', 'icon' => '', 'icon_color' => '', 'icon_bg_color' => '', 'icon_size' => '', 'animation' => '', 'margin_top' => '0', 'margin_bottom' => '0'), $atts));
    ob_start();
    $id = RandomString(20);
    $output = '<style>#promo_' . $id . ' {margin:' . $margin_top . 'px 0 ' . $margin_bottom . 'px 0;}</style>';
    if ($style == 'rd_cta_1') {
        // Enqueue the CSS
        if (!empty($atts['icon'])) {
            // Don't load the CSS files to trim loading time, include the specific styles via PHP
            // wp_enqueue_style( '4k-icon-' . $cssFile, plugins_url( 'icons/css/' . $cssFile . '.css', __FILE__ ) );
            $cssFile = substr($atts['icon'], 0, stripos($atts['icon'], '-'));
            wp_enqueue_style('4k-icons', RD_DIRECTORY . '/includes/4k-icons/css/icon-styles.css', null, VERSION_GAMBIT_VC_4K_ICONS);
            wp_enqueue_script('4k-icons', RD_DIRECTORY . '/includes/4k-icons/js/script-ck.js', array('jquery'), VERSION_GAMBIT_VC_4K_ICONS, true);
        }
        global $iconContents;
        include 'icon-contents.php';
        // Normal styles used for everything
        $cssFile = substr($atts['icon'], 0, stripos($atts['icon'], '-'));
        $iconFile = RD_DIRECTORY . '/includes/4k-icons/icons/fonts/' . $cssFile;
        $iconFile = apply_filters('4k_icon_font_pack_path', $iconFile, $cssFile);
        // Fix ligature icons (these are icons that use more than 1 symbol e.g. mono social icons)
        $ligatureStyle = '';
        if ($cssFile == 'mn') {
            $ligatureStyle = '-webkit-font-feature-settings:"liga","dlig";-moz-font-feature-settings:"liga=1, dlig=1";-moz-font-feature-settings:"liga","dlig";-ms-font-feature-settings:"liga","dlig";-o-font-feature-settings:"liga","dlig";
                         	 font-feature-settings:"liga","dlig";
                        	 text-rendering:optimizeLegibility;';
        }
        $iconCode = '';
        if (!empty($atts['icon'])) {
            $iconCode = $iconContents[$atts['icon']];
        }
        $ret = "<style>\r\n            @font-face {\r\n            \tfont-family: '" . $cssFile . "';\r\n            \tsrc:url('" . $iconFile . ".eot');\r\n            \tsrc:url('" . $iconFile . ".eot?#iefix') format('embedded-opentype'),\r\n            \t\turl('" . $iconFile . ".woff') format('woff'),\r\n            \t\turl('" . $iconFile . ".ttf') format('truetype'),\r\n            \t\turl('" . $iconFile . ".svg#oi') format('svg');\r\n            \tfont-weight: normal;\r\n            \tfont-style: normal;\r\n            }\r\n            #promo_" . $id . " ." . $atts['icon'] . ":before { font-family: '" . $cssFile . "'; font-weight: normal; font-style: normal; }\r\n            #promo_" . $id . " ." . $atts['icon'] . ":before { content: \"" . $iconCode . "\"; {$ligatureStyle} }\r\n";
        $ret .= "</style>";
        // Compress styles a bit for readability
        $ret = preg_replace("/\\s?(\\{|\\})\\s?/", "\$1", preg_replace("/\\s+/", " ", str_replace("\n", "", $ret))) . "\n";
        $output .= $ret;
        $output .= '<style>#promo_' . $id . ' {color:' . $text_color . '; background:' . $bg_color . '; border:1px solid ' . $border_color . ';}#promo_' . $id . ' .promo_title{color:' . $title_color . ';}#promo_' . $id . ' .promo_btn{color:' . $button_color . '; background:' . $button_bg_color . ';}#promo_' . $id . ' .promo_btn:hover{background:' . $button_hover_color . ';}#promo_' . $id . ' i{color:' . $icon_color . '; background:' . $icon_bg_color . '; font-size:' . $icon_size . 'px;}</style>';
        $output .= '<div id="promo_' . $id . '" class="rd_promo_box ' . $style . ' ' . $animation . '">';
        $output .= '<i class="' . $icon . '"></i>';
        $output .= '<div class="promo_text"><h2 class="promo_title">' . $title . '</h2><p class="cta_mt">' . $content . '<p></div>';
        $output .= '<a class="promo_btn" href="' . $button_link . '" target="_blank" >' . $button_text . '</a></div>';
    }
    if ($style == 'rd_cta_2') {
        $output .= '<style>#promo_' . $id . ' {color:' . $text_color . '; background:' . $bg_color . '; border:1px solid ' . $border_color . ';}#promo_' . $id . ' .promo_text{border-left:10px solid ' . $left_border_color . '; }#promo_' . $id . ' .promo_title{color:' . $title_color . ';}#promo_' . $id . ' .promo_btn{color:' . $button_color . '; background:' . $button_bg_color . ';}#promo_' . $id . ' .promo_btn:hover{background:' . $button_hover_color . ';}</style>';
        $output .= '<div id="promo_' . $id . '" class="rd_promo_box ' . $style . ' ' . $animation . '">';
        $output .= '<div class="promo_text"><div class="promo_text_ctn"><h2 class="promo_title">' . $title . '</h2><p class="cta_mt">' . $content . '<p></div>';
        $output .= '<a class="promo_btn" href="' . $button_link . '" target="_blank" >' . $button_text . '</a></div></div>';
    }
    if ($style == 'rd_cta_3') {
        $output .= '<style>#promo_' . $id . ' {color:' . $text_color . '; background:' . $bg_color . ';}#promo_' . $id . ' .promo_text{border:5px solid ' . $border_color . '; }#promo_' . $id . ' .promo_title{color:' . $title_color . ';}</style>';
        $output .= '<div id="promo_' . $id . '" class="rd_promo_box ' . $style . ' ' . $animation . '">';
        $output .= '<div class="promo_text"><h2 class="promo_title">' . $title . '</h2><p class="cta_mt">' . $content . '<p></div>';
        $output .= '</div>';
    }
    echo !empty($output) ? $output : '';
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
开发者ID:vorcil,项目名称:adaptiveres,代码行数:60,代码来源:rd_promo_box.php

示例2: dd

function dd($data, $name = null)
{
    $str = RandomString();
    ?>
	<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#<?php 
    echo isset($name) ? $name : $str;
    ?>
" aria-expanded="false" aria-controls="<?php 
    echo isset($name) ? $name : $str;
    ?>
">
		<?php 
    echo isset($name) ? $name : 'Var_Dump';
    ?>
	</button>
	<div class="collapse in" id="<?php 
    echo isset($name) ? $name : $str;
    ?>
">
		<div class="card card-block">
			<?php 
    echo "<pre>";
    print_r($data);
    echo "</pre>";
    ?>
		</div>
	</div>
	<?php 
}
开发者ID:HQPDevCrew,项目名称:BPU,代码行数:29,代码来源:header.php

示例3: PluginController_TimerTick_Create

 public function PluginController_TimerTick_Create($Sender)
 {
     // Assume that $Sender->RequestArgs is empty.
     $Token = GetIncomingValue('TimerTickToken', RandomString(5));
     if ($Token == C('Plugins.UsefulFunctions.TimerTick.SecretKey', RandomString(8))) {
         require dirname(__FILE__) . '/bin/tick.php';
     }
 }
开发者ID:unlight,项目名称:UsefulFunctions,代码行数:8,代码来源:default.php

示例4: Structure

 public function Structure()
 {
     // Get a user for operations.
     $UserID = Gdn::SQL()->GetWhere('User', array('Name' => 'Mollom', 'Admin' => 2))->Value('UserID');
     if (!$UserID) {
         $UserID = Gdn::SQL()->Insert('User', array('Name' => 'Mollom', 'Password' => RandomString('20'), 'HashMethod' => 'Random', 'Email' => 'mollom@domain.com', 'DateInserted' => Gdn_Format::ToDateTime(), 'Admin' => '2'));
     }
     SaveToConfig('Plugins.Mollom.UserID', $UserID);
 }
开发者ID:SatiricMan,项目名称:addons,代码行数:9,代码来源:class.mollom.plugin.php

示例5: config

 /**
  * Update the configuration.
  *
  * @return void
  */
 protected function config()
 {
     saveToConfig('Garden.Cookie.Salt', RandomString(10));
     $ApplicationInfo = [];
     include CombinePaths([PATH_APPLICATIONS . DS . 'dashboard' . DS . 'settings' . DS . 'about.php']);
     // Detect Internet connection for CDNs
     $Disconnected = !(bool) @fsockopen('ajax.googleapis.com', 80);
     saveToConfig(['Garden.Version' => arrayValue('Version', val('Dashboard', $ApplicationInfo, []), 'Undefined'), 'Garden.Cdns.Disable' => $Disconnected, 'Garden.CanProcessImages' => function_exists('gd_info'), 'EnabledPlugins.HtmLawed' => 'HtmLawed']);
 }
开发者ID:TFidryForks,项目名称:spira,代码行数:14,代码来源:VanillaConfigurator.php

示例6: wooc_module

function wooc_module($atts, $content = null)
{
    extract(shortcode_atts(array('margin_top' => '0', 'margin_bottom' => '0', 'to_show' => '5', 'per_line' => '3', 'pro_type' => 'recent'), $atts));
    ob_start();
    $wc_rp_rs = RandomString(20);
    echo '
		<script type="text/javascript" charset="utf-8">
		var j$ = jQuery;
		j$.noConflict();
		"use strict";
	//setup up Carousel
		j$(window).load(function() {
		j$(".' . $wc_rp_rs . '.rp_sc ul").carouFredSel({
					responsive: true,
					width: "100%",
					scroll: 1,
					prev: ".' . $wc_rp_rs . '.rp_left",
					next: ".' . $wc_rp_rs . '.rp_right",
					auto: false,
					items: {
						width: 330,
						height: "100%",
					//	height: "30%",	//	optionally resize item-height
						visible: {
							min: 1,
							max: ' . $per_line . '
						}
					}
				});
				
				
				j$(".products").css("opacity","1");
				});
	</script>
	
	<div class="tf_woo_carousel">
	<div class="rp_nav">
  <p class="' . $wc_rp_rs . ' rp_left"></p>
  <p class="' . $wc_rp_rs . ' rp_right"></p>
</div>
	<div class="' . $wc_rp_rs . ' rp_sc">
';
    echo do_shortcode('[' . $pro_type . '_products per_page="' . $to_show . '" ]');
    ?>




  </div>
  </div>

<?php 
    $output_string = ob_get_contents();
    ob_end_clean();
    return '<div class="clearfix" style="padding-top:' . $margin_top . 'px"></div>' . $output_string . '<div class="clearfix" style="padding-top:' . $margin_bottom . 'px"></div>';
}
开发者ID:anbuf,项目名称:lesecuriesdelizerne,代码行数:56,代码来源:rd_woocommerce.php

示例7: getNewID

function getNewID($rsn)
{
    $rsnx = "";
    $rs = RandomString(1, false);
    $rn = rand(1, 1001);
    $rsn = $rsn . "" . $rs . "" . $rn;
    if (chkDuplicateCode($rsn) == false) {
        $rsnx = $rsn;
    } else {
        $rsnx = getNewID($rsn);
    }
    return $rsnx;
}
开发者ID:ReConcepts,项目名称:dosika,代码行数:13,代码来源:functions.php

示例8: double_button

function double_button($atts, $content = null)
{
    extract(shortcode_atts(array('style' => '', 'f_b_text' => '', 'f_t_color' => '', 'f_b_color' => '', 'f_t_hover_color' => '', 'f_b_hover_color' => '', 'f_url' => '#', 's_b_text' => '', 's_t_color' => '', 's_b_color' => '', 's_t_hover_color' => '', 's_b_hover_color' => '', 's_url' => '#', 'mt' => '', 'mb' => '', 'f_animation' => '', 's_animation' => ''), $atts));
    $button_rand_class = RandomString(20);
    if ($style == 'rd_db_1' || $style == 'rd_db_2' || $style == 'rd_db_6') {
        $output_string = '<style>#b_' . $button_rand_class . '{margin-top:' . $mt . 'px; margin-bottom:' . $mb . 'px;}#b_' . $button_rand_class . ' .f_btn{color:' . $f_t_color . '; background: ' . $f_b_color . ';}#b_' . $button_rand_class . ' .f_btn:hover{color:' . $f_t_hover_color . ' ; background:' . $f_b_hover_color . ' ;}#b_' . $button_rand_class . ' .s_btn{color:' . $s_t_color . '; background: ' . $s_b_color . ';}#b_' . $button_rand_class . ' .s_btn:hover{color:' . $s_t_hover_color . ' ; background:' . $s_b_hover_color . ' ;}</style>';
    }
    if ($style == 'rd_db_3' || $style == 'rd_db_5') {
        $output_string = '<style>#b_' . $button_rand_class . '{margin-top:' . $mt . 'px; margin-bottom:' . $mb . 'px;}#b_' . $button_rand_class . ' .f_btn{color:' . $f_t_color . '; background: ' . $f_b_color . ';}#b_' . $button_rand_class . ' .f_btn:hover{color:' . $f_t_hover_color . ' ; background:' . $f_b_hover_color . ' ;}#b_' . $button_rand_class . ' .s_btn{color:' . $s_t_color . '; background: ' . $s_b_color . '; border-color:' . $s_t_color . ';}#b_' . $button_rand_class . ' .s_btn:hover{color:' . $s_t_hover_color . ' ; background:' . $s_b_hover_color . ' ; border-color:' . $s_b_hover_color . ';}</style>';
    }
    if ($style == 'rd_db_4') {
        $output_string = '<style>#b_' . $button_rand_class . '{margin-top:' . $mt . 'px; margin-bottom:' . $mb . 'px;}#b_' . $button_rand_class . ' .s_btn{color:' . $s_t_color . '; background: ' . $s_b_color . ';}#b_' . $button_rand_class . ' .s_btn:hover{color:' . $s_t_hover_color . ' ; background:' . $s_b_hover_color . ' ;}#b_' . $button_rand_class . ' .f_btn{color:' . $f_t_color . '; background: ' . $f_b_color . '; border-color:' . $f_t_color . ';}#b_' . $button_rand_class . ' .f_btn:hover{color:' . $f_t_hover_color . ' ; background:' . $f_b_hover_color . ' ; border-color:' . $f_b_hover_color . ';}</style>';
    }
    $output_string .= '<div class="' . $style . ' clearfix" id="b_' . $button_rand_class . '" ><a class="f_btn ' . $f_animation . '" href="' . $f_url . '" target="_blank" >' . $f_b_text . '</a><a class="s_btn ' . $s_animation . '" href="' . $s_url . '" target="_blank" >' . $s_b_text . '</a></div>';
    return $output_string;
}
开发者ID:vorcil,项目名称:adaptiveres,代码行数:16,代码来源:rd_double_buttons.php

示例9: CreateUser

function CreateUser($username, $password, $email, $admin = false)
{
    if (sql("SELECT * from users WHERE username=?", $username)) {
        return "Username already in use.";
    }
    lib("random");
    $salt = RandomString(32);
    $password = md5($salt . $password);
    $access = $admin === true;
    $ID = sql("INSERT INTO users (username,password,salt,email,access) VALUES (?,?,?,?,?)", $username, $password, $salt, $email, $access);
    if (!$ID) {
        return "Unable to create user.";
    }
    sql("INSERT INTO profile (ID,alias) VALUES (?,?)", $ID, $username);
    return GenerateUserKey($ID, $admin);
}
开发者ID:p2004a,项目名称:CTF,代码行数:16,代码来源:users.php

示例10: rd_chart

function rd_chart($atts, $content = null)
{
    extract(shortcode_atts(array('margin_top' => '0', 'margin_bottom' => '0', 'type' => 'rd_pie_01', 'percentage' => '80', 'p_color' => '', 'p_b_color' => '', 'bar_color' => '', 'bar_alt_color' => '', 'track_color' => '', 'bg_color' => '', 'ball_color' => '', 'heading' => '', 'heading_color' => '', 'text' => '', 'text_color' => '', 'animation' => ''), $atts));
    $pc_id = RandomString(20);
    $output = '<style>#rd_' . $pc_id . ' {margin-top:' . $margin_top . '; margin-bottom:' . $margin_bottom . ';}#rd_' . $pc_id . ' .rd_pc_status{color:' . $p_color . ';}#rd_' . $pc_id . ' .rd_pc_heading{color:' . $heading_color . ';}#rd_' . $pc_id . ' .rd_pc_text{color:' . $text_color . ';}</style>';
    if ($bar_alt_color == '') {
        $bar_alt_color = $bar_color;
    }
    $output .= '<div class="' . $type . ' rd_pie_chart ' . $animation . '" id="rd_' . $pc_id . '"><div class="rd_count_to rd_pc_status"><span class="count_number" data-from="0" data-to="' . $percentage . '" data-speed="1000" data-refresh-interval="25">0</span><span>%</span></div>';
    if ($type == 'rd_pie_01') {
        $output .= '<div class="rd_pc_track" style="color:' . $track_color . '"></div><div class="rd_pc_track_in"></div><canvas class="rd_pc_01" width="520" height="400" data-percentage-value="' . $percentage . '" data-bar-color="' . $bar_color . '" data-bar-alt-color="' . $bar_alt_color . '" >Your browser does not support the HTML5 canvas tag.</canvas>';
    }
    if ($type == 'rd_pie_02') {
        if ($p_b_color == '') {
            $p_b_color = "#ecf0f1";
        }
        if ($bg_color == '') {
            $bg_color = "#ffffff";
        }
        $output .= '<canvas class="rd_pc_02" width="520" height="400" data-percentage-value="' . $percentage . '" data-percentage-color="' . $p_b_color . '" data-background-color="' . $bg_color . '" data-track-color="' . $track_color . '" data-bar-color="' . $bar_color . '" data-bar-alt-color="' . $bar_alt_color . '" >Your browser does not support the HTML5 canvas tag.</canvas>';
    }
    if ($type == 'rd_pie_03') {
        if ($p_b_color == '') {
            $p_b_color = "#34495e";
        }
        if ($bg_color == '') {
            $bg_color = "#cdd5db";
        }
        $output .= '<canvas class="rd_pc_03" width="520" height="400" data-percentage-value="' . $percentage . '" data-percentage-color="' . $p_b_color . '" data-background-color="' . $bg_color . '" data-track-color="' . $track_color . '" data-bar-color="' . $bar_color . '" data-bar-alt-color="' . $bar_alt_color . '" >Your browser does not support the HTML5 canvas tag.</canvas>';
    }
    if ($type == 'rd_pie_04') {
        $output .= '<canvas class="rd_pc_04" width="340" height="200" data-percentage-value="' . $percentage . '" data-track-color="' . $track_color . '" data-bar-color="' . $bar_color . '" data-bar-alt-color="' . $bar_alt_color . '" >Your browser does not support the HTML5 canvas tag.</canvas>';
    }
    if ($type == 'rd_pie_05') {
        $output .= '<canvas class="rd_pc_05" width="520" height="400" data-percentage-value="' . $percentage . '" data-track-color="' . $track_color . '" data-bar-color="' . $bar_color . '" data-bar-alt-color="' . $bar_alt_color . '" data-ball-color="' . $ball_color . '">Your browser does not support the HTML5 canvas tag.</canvas>';
    }
    if ($heading !== '') {
        $output .= '<h3 class="rd_pc_heading">' . $heading . '</h3>';
    }
    if ($text !== '') {
        $output .= '<p class="rd_pc_text">' . $text . '</p>';
    }
    $output .= '</div>';
    return $output;
}
开发者ID:anbuf,项目名称:lesecuriesdelizerne,代码行数:45,代码来源:rd_chart.php

示例11: new_shipment

 public function new_shipment($key = null)
 {
     $this->load->model('SC_model');
     $result = $this->SC_model->getAllCategories();
     if ($key == 1) {
         $unset = array('shipment_key');
         $this->session->unset_userdata($unset);
     }
     if ($key == null && $this->session->userdata('shipment_key') == null) {
         $key = RandomString();
     } else {
         if ($this->session->userdata('shipment_key') != null) {
             $key = $this->session->userdata('shipment_key');
         }
     }
     $this->session->set_userdata(array('shipment_key' => $key));
     $result['selected_cat'] = $this->SC_model->getSelectedCategories($this->session->userdata('shipment_key'));
     loadView('categories', array('categories' => $result));
 }
开发者ID:vishalmote,项目名称:roadcode,代码行数:19,代码来源:Home.php

示例12: rd_search

function rd_search($atts, $content)
{
    extract(shortcode_atts(array('t_color' => '', 'bg_color' => '', 'b_color' => '', 'h_color' => '', 'placeholder' => 'Search', 'margin_top' => '0', 'margin_bottom' => '0', 'animation' => '', 'width' => '', 'radius' => '0'), $atts));
    ob_start();
    $id = RandomString(20);
    global $rd_data;
    if ($t_color == '') {
        $t_color = $rd_data['rd_content_text_color'];
    }
    if ($b_color == '') {
        $b_color = $rd_data['rd_content_border_color'];
    }
    if ($bg_color == '') {
        $bg_color = $rd_data['rd_content_bg_color'];
    }
    if ($h_color == '') {
        $h_color = $rd_data['rd_content_hover_color'];
    }
    if ($placeholder == '') {
        $placeholder = "Search";
    }
    if ($width !== '') {
        echo '<style>#rd_' . $id . ' {width:' . $width . 'px;}</style>';
    }
    echo '<style>#rd_' . $id . ' {margin-top:' . $margin_top . 'px; margin-bottom:' . $margin_bottom . 'px;}#rd_' . $id . ' #search input[type=text]{background:' . $bg_color . '; border:1px solid ' . $b_color . '; color:' . $t_color . '; border-radius:' . $radius . 'px;}#rd_' . $id . ' #search input[type=submit]{color:' . $t_color . '}#rd_' . $id . ' #search input[type=submit]:hover{color:' . $h_color . '}</style>';
    echo '<div class="rd_search_sc ' . $animation . '" id="rd_' . $id . '"><div id="search">';
    ?>
<form method="get" action="<?php 
    echo esc_url(home_url(""));
    ?>
"><input type="text" name="s" placeholder="<?php 
    echo esc_attr($placeholder);
    ?>
" class="search"  value="<?php 
    echo the_search_query();
    ?>
"/><input type="submit" id="searchsubmit" value=""></form>

			</div></div> <?php 
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
开发者ID:axelander95,项目名称:wsguiavirtualpichincha,代码行数:43,代码来源:rd_search.php

示例13: timeline_event_ctn

function timeline_event_ctn($atts, $content)
{
    extract(shortcode_atts(array('bg_color' => '', 'hl_color' => '', 'alt_hl_color' => '', 'vline_color' => '', 'vline_alt_color' => '', 'h_color' => '', 't_color' => '', 'b_color' => '', 'margin_bottom' => '0', 'margin_top' => '0'), $atts));
    ob_start();
    $id = RandomString(20);
    global $rd_data;
    if ($bg_color == '') {
        $bg_color = $rd_data['rd_content_bg_color'];
    }
    if ($hl_color == '') {
        $hl_color = $rd_data['rd_content_hl_color'];
    }
    if ($alt_hl_color == '') {
        $alt_hl_color = $rd_data['rd_content_alt_hl_color'];
    }
    if ($vline_color == '') {
        $vline_color = $rd_data['rd_content_hl_color'];
    }
    if ($vline_alt_color == '') {
        $vline_alt_color = $rd_data['rd_content_alt_hl_color'];
    }
    if ($h_color == '') {
        $h_color = $rd_data['rd_content_heading_color'];
    }
    if ($t_color == '') {
        $t_color = $rd_data['rd_content_text_color'];
    }
    if ($b_color == '') {
        $b_color = $rd_data['rd_content_border_color'];
    }
    $output = '<style>#tle_' . $id . ' .v_line{background: ' . $vline_color . '; background: -moz-linear-gradient(top, ' . $vline_color . ' 1%, ' . $vline_alt_color . ' 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,' . $vline_color . '), color-stop(100%,' . $vline_alt_color . ')); background: -webkit-linear-gradient(top, ' . $vline_color . ' 1%,' . $vline_alt_color . ' 100%); background: -o-linear-gradient(top, ' . $vline_color . ' 1%,' . $vline_alt_color . ' 100%); background: -ms-linear-gradient(top, ' . $vline_color . ' 1%,' . $vline_alt_color . ' 100%); background: linear-gradient(to bottom, ' . $vline_color . ' 1%,' . $vline_alt_color . ' 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr="' . $vline_color . '", endColorstr="' . $vline_alt_color . '",GradientType=0 );}#tle_' . $id . ' .event_img{border-color:' . $b_color . ';}#tle_' . $id . ' .event_info h2{color:' . $h_color . ';}#tle_' . $id . ' .event_info p{color:' . $t_color . ';}#tle_' . $id . ' span.timeline_event_date_ctn:nth-of-type(odd) .timeline_event_date,#tle_' . $id . ' span.timeline_event_date_ctn:nth-of-type(odd) h2{background:' . $bg_color . '; color:' . $t_color . ';}#tle_' . $id . ' span.timeline_event_date_ctn:nth-of-type(even) .timeline_event_date,#tle_' . $id . ' span.timeline_event_date_ctn:nth-of-type(even) h2{background:' . $bg_color . '; color:' . $h_color . ';}#tle_' . $id . ' div.timeline_event:nth-of-type(even):after {color:' . $hl_color . ';}#tle_' . $id . ' div.timeline_event:nth-of-type(odd):before {color:' . $alt_hl_color . ';}#tle_' . $id . ' {margin-top:' . $margin_top . 'px; margin-bottom:' . $margin_bottom . 'px; }</style>';
    $output .= "\n" . '<!-- Timeline Event --><div class="timeline_event_ctn clearfix" id="tle_' . $id . '"><div class="v_line"></div>' . do_shortcode($content) . '</div>

<!-- Timeline Event END-->' . "\n";
    echo !empty($output) ? $output : '';
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
开发者ID:anbuf,项目名称:lesecuriesdelizerne,代码行数:39,代码来源:rd_timeline_event.php

示例14: user_new

function user_new($user, $mail, $level)
{
    /*
     * Max length of the fields in the database can't be exceeded and the level must be numeric:
     *    - User: 20 characters
     *    - Mail: 50 characters
     * The password is always a 40-characters hash (SHA1), it's automatically hashed
     * The mail syntax and his DNS server are checked to avoid false mails on the database
     * If the user or e-mail exists in the database the function returns false to avoid duplicate rows
     */
    if (!user_level(5) || !isset($user, $mail, $level) || (!is_string($user) || empty($user) || isset($user[10])) || (!is_string($mail) || empty($mail) || isset($mail[50])) || !ereg('^[1-5]$', $level)) {
        echo "amsd";
        return false;
    } else {
        if (!user_mail($mail)) {
            echo "mah";
            return false;
        }
    }
    $pass = RandomString();
    if (!@mysql_num_rows(mysql_query("SELECT `id` FROM `amsn_users` WHERE `user` = '" . mysql_real_escape_string($user) . "' LIMIT 1"))) {
        if (@mysql_query("INSERT INTO `amsn_users` (user, pass, email, level) VALUES ('" . mysql_real_escape_string($user) . "', '" . sha1($pass) . "', '" . mysql_real_escape_string($mail) . "', '" . (int) $level . "')")) {
            if (email($mail, "aMSN Web administration", "You are now a part of the aMSN webpage administration, welcome!\nYour username and password are the following:\n\n - User: {$user}\n - Password: {$pass}\n\nYou can change the password anytime you want in your control panel", "From: aMSN Admin <admin@amsn.sf.net>")) {
                mysql_query("DELETE FROM `amsn_users` WHERE id = '" . mysql_insert_id() . "' LIMIT 1");
                echo "dude";
                return false;
            } else {
                return true;
            }
        } else {
            echo mysql_error();
            echo "insert problem";
            return false;
        }
    } else {
        return false;
    }
}
开发者ID:Kjir,项目名称:amsn,代码行数:38,代码来源:lib.user.php

示例15: rd_fq_sc

function rd_fq_sc($atts, $content = null)
{
    extract(shortcode_atts(array('q_color' => '', 'a_color' => '', 'ai_color' => '', 'hl_color' => '', 'i_color' => '', 'i_b_color' => '', 'i_bg_color' => '', 'author_one' => 'First Author', 'info_one' => 'First Quote Author Info', 'quote_one' => 'This is an Awesome quote text! Replace me with your own quote text!', 'author_two' => 'Second Author', 'info_two' => 'Second Programmer', 'quote_two' => 'This is an Awesome quote text! Replace me with your own quote text!', 'author_three' => 'Third Author', 'info_three' => 'Third Programmer', 'quote_three' => 'This is an Awesome quote text! Replace me with your own quote text!', 'author_four' => 'Fourth Author', 'info_four' => 'Fourth Programmer', 'quote_four' => 'This is an Awesome quote text! Replace me with your own quote text!', 'animation' => '', 'mt' => '0', 'mb' => '0'), $atts));
    ob_start();
    global $rd_data;
    $id = RandomString(20);
    if ($hl_color == '') {
        $hl_color = $rd_data['rd_content_hl_color'];
    }
    $output = '<style>#rd_' . $id . ' {margin-top:' . $mt . 'px; margin-bottom:' . $mb . 'px;}#rd_' . $id . ' .sc-four-quote-first,#rd_' . $id . ' .sc-four-quote-last{border-color:' . $i_b_color . ' !important; }#rd_' . $id . ' p{color:' . $q_color . '; }#rd_' . $id . ' h3{color:' . $a_color . '; }#rd_' . $id . ' h4{color:' . $ai_color . '; }#rd_' . $id . ' .quote_meta h3:before{background:' . $hl_color . '; }#rd_' . $id . ' .sc-four-quote-icon:before{background:' . $i_bg_color . '; box-shadow: 0 0 0 1px ' . $i_b_color . ',0 0 0 5px ' . $i_bg_color . ',0 0 0 6px ' . $i_b_color . ';}#rd_' . $id . ' .sc-four-quote-icon:after{color:' . $i_color . ';}';
    $output .= '</style>';
    $output .= '<div class="sc-four-quote" id="rd_' . $id . '">';
    $output .= '<div class="sc-four-quote-ctn quote-top-row"><div class="sc-four-quote-first"><p>' . $quote_one . '</p><div class="quote_meta clearfix"><h3>' . $author_one . '</h3><h4>/ ' . $info_one . '</h4></div></div>';
    $output .= '<div class="sc-four-quote-last "><p>' . $quote_two . '</p><div class="quote_meta clearfix"><h3>' . $author_two . '</h3><h4>/ ' . $info_two . '</h4></div></div></div>';
    $output .= '<div class="sc-four-quote-icon ' . $animation . '"></div><div class="sc-four-quote-ctn quote-bottom-row">';
    $output .= '<div class="sc-four-quote-first"><p>' . $quote_three . '</p><div class="quote_meta clearfix"><h3>' . $author_three . '</h3><h4>/ ' . $info_three . '</h4></div></div>';
    $output .= '<div class="sc-four-quote-last"><p>' . $quote_four . '</p><div class="quote_meta clearfix"><h3>' . $author_four . '</h3><h4>/ ' . $info_four . '</h4></div></div></div>';
    $output .= '</div>';
    echo !empty($output) ? $output : '';
    $output_string = ob_get_contents();
    ob_end_clean();
    return $output_string;
}
开发者ID:anbuf,项目名称:lesecuriesdelizerne,代码行数:23,代码来源:rd_four_quotes.php


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