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


PHP get_setting_value函数代码示例

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


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

示例1: make_theme_list

function make_theme_list()
{
    $themes = list_info_dir('../inc/themes', 'theme');
    $current_theme = get_setting_value("theme_dir_name");
    for ($n = 0; $n < count($themes); $n++) {
        $theme = $themes[$n];
        $dirname = $theme[1];
        $attrs = $theme[0];
        $name = $attrs['Name'];
        if ($dirname == $current_theme) {
            $spid = " id=\"curr-theme-box\"";
        } else {
            $spid = '';
        }
        $onclick = "onclick=\"Settings.setTheme('{$dirname}');return false;\"";
        echo "<div class=\"theme-icon action-link\" {$onclick} {$spid}>";
        echo "<a href=\"set-theme.php?dirname={$dirname}\" title=\"{$attrs['Comment']}\" class=\"action-link\" {$onclick}>";
        echo "<img src=\"../inc/themes/{$dirname}/{$attrs['Icon']}\" alt=\"{$name}\" width=\"160px\" height=\"160px\" class=\"theme-image\" />";
        echo "</a>";
        if ($dirname == $current_theme) {
            echo "<img src=\"inc/images/ok32.png\" alt=\"current theme\" title=\"Planetoid is currently using this theme.\" id=\"curr-theme\" />";
        } else {
            echo "<a href=\"set-theme.php?dirname={$dirname}\" title=\"{$attrs['Comment']}\" class=\"action-link\" {$onclick}><img src=\"inc/images/set-theme.png\" alt=\"current theme\" title=\"Select this theme.\" class=\"set-theme\" /></a>";
        }
        echo "<span>{$name} {$attrs['Version']}<br/><small>by <a href=\"{$attrs['AuthorURL']}\" target=\"_blank\">{$attrs['Author']}</a></small></span>";
        echo "</div>";
    }
    echo "<br style=\"clear:both\"/>";
}
开发者ID:laiello,项目名称:planetoid-project,代码行数:29,代码来源:looks-functions.php

示例2: resetpassword

 function resetpassword()
 {
     $data = array();
     if (isset($_POST['resetpasswordbttn'])) {
         $this->form_validation->set_rules('username', 'Username', 'trim|required|xss_clean');
         $this->form_validation->set_error_delimiters('<p class="has-error"><label class="control-label">', '</label></p>');
         if ($this->form_validation->run()) {
             $username = $this->input->post('username');
             $userdata = $this->users_model->select_email($username);
             $rows = $userdata->num_rows();
             if ($rows == 1) {
                 $userdetails = $userdata->row();
                 $firstname = $userdetails->first_name;
                 $email = $userdetails->user_email;
                 $password_token = $this->create_guid();
                 $password_details = array('password' => sha1($password_token));
                 $this->users_model->resetpassword($username, $password_details);
                 //send the password reset email
                 $to = $email;
                 $subject = 'Password Reset Information';
                 $company_name = get_setting_value('companyname') != '' ? get_setting_value('companyname') : "Classic Invoicer";
                 $message = '<h2>Hello ' . ucfirst($firstname) . ', </h2>';
                 $message .= '<p>As you requested, your password has now been reset. Your new login details are as follows:</p>';
                 $message .= '<p> Password : ' . $password_token . '</p>';
                 $message .= '<p>NB : Remember to change this password to a more convinient one.</p>';
                 $message .= '<p>Best Regards.</p>';
                 $message .= '<p>Webmaster</p>';
                 $message .= '<hr/>';
                 $message .= '<p style="font-size:8px; color:#969AB3">Please do not reply to this message; it was sent from an unmonitored email address. This message is a service email related to your use of classic invoice. For general inquiries or to request support with your account, please contact us for Support.</p>';
                 $config['mailtype'] = 'html';
                 $this->load->library("email");
                 $this->email->initialize($config);
                 $this->email->set_newline("\r\n");
                 $this->email->from("noreply@classicinvoicer", $company_name->company_name);
                 $this->email->to($to);
                 $this->email->subject($subject);
                 $this->email->message($message);
                 if ($this->email->send()) {
                     $this->session->set_flashdata('success', 'Password reset successful, check your inbox for instructions !!');
                     redirect('login');
                 }
             } else {
                 $this->session->set_flashdata('error', 'Username does not exist !!');
                 redirect('login/resetpassword');
             }
         }
     }
     $this->load->view('login/resetpassword');
 }
