예제 #1
0
function isvaliduser($dbh, $username)
{
    if (!get_items($dbh, "username", "accounts", "username", $username)) {
        return 0;
    } else {
        return 1;
    }
}
예제 #2
0
 private function output_files()
 {
     theme_cpush("css/font-awesome.min");
     theme_cpush("css/bootstrap.min");
     theme_cpush("css/switcher");
     theme_cpush("css/fractionslider");
     theme_cpush("css/style-fraction");
     theme_cpush("css/style");
     $theme_style = get_items('theme_color_and_style');
     if (($background = riake('background', $theme_style)) == 'red') {
         theme_cpush("css/skins/Softred");
     } else {
         if ($background == 'orange') {
             theme_cpush("css/skins/orange");
         } else {
             if ($background == 'purple') {
                 theme_cpush("css/skins/purple");
             } else {
                 if ($background == 'cyan') {
                     theme_cpush("css/skins/Strongcyan");
                 } else {
                     if ($background == 'darkcyan') {
                         theme_cpush("css/skins/DarkCyan");
                     } else {
                         if ($background == 'blue') {
                             theme_cpush("css/skins/blue");
                         }
                     }
                 }
             }
         }
     }
     // Box Style
     if ($box = riake('box_style', $theme_style) == 'boxed') {
         theme_cpush("css/layout/boxed");
     } else {
         theme_cpush("css/layout/wide");
     }
     theme_jpush('js/jquery-1.10.2.min');
     theme_jpush("js/bootstrap.min");
     theme_jpush("js/jquery.easing.1.3");
     theme_jpush("js/retina-1.1.0.min");
     theme_jpush("js/jquery.cookie");
     theme_jpush("js/styleswitch");
     theme_jpush("js/jquery.fractionslider");
     theme_jpush("js/jquery.smartmenus.min");
     theme_jpush("js/jquery.smartmenus.bootstrap.min");
     theme_jpush("js/jquery.jcarousel");
     theme_jpush("js/jflickrfeed");
     theme_jpush("js/jquery.magnific-popup.min");
     theme_jpush("js/jquery.isotope.min");
     theme_jpush("js/swipe");
     theme_jpush("js/jquery-scrolltofixed-min");
     theme_jpush("js/jquery.gmap");
     theme_jpush("js/main");
 }
예제 #3
0
/**
 * Created by PhpStorm.
 * User: m_xuelu
 * Date: 2015/7/7
 * Time: 20:33
 */