开发者ID:anji12172,项目名称:finalProject,代码行数:49,代码来源:login.php

示例3: user_login

        }
        if (!strlen($login_errors)) {
            user_login($user_login, $user_password, "", 0, "", false, $login_errors);
        }
    }
    if (!$login_errors) {
        // make redirect to original page after successful login/logout operations
        header("Location: " . $return_page);
        exit;
    }
}
if (get_session("session_user_id")) {
    $user_info = get_session("session_user_info");
    $user_login = get_setting_value($user_info, "nickname", "");
    if (!$user_login) {
        $user_login = get_setting_value($user_info, "login", "");
    }
    $t->set_var("user_login", $user_login);
    $t->set_var("user_name", get_session("session_user_name"));
    $t->set_var("login_action", "logout");
    $t->set_var("login_form", "");
    $t->parse($block_prefix . "logout_form", false);
} else {
    $t->set_var("user_login", htmlspecialchars($user_login));
    $t->set_var("login_action", "login");
    $t->set_var("logout_form", "");
    $t->parse($block_prefix . "login_form", false);
}
$t->set_var("user_name", get_session("session_user_name"));
$user_login_name = "<b>" . htmlspecialchars($user_login) . "</b>";
$t->set_var("LOGIN_AS_NAME", str_replace("{user_name}", $user_login_name, LOGIN_AS_MSG));
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_login.php

示例4: get_setting_value

         exit;
     } else {
         $html_template = get_setting_value($block, "html_template", "block_categories_chained_menu.html");
         $t->set_file("block_body", $html_template);
         $t->set_var("products_href", get_custom_friendly_url("products.php"));
         foreach ($categories as $category_id => $category_name) {
             $t->set_var("category_id", $category_id);
             $t->set_var("category_name", htmlspecialchars($category_name));
             $t->parse("category_option");
         }
         $block_parsed = true;
         $t->parse("block_body", false);
     }
 } else {
     // list type
     $html_template = get_setting_value($block, "html_template", "block_categories_list.html");
     $t->set_file("block_body", $html_template);
     $t->set_var("categories_rows", "");
     $t->set_var("categories", "");
     $active_category_path = "0";
     $not = false;
     if ($categories_type == 4) {
         // Tree-type structure
         $sql = " SELECT category_path ";
         $sql .= " FROM " . $table_prefix . "categories ";
         $sql .= " WHERE category_id=" . $db->tosql($category_id, INTEGER);
         $db->query($sql);
         if ($db->next_record()) {
             $active_category_path = $db->f("category_path");
             $active_category_path .= $category_id;
         }
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_categories_list.php

示例5: header

     header("Cache-Control: private", false);
     header("Content-Type: application/octet-stream");
     header("Content-Disposition: attachment; filename=" . $google_base_filename);
     header("Content-Transfer-Encoding: binary");
 }
 // output XML header
 write_to("<?xml version='1.0' encoding='" . $google_base_encoding . "'?>" . $eol . "<rss version='2.0' xmlns:" . $schema_type . "='http://base.google.com/ns/1.0'>" . $eol . "<channel>" . $eol, true);
 if (strlen($google_base_title)) {
     $google_base_title = htmlspecialchars(charset_conv($google_base_title));
     $google_base_title = strlen($google_base_title) < 70 ? $google_base_title : substr($google_base_title, 0, 66) . "...";
     write_to("\t<title>" . $google_base_title . "</title>" . $eol);
 }
 if (strlen($google_base_description)) {
     write_to("\t<description>" . htmlspecialchars(charset_conv($google_base_description)) . "</description> " . $eol);
 }
 write_to("\t<link>" . get_setting_value($settings, "site_url") . "</link>" . $eol);
 $data_sql = $sql . $sql_tables . $where . $group_by . $order_by;
 //echo $data_sql;
 for ($page_number = 1; $page_number <= $total_pages; $page_number++) {
     $items_ids = array();
     $items_types = array();
     $items_categories = array();
     // get all products ids and check their google types
     $db->RecordsPerPage = $records_per_page;
     $db->PageNumber = $page_number;
     $db->query($data_sql);
     while ($db->next_record()) {
         $item_id = $db->f("item_id");
         $item_type = $db->f("i_gb_type");
         if (!strlen($item_type)) {
             $item_type = $db->f("it_gb_type");
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:admin_export_google_base.php

示例6: FROM

$sql = " SELECT   i.item_id, i.item_type_id, i.item_name, i.a_title, i.friendly_url, i.short_description, i.small_image, i.small_image_alt, ";
$sql .= " i.buying_price, i." . $price_field . ", i." . $properties_field . ", i." . $sales_field . ", i.is_sales, i.tax_id, i.tax_free, ";
$sql .= " i.buying_price, i." . $price_field . ", i." . $properties_field . ", i." . $sales_field . ", i.is_sales, i.tax_id, i.tax_free, ";
$sql .= " i.use_stock_level, i.stock_level, st_in.shipping_time_desc AS in_stock_message, st_out.shipping_time_desc AS out_stock_message ";
$sql .= $new_product_sql;
$sql .= " FROM (((";
$sql .= $table_prefix . "items i ";
$sql .= $related_type_join;
$sql .= " LEFT JOIN " . $table_prefix . "shipping_times st_in ON i.shipping_in_stock=st_in.shipping_time_id) ";
$sql .= " LEFT JOIN " . $table_prefix . "shipping_times st_out ON i.shipping_out_stock=st_out.shipping_time_id) ";
$sql .= " WHERE i.item_id IN (" . $db->tosql($items_ids, INTEGERS_LIST) . ")";
$sql .= " AND " . $related_type_where;
$sql .= $related_type_order;
$db->query($sql);
$t->set_var("ri_rows", "");
$ri_columns = get_setting_value($vars, $related_columns_param, 1);
$t->set_var("ri_column", 100 / $ri_columns . "%");
$ri_number = 0;
while ($db->next_record()) {
    $ri_number++;
    $item_id = $db->f("item_id");
    $item_type_id = $db->f("item_type_id");
    $item_name = get_translation($db->f("item_name"));
    $a_title = get_translation($db->f("a_title"));
    $friendly_url = $db->f("friendly_url");
    $short_description = get_translation($db->f("short_description"));
    if ($php_in_short_desc) {
        eval_php_code($short_description);
    }
    if ($friendly_urls && $friendly_url) {
        $details_url = $friendly_url . $friendly_extension;
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_products_related.php

示例7: get_home_link

?>
 (mobile edition)</title><style>body { color:#fff;background:#0d0d08;font-size:13px; } a {color: #fffbe0 } hr { width:30%;background:#c0c0c0; }</style></head><body><h1><a href="<?php 
echo get_home_link();
?>
" style="color:#ffff9b"><?php 
echo get_title();
?>
</a></h1>
<?php 
$articles = list_articles();
if ($page > count($articles) - 20) {
    $page = 1;
}
$page_start = ($page - 1) * 10;
$page_end = $page_start + 10;
$max_posts = get_setting_value("posts_num");
if ($max_posts == 0) {
    $max_posts = count($articles);
}
if ($page_end > $max_posts) {
    $page_start = 0;
    $page_end = 10;
}
$navigation = '<p style="text-align:center">';
if ($page > 1) {
    $navigation .= "<a href=\"index.php?p=" . ($page - 1) . "\">&laquo; Previous</a> | <a href=\"index.php?p=1\">Home</a> |";
}
if ($page_end < count($articles)) {
    $navigation .= "<a href=\"index.php?p=" . ($page + 1) . "\">Next &raquo;</a>";
}
$navigation .= '</p>';
开发者ID:laiello,项目名称:planetoid-project,代码行数:31,代码来源:index.php

示例8: strftime

    $pdf->MultiCell(20, 1, "Status Perkawinan", 0, 'L', 0, 0, '', '', true);
    $pdf->MultiCell(10, 1, ": {$ktp->status_nikah}", 0, 'L', 0, 1, '', '', true);
    $pdf->MultiCell(20, 1, 'Pekerjaan', 0, 'L', 0, 0, '', '', true);
    $pdf->MultiCell(20, 1, ": {$ktp->pekerjaan}", 0, 'L', 0, 1, '', '', true);
    $pdf->MultiCell(20, 1, "Kewarganegaraan", 0, 'L', 0, 0, '', '', true);
    $pdf->MultiCell(10, 1, ": {$ktp->wni}", 0, 'L', 0, 1, '', '', true);
    $dm = strftime(date('d-m', $dob));
    $year = strftime(date('Y'));
    $year = (int) $year;
    $year += 5;
    $pdf->MultiCell(20, 1, "Berlaku Hingga", 0, 'L', 0, 0, '', '', true);
    $pdf->MultiCell(15, 1, ": {$dm}-{$year}", 0, 'L', 0, 0, '', '', true);
    $pdf->Cell(20);
    $pdf->Cell(0, 1, "TULUNGAGUNG, " . strftime(date('m-F-Y')), 0, 1, 'C', 0, '', 0);
    $pdf->Cell(55);
    $pdf->Cell(0, 1, 'an. BUPATI TULUNGAGUNG', 0, 1, 'C', 0, '', 0);
    $pdf->Cell(55);
    $pdf->Cell(0, 1, 'KEPALA DINAS', 0, 1, 'C', 0, '', 0);
    $pdf->Cell(55);
    $pdf->Cell(0, 3, 'KEPENDUDUKAN DAN CATATAN SIPIL', 0, 1, 'C', 0, '', 0);
    // add foto image
    $pdf->Ln(5);
    $pdf->Cell(55);
    $pdf->Cell(0, 1, get_setting_value("kepala_capil"), 0, 1, 'C', 0, '', 0);
    $pdf->Image("../../statics/images/foto/{$ktp->photo}", 70, 15, 20, 25, '', '', 'C', true);
    $pdf->lastPage();
    $pdf->Output('ktp.pdf', 'I');
}
?>

开发者ID:aldrymaulana,项目名称:simduks,代码行数:29,代码来源:lap3.php

示例9: is_new_product

function is_new_product($new_product_date = false)
{
    global $settings, $table_prefix, $db;
    $new_product_enable = get_setting_value($settings, "new_product_enable", 0);
    if (!$new_product_enable) {
        return false;
    }
    if (!$new_product_date) {
        return false;
    }
    $new_date = strtotime($new_product_date);
    $new_product_range = get_setting_value($settings, "new_product_range", 0);
    switch ($new_product_range) {
        case 0:
            // last week
            $limit_date = strtotime("-7 days");
            break;
        case 1:
            // last month
            $limit_date = strtotime("-30 days");
            break;
        case 2:
            // last x days
            $new_product_x_days = get_setting_value($settings, "new_product_x_days", 0);
            $limit_date = strtotime("-" . $new_product_x_days . " days");
            break;
        case 3:
            // from date
            $new_product_from_date = get_setting_value($settings, "new_product_from_date", "");
            $limit_date = strtotime($new_product_from_date);
            break;
    }
    return $limit_date < $new_date;
}
开发者ID:nisargadesign,项目名称:CES,代码行数:34,代码来源:shopping_cart.php

示例10: get_translation

$r->set_value("delivery_company_id", get_translation(get_db_value("SELECT company_name FROM " . $table_prefix . "companies WHERE company_id=" . $db->tosql($r->get_value("delivery_company_id"), INTEGER, true, false))));
$r->set_value("delivery_state_id", get_translation(get_db_value("SELECT state_name FROM " . $table_prefix . "states WHERE state_id=" . $db->tosql($r->get_value("delivery_state_id"), INTEGER))));
$r->set_value("delivery_country_id", get_translation(get_db_value("SELECT country_name FROM " . $table_prefix . "countries WHERE country_id=" . $db->tosql($r->get_value("delivery_country_id"), INTEGER))));
$r->set_value("cc_type", get_db_value("SELECT credit_card_name FROM " . $table_prefix . "credit_cards WHERE credit_card_id=" . $db->tosql($r->get_value("cc_type"), INTEGER)));
$r->set_parameters();
if ($personal_number > 0 || $personal_properties) {
    $t->parse("personal", false);
}
if ($delivery_number > 0 || $delivery_properties) {
    $t->parse("delivery", false);
}
if (trim($payment_info)) {
    $payment_number++;
    $t->set_block("payment_info", $payment_info);
    $t->parse("payment_info", false);
    $t->global_parse("payment_info_block", false, false, true);
} else {
    $t->set_var("payment_info_block", "");
}
if ($payment_number > 0 || $payment_properties) {
    $t->sparse("payment", false);
}
$intro_text = get_setting_value($order_confirmation, "intro_text", "");
$intro_text = get_translation(trim($intro_text));
$intro_text = get_currency_message($intro_text, $currency);
if ($intro_text) {
    $t->set_var("intro_text", $intro_text);
    $t->parse("intro_block", false);
}
$block_parsed = true;
$t->parse("block_body", false);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_order_data_preview.php

示例11: md5

                 $super_image = "image_show.php?item_id=" . $item_id . "&type=super&vc=" . md5($super_image);
             }
         }
         $super_image = htmlspecialchars($super_image);
         $t->set_var("src_sup", $super_image);
         $t->sparse("super_image", false);
     } else {
         $t->set_var("src_sup", $big_image);
     }
     $t->parse("big_image", false);
     $meta_OG_image = $big_image;
     //Customization by Vital - Open Graph image
 } else {
     $t->set_var("big_image", "");
 }
 $open_large_image = get_setting_value($settings, "open_large_image", 0);
 $super_image = $db->f("super_image");
 if (strlen($super_image)) {
     if (preg_match("/^http(s)?:\\/\\//", $super_image)) {
         $image_size = "";
     } else {
         $image_size = @getimagesize($super_image);
         if ($watermark_super_image || $restrict_products_images) {
             $super_image = "image_show.php?item_id=" . $item_id . "&type=super&vc=" . md5($super_image);
         }
     }
     $src = htmlspecialchars($super_image);
     if (is_array($image_size)) {
         $width = $image_size[0];
         $height = $image_size[1];
     } else {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_product_details.php

示例12: running_time

function running_time()
{
    return date('jS F Y.', get_setting_value('install_time'));
}
开发者ID:laiello,项目名称:planetoid-project,代码行数:4,代码来源:planetoid.php

示例13: get_session

<?php

include_once "./includes/products_functions.php";
$erase_tags = true;
$user_id = get_session("session_user_id");
$user_info = get_session("session_user_info");
$user_type_id = get_setting_value($user_info, "user_type_id", "");
$friendly_urls = get_setting_value($settings, "friendly_urls", 0);
$friendly_extension = get_setting_value($settings, "friendly_extension", "");
$html_template = get_setting_value($block, "html_template", "block_products_breadcrumb.html");
$t->set_file("block_body", $html_template);
$manf = get_param("manf");
$user = get_param("user");
$item_id = get_param("item_id");
$category_id = get_param("category_id");
$search_category_id = get_param("search_category_id");
$breadcrumbs_tree_array = array();
if (strlen($search_category_id)) {
    $category_id = $search_category_id;
}
if (!strlen($category_id) && strlen($item_id)) {
    $category_id = VA_Products::get_category_id($item_id);
    //Customization by Vital
    $session_category_id = get_session("category_id");
    if ($session_category_id && get_db_value("SELECT COUNT(*) FROM " . $table_prefix . "items_categories where item_id=" . $db->tosql($item_id, INTEGER) . " AND category_id=" . $session_category_id)) {
        $category_id = $session_category_id;
    }
    //END customization
}
$t->set_var("index_href", get_custom_friendly_url("index.php"));
if ($category_id) {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_products_breadcrumb.php

示例14: get_permissions

    $admin_order_call_url = $admin_secure_url . "admin_order_call.php";
} else {
    $admin_order_call_url = $admin_site_url . "admin_order_call.php";
}
$permissions = get_permissions();
//BEGIN product privileges changes
$products_categories_perm = get_setting_value($permissions, "products_categories", 0);
$products_settings_perm = get_setting_value($permissions, "products_settings", 0);
$product_types_perm = get_setting_value($permissions, "product_types", 0);
$manufacturers_perm = get_setting_value($permissions, "manufacturers", 0);
$features_groups_perm = get_setting_value($permissions, "features_groups", 0);
$products_reviews_perm = get_setting_value($permissions, "products_reviews", 0);
$products_report_perm = get_setting_value($permissions, "product_report", 0);
$shipping_methods_perm = get_setting_value($permissions, "shipping_methods", 0);
$shipping_times_perm = get_setting_value($permissions, "shipping_times", 0);
$shipping_rules_perm = get_setting_value($permissions, "shipping_rules", 0);
$downloadable_products_perm = get_setting_value($permissions, "downloadable_products", 0);
$coupons_perm_perm = get_setting_value($permissions, "coupons", 0);
$saved_types_perm = get_setting_value($permissions, "saved_types", 0);
$advanced_search_perm = get_setting_value($permissions, "advanced_search", 0);
//END product privileges changes
// CMS permissions
$layouts_perm = get_setting_value($permissions, "layouts", 0);
$filemanager_perm = get_setting_value($permissions, "filemanager", 0);
$polls_perm = get_setting_value($permissions, "polls", 0);
$filters_perm = get_setting_value($permissions, "filters", 0);
$custom_blocks_perm = get_setting_value($permissions, "custom_blocks", 0);
$web_pages_perm = get_setting_value($permissions, "web_pages", 0);
$custom_friendly_urls_perm = get_setting_value($permissions, "custom_friendly_urls", 0);
$banners_perm = get_setting_value($permissions, "banners", 0);
开发者ID:nisargadesign,项目名称:CES,代码行数:30,代码来源:admin_common.php

示例15: va_date

        }
        $user_name = $db->f("name");
        if (!strlen($user_name)) {
            $user_name = $db->f("first_name") . " " . $db->f("last_name");
        }
        $order_placed_date = $db->f("order_placed_date", DATETIME);
        $order_placed_date = va_date($datetime_show_format, $order_placed_date);
        if (get_setting_value($order_info, "show_delivery_country_id", 0) == 1) {
            $country_id = $db->f("delivery_country_id");
            $state_id = $db->f("delivery_state_id");
        } elseif (get_setting_value($order_info, "show_country_id", 0) == 1) {
            $country_id = $db->f("country_id");
            $state_id = $db->f("state_id");
        } else {
            $country_id = $settings["country_id"];
            $state_id = get_setting_value($settings, "state_id", "");
        }
        $status_name = get_translation($db->f("status_name"));
        $admin_order_url = $admin_order->get_url();
        $remote_address = $db->f("remote_address");
        $site_name = $db->f("site_name");
        $orders[] = array($order_id, $order_total, $user_name, $order_placed_date, $status_name, $country_id, $state_id, $admin_order_url, $remote_address, $order_currency, $site_name);
    } while ($db->next_record());
}
$colspan = 9;
if ($sitelist) {
    $colspan++;
}
$t->set_var("colspan", $colspan);
if (sizeof($orders) > 0) {
    $order_index = 0;
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:admin_orders.php


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