function run()
{
    header('Content-Type:text/html;charset=utf-8');
    date_default_timezone_set('PRC');
    //set time zone
    //图片保存目录 pic save path
    define('PATH_DOWNLOAD', './download/');
    save_dir(PATH_DOWNLOAD);
    set_time_limit(0);
    $city_url = "http://wd.koudai.com/wd/cate/getList?param={%22userID%22:%22337474108%22}&callback=jsonpcallback_1436277342180_5235922697465867&ver=2015070700014";
    //验证curl模块
    if (!function_exists('curl_init')) {
        echo "执行失败!请先安装curl扩展!\n";
        exit;
    }
    //获取城市目录
    $city = get_mulu($city_url);
    echo "获取城市:" . $city['status'] . "  耗时:" . $city['time'] . "\n";
    //解析目录jsonp数据
    $city = get_items($city['res']);
    //开始循环城市
    foreach ($city['result'] as $city) {
        $city_dir = PATH_DOWNLOAD . $city['cate_name'] . "/";
        save_dir(get_gbk($city_dir));
        echo "开始处理 " . $city['cate_name'] . "  城市ID:" . $city['cate_id'] . "\n";
        $url = "http://wd.koudai.com/wd/cate/getItems?param={%22userID%22:%22337474108%22,%22cate_id%22:%22" . $city['cate_id'] . "%22,%22limitStart%22:0,%22limitNum%22:10}&callback=jsonpcallback_1436278044036_6557131321169436&ver=2015070700014";
        $mulu = get_mulu($url);
        echo "--获取目录状态:" . $mulu['status'] . ",耗时:" . $mulu['time'] . "\n";
        //解析目录jsonp数据
        $items = get_items($mulu['res']);
        foreach ($items['result'] as $item) {
            //保存目录
            $name = str_replace(" ", "", $item['itemName']);
            $name = str_replace("/", "", $name);
            $name = str_replace(".", "", $name);
            $name = str_replace("\r", "", $name);
            $name = str_replace("\n", "", $name);
            $girl_dir = $city_dir . $name . "/";
            save_dir(get_gbk($girl_dir));
            //解析二级页面
            $second_url = "http://weidian.com/wd/item/getPubInfo?param={%22itemID%22:" . $item['itemID'] . ",%22page%22:1}&callback=jsonpcallback_1436279264909_6875134997535497&ver=2015070700014";
            $senond_mulu = get_mulu($second_url);
            $s_items = get_items($senond_mulu['res']);
            echo "----二级目录:" . $item['itemName'] . "  图片数量:" . count($s_items['result']['Imgs']) . "\n";
            echo "----开始下载...\n";
            $index = 1;
            foreach ($s_items['result']['Imgs'] as $pic) {
                //对地址进行处理
                $pic_url = get_pic_url($pic);
                //写入图片文件
                save_file($pic_url, $girl_dir, $index++);
            }
            unset($url);
        }
    }
}
예제 #4
0
파일: 360.php 프로젝트: pf5512/phpstudy
function get_team($team){
    if (!$team) return '';
	$xmlitems = '';
	foreach ($team['items'] as $k => $v)
	{
		$team['cityo']=  $team['citys'][$v['city']];
		$xmlitems .= get_items($team, $k);
	}    	$xmloutput = <<<XML
<?xml version="1.0" encoding="utf-8" ?>
<data>
    <site_name>{$team['website']}</site_name>
	<goodsdata>{$xmlitems}</goodsdata>
</data>
XML;
    unset($xmlitems);
	return $xmloutput;
}
예제 #5
0
function get_team($team)
{
    if (!$team) {
        return '';
    }
    $xmlitems = '';
    $id = 1;
    foreach ($team['items'] as $k => $v) {
        /*处理城市*/
        $city = Table::Fetch('category', $team['items'][$k]['city_id']);
        $city_name = $city['name'];
        if ($city['name'] == "") {
            $city_name = '全国';
        }
        /*处理商品类别*/
        $group = Table::Fetch('category', $team['items'][$k]['group_id']);
        $class = $group['name'];
        /*处理热销商品的开始和结束时间*/
        if ($team['items'][$k]['team_type'] == 'goods') {
            $team['items'][$k]['begin_time'] = date('YmdHis', time());
            $team['items'][$k]['end_time'] = date('YmdHis', time() + 86400);
        } else {
            /*格式化时间*/
            $team['items'][$k]['begin_time'] = date('YmdHis', $team['items'][$k]['begin_time']);
            $team['items'][$k]['end_time'] = date('YmdHis', $team['items'][$k]['end_time']);
        }
        $team['items'][$k]['expire_time'] = date('YmdHis', $team['items'][$k]['expire_time']);
        $xmlitems .= get_items($team, $k, $id, $city_name, $class);
        $id++;
    }
    $xmloutput = <<<XML
\t\t<?xml version="1.0" encoding="utf-8" ?>
\t\t<data>
\t\t<site_name>{$team['website']}</site_name>
\t\t<goodsdata>{$xmlitems}</goodsdata>
\t\t</data>
XML;
    unset($xmlitems);
    return $xmloutput;
}
예제 #6
0
     if (count($mylinks)) {
         //if values to add
         while (list($key, $items) = each($mylinks)) {
             $myrow = array($idcookie, $items);
             //set array to add to database
             add_row($dbh, "opt_links", $myrow);
             //add new row in database
         }
     }
     //added values if any
     //begin valid user display, done later in the page than usual so that the changes will take affect before page is displayed
     populate_page($thispage, $dbh, $idcookie);
     $thispage->append(new InfoText('Optional links changed.', 'Success'));
 } else {
     populate_page($thispage, $dbh, $idcookie);
     $selected_links = get_items($dbh, "linknum", "opt_links", "userid", $idcookie);
     //get the current set of links that the user has selected
     $o = 0;
     while ($selected_links[$o][0]) {
         $myselected[$selected_links[$o][0]] = " checked";
         //set up so current links will show up in form as checked
         $o++;
     }
     $my_result = mysql_query("Select linknum,linkname,descr From\n\tavail_links");
     //get the info on the currently available links
     while ($new_row = mysql_fetch_row($my_result)) {
         $all_links[] = $new_row;
         //get info fron query
     }
     $o = 0;
     $linksform = new Form('optionallinks', true);
예제 #7
0
<?php

require_once "../Plans.php";
$subject_name = $_POST['username'];
require "auth.php";
?>

<html>
<body>
<?php 
require "dbfunctions.php";
$dbh = db_connect();
if ($subject_name) {
    if (isvaliduser($dbh, $subject_name)) {
        $info = get_items($dbh, "userid,email", "accounts", "username", $subject_name);
        $subject_id = $info[0][0];
        $email = $info[0][1];
        if (!$password) {
            srand(time());
            $password = rand(0, 999999);
        }
        User::changePassword($subject_name, $password);
        echo "<form action=\"email.php\" method=\"POST\">";
        echo "<input type=\"hidden\" name=\"email\" value=\"" . $email . "\">";
        echo "<input type=\"hidden\" name=\"username\" value=\"" . $subject_name . "\">";
        echo "<input type=\"hidden\" name=\"password\" value=\"" . $password . "\">";
        echo "<input type=\"hidden\" name=\"whatoperation\" \nvalue=\"changepassword\">";
        echo "<input type=\"submit\" value=\"Send Email\"></form>";
    } else {
        echo $subject_name . "does not exist.";
    }
예제 #8
0
             //update the column size
             set_item($dbh, "accounts", "edit_rows", $rows, "userid", $idcookie);
             //update the row size
             if ($notes_asc != 1) {
                 $notes_asc = 0;
             }
             set_item($dbh, "accounts", "notes_asc", $notes_asc, "userid", $idcookie);
             //update the row size
             $message = new AlertText("Row size set to <b>" . $rows . "</b>." . " <br>Column size set to <b>" . $cols . "</b>.", 'Submission Successful');
             $thispage->append($message);
         }
     }
     //else
     //actually tell the user here if there was a problem, or if things were set correctly.
 } else {
     $edsizes = get_items($dbh, "edit_cols, edit_rows, notes_asc", "accounts", "userid", $idcookie);
     //gets the columns and row size
     //gives form
     $textboxform = new Form('textbox_form', true);
     $textboxform->action = 'textbox.php';
     $textboxform->method = 'POST';
     $thispage->append($textboxform);
     $item = new HiddenInput('part', 1);
     $textboxform->append($item);
     $item = new TextInput('rows', $edsizes[0][1]);
     $item->title = 'Rows:';
     $textboxform->append($item);
     $item = new TextInput('cols', $edsizes[0][0]);
     $item->title = 'Columns:';
     $textboxform->append($item);
     $item = new CheckboxInput('notes_asc', 1);
예제 #9
0
        <div class="row">
        	<?php 
$this->sidebar_bottom();
?>
            
        </div>
    </div>
</footer>
<!--end footer-->
<section class="footer_bottom">
    <div class="container">
        <div class="row">
            <div class="col-lg-6 ">
                <p class="copyright">&copy; Conçu pour <?php 
echo get('core_version');
?>
 | Copyright 2014 Eve | Powered by <a href="http://www.jqueryrain.com/">jQuery Rain</a></p>
            </div>
            <div class="col-lg-6 ">
                <div class="footer_social">
                	<?php 
get_items('footer_social_feeds');
?>
                </div>
            </div>
        </div>
    </div>
</section>
<?php 
get_items('google_analytic_javascript_footer');
예제 #10
0
<?php

//charge et initiale les bibliotheques globales
include 'setting.inc.php';
//route de la requete interne
$command = get_command();
//== afficher la page d'acceuil du site
if ('' == $command || 'home' == $command) {
    home_action();
} elseif ('manage' == $command) {
    manage_action();
} elseif ('add-work' == $command) {
    addwork_action();
} elseif ('save-item' == $command && isset($_POST)) {
    save_item_action($_POST);
    //redirect('show-items');
} elseif ('show-items' == $command) {
    get_items();
} else {
    header('Status: 404 Not Found');
    error404_action();
}
예제 #11
0
    
    <!--Start recent work-->
    <?php 
get_items('recents_works');
?>
    <!--Start recent work-->
    
    <section class="fetaure_bottom">
        <div class="container">
            <div class="row sub_content">
                <?php 
get_items('testimonials');
?>
                <div class="col-lg-6 ">
                    <?php 
get_items('feature_list');
?>
                </div>
            </div>
        </div>
    </section>
    <?php 
if (true == false) {
    ?>
    <section class="clients">
        <div class="container">
            <div class="row sub_content">
                <div class="col-lg-12 col-md-12 col-sm-12">
                    <div class="dividerHeading">
                        <h4><span>Our Clients</span></h4>
                    </div>
예제 #12
0
파일: appcastr.php 프로젝트: rzhw/Appcastr
// Potential errors
if (!isset($_GET['id'])) {
    appcastr_die('Appcastr needs "id" to be passed in the GET parameters.');
}
if ($_GET['id'] == 'data') {
    appcastr_die('Reserved id');
}
if (!file_exists('appcastr/' . $_GET['id'])) {
    appcastr_die('Appcastr couldn\'t find the file associated with the given id.');
}
// A simple echo
if (isset($_GET['echo'])) {
    exit(urldecode($_GET['echo']));
}
// Our items
$items = get_items($_GET['id']);
foreach ($items as &$item) {
    // The description
    if (isset($item['description'])) {
        if (appcast_info('format') == 'sparkledotnet' && appcast_info('formatVersion') == '0.1' || appcast_info('convertDescriptionToLink') === true) {
            // Don't override if we already have a link
            if (!isset($item['sparkle:releaseNotesLink'])) {
                $item['sparkle:releaseNotesLink'] = curPageURL() . '&amp;echo=' . urlencode($item['description']);
            }
        }
        unset($item['description']);
    }
    // The publish date
    if (isset($item['pubDate'])) {
        $item['pubDate'] = parse_date($item['pubDate']);
    }
예제 #13
0
										
									<li><i class="fa fa-<?php 
        echo $contact_datas['social_feeds_icon']['level'][$i];
        ?>
"></i>
										<p><strong><?php 
        echo $contact_datas['social_feeds_title']['level'][$i];
        ?>
</strong>: <?php 
        echo $contact_datas['social_feeds_value']['level'][$i];
        ?>
</p>
									</li>
									<?php 
    }
}
?>
                            </ul>
                        </div>
                        <div class="widget_social">
                        	<?php 
get_items('contact_get_social');
?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</section>
예제 #14
0
 $replyform->append($cook);
 $thread = new HiddenInput('threadid', isset($_REQUEST['threadid']) ? $_REQUEST['threadid'] : "");
 $replyform->append($thread);
 $sub = new HiddenInput('submit', 1);
 $replyform->append($sub);
 $text = new TextareaInput('messagecontents');
 $text->rows = 11;
 $text->cols = 50;
 $text->title = 'Post Reply';
 $replyform->append($text);
 $button = new SubmitInput('Submit');
 $replyform->append($button);
 $messagenum = isset($_GET['messagenum']) ? $_GET['messagenum'] : 0;
 $threadid = isset($_GET['threadid']) ? $_GET['threadid'] : 0;
 if ($messagenum > 0) {
     $messagevals = get_items($dbh, "threadid, created", "subboard", "messageid", $messagenum);
     $threadid = $messagevals[0][0];
     if (!$threadid) {
         $error_message = new AlertText("The message you requested has been deleted or does not exist.", 'Error');
         $thispage->append($error_message);
         interface_disp_page($thispage);
         stop();
     }
     $my_result = mysql_query("Select COUNT(*) From subboard WHERE userid != 0 AND created >= \"" . $messagevals[0][1] . "\" and threadid=\"" . $threadid . "\"");
     $pagefind = mysql_fetch_row($my_result);
     $pagenumber = floor($pagefind[0] / NOTES_MSGS_PER_PAGE);
 }
 $my_result = mysql_query("Select COUNT(*) From subboard WHERE userid != 0 AND threadid=\"" . $threadid . "\"");
 $totalmessages = mysql_fetch_row($my_result);
 $pagenumber = isset($_GET['pagenumber']) ? $_GET['pagenumber'] : 0;
 if (!($pagenumber > 0)) {
예제 #15
0
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        <h1>Items</h1>
      </div>
    </div>
  </div>
</div>
<div class="section">
  <div class="container">
    <div class="row">
      <div class="col-md-12">
          <ul class="media-list">
              <?php 
require_once 'db.php';
$items = get_items();
foreach ($items as $item) {
    echo "\n                  <li class=\"media\">\n                      <a class=\"pull-left\" href=\"#\">\n                        <img class=\"media-object\" src=\"images/gallery/" . $item['name'] . "\" height=\"64\" width=\"64\">\n                      </a>\n\n                      <div class=\"media-body\">\n                        <h4 class=\"media-heading\">'{$item['title']}'</h4>\n                        <p>'{$item['description']}'</p>\n                      </div>\n                   </li>";
}
?>

          </ul></div></div></div></div><div class="section">
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        <h1>Add new item</h1>
      </div>
    </div>
  </div>
</div><div class="section">
  <div class="container">
function prereq_edit_settings_page()
{
    $semantic = WP_PLUGIN_URL . '/panomanager/css/semantic.css';
    $domains = get_domains();
    $items = get_items();
    $item_types = get_item_types();
    $prereq = null;
    $prereq_id = null;
    if (isset($_GET['pano_id']) && is_numeric($_GET['pano_id'])) {
        $prereq = get_pano_prereq($_GET['pano_id']);
        $prereq_id = $prereq->id;
    }
    $prereq_items = get_prereq_items($prereq_id);
    $selected_items = array();
    foreach ($prereq_items as $selected_item) {
        array_push($selected_items, $selected_item->item_id);
    }
    ?>
<link rel="stylesheet" type="text/css" href="<?php 
    echo $semantic;
    ?>
"/>
<h2>Edit your Prereqs!</h2>
<hr>

<form id="form" method="post" enctype="multipart/form-data" action="<?php 
    echo get_admin_url() . 'admin-post.php';
    ?>
">
  <!-- pano processing hook -->
  <input type="hidden" name="action" value="edit_prereq" />
  <input type="hidden" name="id" value="<?php 
    echo $prereq->id;
    ?>
" />
  <input type="hidden" name="pano_id" value="<?php 
    echo $prereq->pano_id;
    ?>
" />
  <div class="ui form segment new_prereq_form">
    <div class="ui form">
      <div class="field">
        <label for="prereq_pts">Prereq Points</label>
        <input type="number" name="prereq_pts" id="prereq_pts" placeholder="100" value="<?php 
    echo $prereq->prereq_pts;
    ?>
"required />
      </div>
    </div>
    <input type="hidden" name="prereq_domain_id" value="NA" />
    <div class="ui form">
      <div class="field">
        <label for="prereq_desc">Prereq Info</label>
        <textarea name="prereq_desc" id="prereq_desc" required ><?php 
    echo $prereq->prereq_desc;
    ?>
</textarea>
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label for="item_type">Filter by Item Type</label>
        <select name="item_type" id="item_type" class="ui dropdown">
          <option value="NA">All items</option>
          <?php 
    foreach ($item_types as $item_type) {
        ?>
          <option value="<?php 
        echo $item_type->id;
        ?>
"><?php 
        echo $item_type->name;
        ?>
</option>
          <?php 
    }
    ?>
        </select>
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label>Items<span id="item_limit"> - maximum of 5 items</span></label>
        <ul>
          <?php 
    foreach ($items as $item) {
        ?>
            <?php 
        if (in_array($item->id, $selected_items)) {
            ?>
            <li class="games_form item <?php 
            echo $item->type_id;
            ?>
">
              <input type="checkbox" id="<?php 
            echo $item->id;
            ?>
" name="items[]" value="<?php 
            echo $item->id;
            ?>
" checked>
              <label for="<?php 
            echo $item->id;
            ?>
"><?php 
            echo $item->name;
            ?>
</label>
            </li>
            <?php 
        } else {
            ?>
            <li class="games_form item <?php 
            echo $item->type_id;
            ?>
">
              <input type="checkbox" id="<?php 
            echo $item->id;
            ?>
" name="items[]" value="<?php 
            echo $item->id;
            ?>
">
              <label for="<?php 
            echo $item->id;
            ?>
"><?php 
            echo $item->name;
            ?>
</label>
            </li>
            <?php 
        }
        ?>
          <?php 
    }
    ?>
        </ul>
      </div>
    </div>
    <?php 
    submit_button();
    ?>
  </div>
</form>
<script type="text/javascript">
  // Hiding error message
  jQuery('#item_limit').hide();

  // Event listener
  jQuery('#item_type').change(function(){
    filterTypes();
  });
  jQuery(':checkbox').change(function(){
    restrictItems();
  });
  jQuery('#form').submit(function(e){
    if(!restrictItems()){
      e.preventDefault();
    }
  });

  // Filters items based on user selection of item type.
  function filterTypes(){
    if(jQuery('#item_type').val() == 'NA'){
      jQuery('.item').each(function(){
        jQuery(this).show();
      });
    } else {
      var typeId = jQuery('#item_type').val();
      jQuery('.item').each(function(){
        jQuery(this).hide();
      });
      jQuery('.item').each(function(){
        jQuery('.' + typeId).each(function(){
          jQuery(this).show();
        });
      });
    }
  }

  // Displays a message if user picks more than [qty] items.
  // Prevents form submission if user picks more than [qty] items.
  function restrictItems(){
    var qty = 5;
    var allowSend = false;
    if(jQuery(':checkbox:checked').length > qty){
      jQuery('#item_limit').show();
      jQuery('#item_limit').css({'color': 'red', 'font-weight': 'bold'});
      allowSend = false;
    } else {
      jQuery('#item_limit').hide();
      allowSend = true;
    }
    return allowSend;
  }
</script>
<?php 
}
예제 #17
0
<?php

include_once './global.php';
include "./header.php";
function get_items($db, $orderid)
{
    $sql = "SELECT * FROM `wm_order_items` WHERE `orderid`='{$orderid}'";
    return $db->query($sql)->fetchall();
}
if (isset($_SESSION['email'])) {
    $smarty->assign("tag", 1);
    $orders = get_userhistroyorders($db, $_SESSION['email']);
    foreach ($orders as $row) {
        $shopnames[$row['orderid']] = get_shopname($db, $row['shopid']);
        $orderitems[$row['orderid']] = get_items($db, $row['orderid']);
    }
    $smarty->assign("orderitems", $orderitems);
    $smarty->assign("shopnames", $shopnames);
    $smarty->assign("orders", $orders);
}
$smarty->display("ordercenter.tpl");
include "./footer.php";
예제 #18
0
	<body>
		<div id="header">
			<a id="home" href="."></a>
			<div id="quickbasket"><p><a <?if(count($_SESSION["basket"])>0){echo('class="highlight"');}?> href="basket.php"><?echo count($_SESSION["basket"])?> item<?echo count($_SESSION["basket"])!=1?"s":"";?> in basket</a></p></div>
			<ul id="menu">
				<li><a href=".">Home</a></li>
				<li><a href="catalogue.php">Catalogue</a></li>
				<li><a href="company.php">Company</a></li>
				<li><a href="contact.php">Contact</a></li>
			</ul>
		</div>
		<div id="wrapper">
			<div class="text">
				<h1><img src="images/h/catalogue.png" alt="Catalogue" /></h1>
				<div id="selector">
<?get_items();?>
					<div class="clearer"></div>
				</div>
				<div id="presentation">
					<?php 
$mysql_query = sprintf("SELECT * FROM `items` WHERE `id`=%s", $id);
$mysql_result = mysql_query($mysql_query, $mysql_link);
$r = mysql_fetch_assoc($mysql_result);
$size = "<option>" . str_replace(",", "</option><option>", $r["size"]) . "</option>";
$color = "<option>" . str_replace(",", "</option><option>", $r["color"]) . "</option>";
?>
					<h2><?echo $r["name"];?></h2>
					<h3>$<?echo number_format($r["price"],$decimals=2);?></h3>
					<img src="images/products/<?echo $id;?>.jpg" alt="<?echo $id;?>" />
					<p><?echo $r["description"];?></p>
					<form id="add" action="basket.php" method="get">
예제 #19
0
if (current_user()->isConnected()) {
    echo 'style="margin-top:40px"';
}
?>
>
    <div id="top-bar">
        <div class="container">
            <div class="row">
            	<div class="col-sm-7 hidden-xs top-info">
					<?php 
get_items('header_datas');
?>
                </div>
                <div class="col-sm-5 top-info">
                	<?php 
get_items('social_feeds');
?>
                </div>
            </div>
        </div>
    </div>
    <!-- LOGO bar -->
    <div id="logo-bar" class="clearfix"> 
        <!-- Container -->
        <div class="container">
            <div class="row"> 
                <!-- Logo / Mobile Menu -->
                <div class="col-xs-12">
                    <div id="logo">
                        <h1><a class="brand" style="padding:10px;" href="<?php 
echo get_instance()->url->main_url();
예제 #20
0
<?php

get_items('slider');
get_items('list_services');
get_items('testimony');
$this->sidebar_bottom();
예제 #21
0
<?php

$theme_style = get_items('theme_color_and_style');
?>
<body class="<?php 
echo riake('bg_image', $theme_style);
?>
">
	<?php 
echo current_user("menu");
?>
    
	<!--Start Header-->
    <?php 
echo get_core_vars('theme_header');
?>
	<!--End Header-->
	<?php 
echo get_core_vars('module_content');
?>
   

	<?php 
echo get_core_vars('theme_footer');
?>
</body>
</html>
/**
 * Returns items of a particular Zotero item type. Uses the Item Type element in
 * the Zotero element set.
 *
 * @param string $typeName Search items with this Zotero item type.
 * @param int|null $collectionId Search only in this collection.
 * @param int $limit Maximum number of items to return.
 * @return array An array containing item results.
 */
function zotero_import_get_items_by_zotero_item_type($typeName, $collectionId = null, $limit = 10)
{
    $db = get_db();
    // Get the Zotero:Item Type element
    $element = $db->getTable('Element')->findByElementSetNameAndElementName('Zotero', 'Item Type');
    // Using the advanced search interface, get a limited set of items that have
    // the provided Zotero:Item Type.
    $items = get_items(array('collection' => $collectionId, 'recent' => true, 'advanced_search' => array(array('type' => 'contains', 'element_id' => $element->id, 'terms' => $typeName))), $limit);
    return $items;
}
예제 #23
0
    if ($s = $i->prepare("UPDATE ITEMS SET ARCHIVED = 1 WHERE ID = ? AND OWNER = ?")) {
        foreach ($ids as $i) {
            $s->bind_param('is', $i, $_SESSION['user-id']);
            if (!$s->execute()) {
                $errors[] = $i->error;
            }
        }
        $s->close();
        if (count($errors)) {
            error_log("Encountered errors while archiving items: " . print_r($errors, true));
        }
    } else {
        error_log("There was an error while preparing the item archive statement: {$i->error}");
    }
    json_error("There was actually no error...");
}
$action = array_get($_POST, "a", "dump");
switch ($action) {
    case 'dump':
        echo get_items($i);
        break;
    case 'add':
        echo add_item($i, $_POST['title'], $_POST['parent']);
        break;
    case 'save':
        echo save_items($i, $_POST['items']);
        break;
    case 'archive':
        echo archive_items($i, $_POST['ids']);
        break;
}
예제 #24
0
     if (!$showform) {
         header('Location: board_messages.php?threadid=' . $threadid);
     }
 }
 if ($showform) {
     $messageform = new Form('notesform', true);
     $thispage->append($messageform);
     if ($newthread) {
         $title = new TextInput('threadtitle', $threadtitle);
         $title->title = 'Thread Title:';
         $hid = new HiddenInput('newthread', 1);
         $messageform->append($title);
         $messageform->append($hid);
     }
     //if ($newthread)
     $boardsize = get_items($dbh, "edit_cols,edit_rows", "accounts", "userid", $idcookie);
     //get the users chosen box size
     if ($boardsize[0][1] < 1) {
         $boardsize[0][0] = 70;
     }
     if ($boardsize[0][2] < 1) {
         $boardsize[0][1] = 14;
     }
     $message = new TextInput('messagetitle', $messagetitle);
     $message->title = 'Message Title:';
     $messageform->append($message);
     $messagecontents = new TextareaInput('messagecontents', $messagecontents);
     $messagecontents->title = 'Message Contents:';
     $messagecontents->rows = $boardsize[0][1];
     $messagecontents->cols = $boardsize[0][0];
     $messageform->append($messagecontents);
예제 #25
0
<?php

/**
 * Template created by Gregory Chris
 */
load_model('admin/tutorials');
$params = array();
if (is_numeric($GLOBALS['url_params'][0]) && $GLOBALS['url_params'][0] > 0) {
    $params['item'] = get_items($GLOBALS['url_params'][0]);
} else {
    $params['items'] = get_items();
}
load_view('admin/tutorials', $params);
function remove_cost_entries($_POST)
{
    extract($_POST);
    db_connect();
    if (isset($remcost)) {
        $rem_sql = "DELETE FROM purch_batch_entries_newcostcenters WHERE id = '{$remcost}'";
        $run_rem = db_exec($rem_sql) or errDie("Unable to remove batch entry.");
    }
    return get_items($_POST);
}
function prereq_new_settings_page()
{
    $semantic = WP_PLUGIN_URL . '/panomanager/css/semantic.css';
    $domains = get_domains();
    $items = get_items();
    $item_types = get_item_types();
    $pano_id = null;
    if (isset($_GET['pano_id']) && is_numeric($_GET['pano_id'])) {
        $pano_id = $_GET['pano_id'];
    }
    ?>
<link rel="stylesheet" type="text/css" href="<?php 
    echo $semantic;
    ?>
"/>
<h2>Create a new Prereq!</h2>
<hr>
<form method="post" enctype="multipart/form-data" action="<?php 
    echo get_admin_url() . 'admin-post.php';
    ?>
">
  <!-- pano processing hook -->
  <input type="hidden" name="action" value="create_new_prereq" />
  <input type="hidden" name="pano_id" value="<?php 
    echo $pano_id;
    ?>
" />
  <div class="ui form segment new_prereq_form">
    <div class="ui form">
      <div class="field">
        <div class="ui left labeled icon input">
          <label for="prereq_pts">Prereq Points</label>
          <input type="number" name="prereq_pts" id="prereq_pts" placeholder="100" required />
        </div>
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label for="prereq_domain_id">Select a Prereq Domain</label>
        <select name="prereq_domain_id">
          <option value="NA">...</option>
          <?php 
    foreach ($domains as $domain) {
        ?>
          <option value="<?php 
        echo $domain->id;
        ?>
"><?php 
        echo $domain->name;
        ?>
</option>
          <?php 
    }
    ?>
        </select>
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label for="prereq_desc">Prereq Info</label>
        <textarea name="prereq_desc" id="prereq_desc"  required ></textarea>
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label for="item_type">Filter by Item Type</label>
        <select name="item_type" id="item_type" class="ui dropdown">
          <option value="">All items</option>
          <?php 
    foreach ($item_types as $item_type) {
        ?>
          <option value="<?php 
        echo $item_type->id;
        ?>
"><?php 
        echo $item_type->name;
        ?>
</option>
          <?php 
    }
    ?>
        </select>
      </div>
    </div>
    <div class="ui form">
      <div class="field">
        <label>Items</label>
        <ul>
          <?php 
    foreach ($items as $item) {
        ?>
          <li class="games_form">
            <input type="checkbox" id="<?php 
        echo $item->id;
        ?>
" name="items[]" value="<?php 
        echo $item->id;
        ?>
">
            <label for="<?php 
        echo $item->id;
        ?>
"><?php 
        echo $item->name;
        ?>
</label>
          </li>
          <?php 
    }
    ?>
        </ul>
      </div>
    </div>
    <?php 
    submit_button();
    ?>
  </div>
</form>
<?php 
}
예제 #28
0
    }
    return null;
}
$urls = array_merge(get_page_urls('http://wiki.guildwars2.com/index.php?title=Category:Renown_heart_NPCs'), get_page_urls('http://wiki.guildwars2.com/index.php?title=Category:Renown_heart_NPCs&from=Magister%20Kathryn'), get_page_urls2('http://wiki.guildwars2.com/wiki/Karma_merchant'), get_page_urls('http://wiki.guildwars2.com/wiki/Category:Vendor_inventory_tables'), array('http://wiki.guildwars2.com/wiki/Rojan_the_Penitent'));
if (in_array('--all', $argv)) {
    $urls = array_merge(get_page_urls('http://wiki.guildwars2.com/index.php?title=Category:Merchants'), get_page_urls('http://wiki.guildwars2.com/index.php?title=Category:Merchants&pagefrom=Hajo'), get_page_urls('http://wiki.guildwars2.com/index.php?title=Category:Merchants&pagefrom=Radarr Boommaker'));
}
$urls = array_unique($urls);
var_dump($urls);
$stmt_coin = Propel::getConnection()->prepare("UPDATE item SET\n                                              vendor_price = :vendor_price\n                                          WHERE name = :name OR name = :names");
$stmt_karma = Propel::getConnection()->prepare("UPDATE item SET\n                                              karma_price = :karma_price\n                                          WHERE name = :name OR name = :names");
// fix for some words where the plural is irregular
$singular = array("Tomatoe" => "Tomato", "Cherrie" => "Cherry", "Peache" => "Peach", "Buttermilk" => "Glass of Buttermilk", "Rice" => "Rice Ball", "Sour Cream" => "Bowl[s] of Sour Cream", "Yeast" => "Packet[s] of Yeast");
var_dump(count($urls));
foreach ($urls as $url) {
    if ($vendor = get_items($url)) {
        foreach ($vendor['items'] as $item) {
            $field = '';
            $price = 0;
            if ($item['price']['karma']) {
                $stmt = $stmt_karma;
                $field = 'karma_price';
                $price = $item['price']['karma'];
            } elseif ($item['price']['coin']) {
                $stmt = $stmt_coin;
                $field = 'vendor_price';
                $price = $item['price']['coin'];
            } else {
                echo "!! NO COIN NOR KARMA FOUND FOR {$item['name']} !!";
                continue;
            }
예제 #29
0
function item_settings_page()
{
    $items = get_items();
    $semantic = WP_PLUGIN_URL . '/panomanager/css/semantic.css';
    $new_item_url = admin_url() . 'admin.php?page=new_item_settings';
    $edit_item_url = admin_url() . 'admin.php?page=edit_item_settings';
    $pano_editor = admin_url() . "admin.php?page=view_panos_settings";
    ?>

<link rel="stylesheet" type="text/css" href="<?php 
    echo $semantic;
    ?>
"/>
<style>
#wpfooter{
  display: none;
}
</style>
<p>Manage your items!</p>
<hr>

<?php 
    if (isset($_GET['settings-saved'])) {
        ?>
    <div class="updated"><p>Settings saved successfully.</p></div>
<?php 
    }
    ?>

<h2>Items</h2>
    <table class="ui table segment">
        <tr>
            <th>Item</th>
            <th>Item Info</th>
            <th>Image</th>
            <th>Price</th>
            <th>Item Type</th>
            <th>Edit</th>
            <th>Delete</th>
            <th>Create Hotspot</th>
        </tr>
        <?php 
    foreach ($items as $item) {
        ?>
            <tr>
                <td><?php 
        echo $item->name;
        ?>
</td>
                <td><?php 
        echo $item->description;
        ?>
</td>
                <td><?php 
        echo $item->image;
        ?>
</td>
                <td><?php 
        echo $item->price;
        ?>
</td>
                <td><?php 
        echo get_item_type($item->type_id)->name;
        ?>
</td>
                <td><a class="ui blue icon button" style="padding: 7px" href="<?php 
        echo $edit_item_url;
        ?>
&id=<?php 
        echo $item->id;
        ?>
">Edit</a> </td>
                <td>
                    <form method="post" action="admin-post.php" id="delete_item_form<?php 
        echo $item->id;
        ?>
">
                        <input type="hidden" name="action" value="delete_item"/>
                        <input type="hidden" name="item_id" value="<?php 
        echo $item->id;
        ?>
"/>
                        <input type="submit" class="ui blue icon button" style="padding: 7px" value="Delete" />
                    </form>
                </td>
                <td>
                    <form method="POST" action="<?php 
        echo $pano_editor;
        ?>
">
                        <input name="item_id" type="hidden" value="<?php 
        echo $item->id;
        ?>
">
                        <input class="ui blue icon button" style="padding: 7px" type="submit" value="Create Hotspot" />
                    </form>
                </td>
            </tr>
        <?php 
    }
    ?>
    </table>
    <a class="ui blue icon button" style="padding: 7px" href="<?php 
    echo $new_item_url;
    ?>
">New Item</a>
    </div>
<?php 
}
예제 #30
0
function update_pool_content($selection = '', $id_parent = null, $id_ancestor = null)
{
    switch ($selection) {
        // General
        case 'supercat':
            $html = get_supercat_items();
            break;
            // Vins
        // Vins
        case 'cat-vins':
            $html = get_cat_vins_items();
            break;
        case 'regions-du-monde':
            $html = get_regions_monde_items();
            break;
        case 'pays':
            $html = get_items('v_all_pays', $id_parent, 'pays', 'nom_pays', 'id_pays');
            break;
        case 'regions':
            $html = get_items('v_all_regions', $id_parent, 'region', 'nom_region', 'id_region');
            break;
        case 'sous-regions':
            $html = get_items('v_all_sous_regions', $id_parent, 'sous-region', 'nom_sous_region', 'id_sous_region');
            break;
        case 'vins':
            $html = get_wines($id_parent, $id_ancestor);
            break;
            // Divers
        // Divers
        case 'promotions':
            $html = get_promotions();
            break;
        case 'divers':
            $cat_vin = $id_ancestor == 'undefined' ? $id_parent : $id_ancestor;
            $id_cat_vin = substr($cat_vin, -1);
            if ($id_cat_vin <= 5) {
                $html .= get_vins_au_verre($id_cat_vin);
            }
            if ($id_cat_vin <= 5) {
                $html .= get_demi_bouteilles($id_cat_vin);
            }
            break;
            // Alcool
        // Alcool
        case 'cat-alcool':
            //$html = get_cat_alcool_items();
            break;
        case 'alcools':
            //$html = get_alcools();
            break;
    }
    echo $html;
}