$val = trim($_REQUEST[$accountKey]); if ($val === $Spreadsheet_ID) { $displayStr = ' <html> <head> <title> Welcome--SKSC GiftCard Ordering </title> </head> <body> <table align="center"> <tr> <td><image src="sksc.jpg"></td> </tr> '; $packagedData = getTemplateInfo(); $Order_Deadline = $packagedData[2]; $deadline_date = strtotime($Order_Deadline); $today = time(); $deadline_str = date("Y-m-d", $deadline_date); $today_str = date("Y-m-d", $today); if ($today_str <= $deadline_str || array_key_exists($accountKey2, $_REQUEST)) { $displayStr .= ' <tr> <td><h1>Gift Card Order Form</h1>Enter Your SKSC Account Email</td> </tr> <tr> <form method="post" action="welcome_validate.php" autocomplete="on"> <td> <input type="email" name="AccountEmail" size="20"/> <input type="submit" id="go" value="Go" />
static public function gridParser($id){ //include less compiler $template = getTemplateInfo($id); if ( ! class_exists( 'ultimatum_less' ) ) include_once(ULTIMATUM_ADMIN_HELPERS . DS . 'less.inc.php'); $less = new ultimatum_less; $gridwork = $template->gridwork; $responsive = true; if($template->type==0) $responsive = false; switch ($gridwork){ case 'tbs': $width = $template->width; $rawmargin = $template->margin; $grid_width = ($width-(11*$rawmargin))/12; $less_file = 'tbs2/swatchmaker.less'; if($responsive){ $responsive_less_file = 'tbs2/swatchmaker-responsive.less'; } if($template->cdn=='yes'){ // $responsive_less_file = false; $less_file = 'tbs2/swatchmaker-cdn.less'; } $lessarray = array( "um-width-md" => ($width)."px", "um-width-lg" => ($template->mwidth)."px", "um-width-sm" => ($template->swidth)."px", "gridColumnWidth"=>$grid_width."px", "gridGutterWidth"=>$rawmargin."px", "gridColumnWidth1200" => (($template->mwidth-(11*$template->mmargin))/12).'px', "gridGutterWidth1200" => $template->mmargin.'px', "gridColumnWidth768" => (($template->swidth-(11*$template->smargin))/12).'px', "gridGutterWidth768" => $template->smargin.'px', "swatch" => strtolower($template->swatch), ); break; case 'tbs3': $responsive_less_file = false; $width = $template->width; $rawmargin = $template->margin; $lessarray = array( "grid-gutter-width" => $template->margin."px", "container-tablet" => ($template->swidth)."px", "container-desktop" => ($width)."px", "container-large-desktop" =>($template->mwidth)."px", "um-width-md" => ($width-$rawmargin)."px", "um-width-lg" => ($template->mwidth-$rawmargin)."px", "um-width-sm" => ($template->swidth-$rawmargin)."px", "swatch" => strtolower($template->swatch), ); if(!$responsive){ $less_file = 'tbs3/swatchmaker.less'; } else { $less_file = 'tbs3/swatchmaker-responsive.less'; } if($template->cdn=='yes' && strtolower($template->swatch)!='amelia'){ $less_file = 'tbs3/swatchmaker-cdn.less'; } break; default: $less_file = '960/960gs.less'; if($responsive) $responsive_less_file = '960/960gs-responsive.less'; $width = $template->width; $rawmargin = $template->margin; $grid_width = ($width-(12*$rawmargin))/12; $lessarray = array( "um-width-md" => ($width-$rawmargin)."px", "um-width-lg" => ($template->mwidth-$template->mmargin)."px", "um-width-sm" => ($template->swidth-$template->smargin)."px", "gridColumnWidth"=>$grid_width."px", "gridGutterWidth"=>$rawmargin."px", "gridColumnWidth1200" => (($template->mwidth-(12*$template->mmargin))/12).'px', "gridGutterWidth1200" => $template->mmargin.'px', "gridColumnWidth768" => (($template->swidth-(12*$template->smargin))/12).'px', "gridGutterWidth768" => $template->smargin.'px', ); break; } $less->setVariables($lessarray); if(file_exists(THEME_DIR.DS.'less'.DS.$less_file)){ // this means user wants to make changes to less files $content = $less->compilefile(THEME_DIR.DS.'less'.DS.$less_file); if($responsive_less_file) $content .= $less->compilefile(THEME_DIR.DS.'less'.DS.$responsive_less_file); } else { $content = $less->compilefile(ULTIMATUM_DIR.DS.'assets'.DS.'less'.DS.$less_file); if($responsive_less_file) $content .= $less->compilefile(ULTIMATUM_DIR.DS.'assets'.DS.'less'.DS.$responsive_less_file); } return $content; }
function ultimatum_themes(){ echo '<div class="wrap">'; $task=false; if(isset($_GET['task'])) $task = $_GET['task']; switch ($task){ // default: if($_POST){ global $wpdb; if(isset($_POST['id'])){ if($_POST['gridwork']!="tbs3"){ $query = "REPLACE INTO `".ULTIMATUM_TABLE_TEMPLATES."` VALUES ('".$_POST['id']."','".$_POST['name']."','".$_POST['width']."','".$_POST['margin']."','".$_POST['mwidth']."','".$_POST['mmargin']."','".$_POST['swidth']."','".$_POST['smargin']."','".$_POST['gridwork']."','".$_POST['swatch']."','".$_POST['type']."','".$_POST['dcss']."','".$_POST['default']."','".$_POST['theme']."','".$_POST['cdn']."')"; } else { $query = "REPLACE INTO `".ULTIMATUM_TABLE_TEMPLATES."` VALUES ('".$_POST['id']."','".$_POST['name']."','".$_POST['width']."','".$_POST['margin']."','".$_POST['mwidth']."','".$_POST['mmargin']."','".$_POST['swidth']."','".$_POST['smargin']."','".$_POST['gridwork']."','".$_POST['swatch3']."','".$_POST['type']."','".$_POST['dcss']."','".$_POST['default']."','".$_POST['theme']."','".$_POST['cdn']."')"; } } else { if($_POST['gridwork']!="tbs3"){ $query = "INSERT INTO `".ULTIMATUM_TABLE_TEMPLATES."` (`name`,`width`,`margin`,`mwidth`,`mmargin`,`swidth`,`smargin`,`gridwork`,`swatch`,`type`,`dcss`,`default`,`theme`) VALUES ('".$_POST['name']."','".$_POST['width']."','".$_POST['margin']."','".$_POST['mwidth']."','".$_POST['mmargin']."','".$_POST['swidth']."','".$_POST['smargin']."','".$_POST['gridwork']."','".$_POST['swatch']."','".$_POST['type']."','".$_POST['dcss']."','".$_POST['default']."','".$_POST['theme']."','".$_POST['cdn']."')"; } else { $query = "INSERT INTO `".ULTIMATUM_TABLE_TEMPLATES."` (`name`,`width`,`margin`,`mwidth`,`mmargin`,`swidth`,`smargin`,`gridwork`,`swatch`,`type`,`dcss`,`default`,`theme`) VALUES ('".$_POST['name']."','".$_POST['width']."','".$_POST['margin']."','".$_POST['mwidth']."','".$_POST['mmargin']."','".$_POST['swidth']."','".$_POST['smargin']."','".$_POST['gridwork']."','".$_POST['swatch3']."','".$_POST['type']."','".$_POST['dcss']."','".$_POST['default']."','".$_POST['theme']."','".$_POST['cdn']."')"; } } $wpdb->query($query); $template_id = $wpdb->insert_id; WonderWorksCSS::saveCSS($template_id,'template'); ?> <script type="text/javascript"> parent.location.href='./admin.php?page=wonder-templates'; </script> <?php } themesMainScreen(); break; case 'createChild': createChild(); break; case 'deletetemplate': deleteTheme(); break; case 'export': Ultimatum_Exporter(); break; case 'import': importThemeForm(); break; case 'row-edit': RowEditor(); break; case 'row-styles': RowStyles(); break; case 'edit': $template=null; if(isset($_REQUEST["template_id"])) $template = getTemplateInfo($_REQUEST["template_id"]); ultimatum_editTemplate($template); break; case 'default': makeDefault(); break; case 'mobileass': mobileAssign(); break; } echo '</div>'; }
function cssDefaults(){ global $theme_options; require_once ULTIMATUM_ADMIN_HELPERS.DS.'class.options.php'; echo '<div class="wrap ultwrap">'; global $wpdb; if(isset($_GET["layout_id"])){ $fetch = getLayoutInfo($_GET["layout_id"]); $editing_now= $fetch->title; $defpage = "admin.php?page=wonder-css&layout_id=".$_GET["layout_id"]; } elseif(isset($_GET["template_id"])){ $fetch=getTemplateInfo($_GET["template_id"]); $editing_now= $fetch->name; $defpage = "admin.php?page=wonder-css&template_id=".$_GET["template_id"]; } if(!$fetch){ echo '<h2>No Templates / Layouts Selected</h2>'; return; } else { // CSS Editors OFF function if($fetch->dcss=='yes'): ?> <script type='text/javascript' src='<?php echo ULTIMATUM_ADMIN_ASSETS;?>/js/codemirror/lib/codemirror.js'></script> <script type='text/javascript' src='<?php echo ULTIMATUM_ADMIN_ASSETS;?>/js/codemirror/mode/css/css.js'></script> <link rel="stylesheet" media="screen" type="text/css" href="<?php echo ULTIMATUM_ADMIN_ASSETS;?>/js/codemirror/lib/codemirror.css" /> <div class="ultadmnavi" style="position:absolute;top:0;width:100%;margin-right:25px;"> <div class="navbar" id="ult-nav"> <div class="navbar-inner"> <a class="brand" href="<?php echo $defpage; ?>"><CSS><?php echo $editing_now; ?></a> <ul class="nav"> <li> <a href="javascript: history.go(-1)">Back</a> </li> </ul> <ul class="nav pull-right"> <li class=""><button class="btn-info btn" id="setting-submit"><i class="fa fa-save"></i> Save Changes</button></li> </ul> </div> </div> </div> <?php if(isset($_REQUEST['layout_id'])){ $layout_id = $_REQUEST['layout_id']; $cssfile = THEME_SLUG.'_custom_css_'.$layout_id; } elseif($_REQUEST['template_id']){ $layout_id = $_REQUEST['template_id']; $cssfile = THEME_SLUG.'_custom_template_css_'.$layout_id; } if($_POST){ update_option($cssfile,$_POST['custom_css']); } $css=get_option($cssfile); ?> <form method="post" action="" id="css-editor-form"> <textarea id="custom_css" name="custom_css"> <?php echo $css; ?> </textarea> <input type="submit" class="btn btn-info" value="save"/> </form> <script type="text/javascript"> var editor = CodeMirror.fromTextArea(document.getElementById("custom_css"), { mode: "text/css", styleActiveLine: true, lineNumbers: true, lineWrapping: true} ); </script> <?php else: if(isset($_GET['task'])): $task = $_GET['task']; $tbg = include_once ULTIMATUM_ADMIN_OPTIONS.DS.'css'.DS.$_GET['task'].'.php'; else: $task = false; $tbg = include_once ULTIMATUM_ADMIN_OPTIONS.DS.'css-options.php'; endif; ?> <style> .wp-picker-holder{position:absolute;z-index:999} </style> <div class="ultadmnavi" style="position:absolute;top:0;width:100%;margin-right:25px;"> <div class="navbar" id="ult-nav"> <div class="navbar-inner"> <a class="brand" href="<?php echo $defpage; ?>">{CSS} <?php echo $editing_now; ?></a> <ul class="nav"> <li <?php if(!$task) echo ' class="active"' ;?>> <a href="<?php echo $defpage; ?>"><?php _e('Basics','ultimatum');?></a> </li> <li class="dropdown <?php if($task=="post" || $task=="comment"|| $task=="widget") {echo ' active' ;}?>" > <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('Core WP','ultimatum');?><b class="caret"></b></a> <ul class="dropdown-menu" role="menu" > <li <?php if($task=="post") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=post'; ?>"><?php _e('Posts','ultimatum');?></a></li> <li <?php if($task=="comment") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=comment'; ?>"><?php _e('Comments','ultimatum');?></a></li> <li <?php if($task=="widget") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=widget'; ?>"><?php _e('Widgets','ultimatum');?></a></li> </ul> </li> <li class="dropdown <?php if($task=="hm" ||$task=="mdm" ||$task=="ultimatum-menu" || $task=="hmm"|| $task=="hdm"|| $task=="vm"|| $task=="vmm"|| $task=="vdm") {echo ' active' ;}?>" > <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('Menus','ultimatum');?><b class="caret"></b></a> <ul class="dropdown-menu" role="menu" > <li <?php if($task=="hm") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=hm'; ?>"><?php _e('Horizontal','ultimatum');?></a></li> <li <?php if($task=="hmm") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=hmm'; ?>"><?php _e('Horizontal Mega','ultimatum');?></a></li> <li <?php if($task=="hdm") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=hdm'; ?>"><?php _e('Horizontal Dropdown','ultimatum');?></a></li> <li <?php if($task=="vm") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=vm'; ?>"><?php _e('Vertical','ultimatum');?></a></li> <li <?php if($task=="vmm") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=vmm'; ?>"><?php _e('Vertical Mega','ultimatum');?></a></li> <li <?php if($task=="vdm") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=vdm'; ?>"><?php _e('Vertical Dropdown','ultimatum');?></a></li> <li <?php if($task=="ultimatum-menu") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=ultimatum-menu'; ?>"><?php _e('Ultimatum Menu','ultimatum');?></a></li> <li <?php if($task=="mdm") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=mdm'; ?>"><?php _e('Mobile Menus','ultimatum');?></a></li> </ul> </li> <li class="dropdown <?php if($task=="tabs" || $task=="togglers"|| $task=="accord"|| $task=="bcum"|| $task=="slides") {echo ' active' ;}?>" > <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('Extras','ultimatum');?><b class="caret"></b></a> <ul class="dropdown-menu" role="menu" > <!-- <li <?php if($task=="bcum") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=bcum'; ?>"><?php _e('Breadcrumbs and Pagination','ultimatum');?></a></li> --> <li <?php if($task=="tabs") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=tabs'; ?>"><?php _e('Tabs','ultimatum');?></a></li> <li <?php if($task=="togglers") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=togglers'; ?>"><?php _e('Togglers','ultimatum');?></a></li> <li <?php if($task=="accord") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=accord'; ?>"><?php _e('Accordions','ultimatum');?></a></li> <li <?php if($task=="slides") echo ' class="active"' ;?>><a tabindex="-1" href="<?php echo $defpage.'&task=slides'; ?>"><?php _e('Slideshows','ultimatum');?></a></li> </ul> </li> <?php if(isset($_GET["layout_id"])){?> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('Custom CSS','ultimatum');?><b class="caret"></b></a> <ul class="dropdown-menu" role="menu" > <li><a href="./index.php?page=ultimatum-custom-css&template_id=<?php echo $fetch->theme;?>&TB_iframe=1&width=770&height=480" class="thickbox" title="<?php _e('Type your Custom CSS', 'ultimatum');?>"><?php _e('Template wide Custom CSS', 'ultimatum');?></a></li> <li><a class="thickbox" href="./index.php?page=ultimatum-custom-css&?layout_id=<?php echo $_GET["layout_id"];?>&TB_iframe=1&width=770&height=480" title="<?php _e('Type your Custom CSS', 'ultimatum');?>"> <?php _e('Layout Specific Custom CSS', 'ultimatum');?></a></li> </ul> </li> <li> <a href="<?php echo "admin.php?page=wonder-layout&task=edit&layoutid=".$_GET["layout_id"].'&theme='.$fetch->theme; ?>"><?php _e('Back To Layout Editor','ultimatum');?></a> </li> <?php } else { ?> <li><a href="./index.php?page=ultimatum-custom-css&template_id=<?php echo $_GET["template_id"];?>&TB_iframe=1&width=770&height=480" class="thickbox" title="<?php _e('Type your Custom CSS', 'ultimatum');?>"><?php _e('Template wide Custom CSS', 'ultimatum');?></a></li> <li> <a href="javascript: history.go(-1)">Back</a> </li> <?php } ?> </ul> <ul class="nav pull-right"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php _e('Advanced','ultimatum');?><b class="caret"></b></a> <ul class="dropdown-menu" role="menu" > <li ><a tabindex="-1" id="reset-form">Reset Section</a></li> </ul> </li> <li class=""><button class="button button-primary" id="setting-submit"><?php _e('Save Changes','ultimatum');?></button></li> </ul> </div> </div> </div> <?php if(!$task) { ?> <?php /* if(isset($_GET["layout_id"])){ <table class="widefat"> <thead><tr><th><?php _e('Copy CSS From another Layout', 'ultimatum');?></th></tr></thead> <tbody> <tr valign="top"><td> <form method="post" action="admin.php?page=wonder-layout"> <?php _e('Copy CSS From', 'ultimatum');?> : <select name="source"> $defql = "SELECT * FROM $table WHERE `type`='full' AND `id`<>'$_GET[layout]'"; $lss = $wpdb->get_results($defql,ARRAY_A); if($lss){ foreach($lss as $ls){ echo '<option value="'.$ls[id].'">'.$ls[title].'</option>'; } } </select> <input type="hidden" name="cloneid" value="<?php echo $_GET[layout];?>" /> <input type="hidden" name="action" value="copycss" /> <input type="submit" value="Clone CSS" class="button-primary" /> </form></td></tr> </tbody> </table> <br /> <?php } */ ?> <?php } $onur = new optionGenerator($tbg["name"], $tbg["options"]);?> <?php endif; } echo '</div>'; }
function ultimatum_list_layouts(){ require_once('ultimatum-widgets.php'); global $wp_registered_widgets, $wp_registered_widget_controls; $sidebars_widgets = wp_get_sidebars_widgets(); global $wpdb; if(isset($_GET['delassigner'])){ $sql1 = "DELETE FROM `".ULTIMATUM_TABLE_LAYOUT_ASSIGN."` WHERE `post_type`='".$_GET['delassigner']."' AND `layout_id`='".$_GET['delposter']."'"; $wpdb->query($sql1); $url = "admin.php?page=wonder-layout&theme=".$_GET['theme']; echo '<script type="text/javascript">parent.location.href="'.$url.'"</script>'; } if($_POST){ switch ($_POST['action']){ case 'copycss': $tobecloned = $_POST["source"]; $cloneid = $_POST["cloneid"]; $option = get_option(THEME_SLUG.'_'.$tobecloned.'_css'); $newopt = update_option(THEME_SLUG.'_'.$cloneid.'_css', $option); $custom_css = get_option(THEME_SLUG.'_custom_css_'.$tobecloned); if(strlen($custom_css)) update_option(THEME_SLUG.'_custom_css_'.$cloneid,$custom_css); unset($_POST); require_once (ULTIMATUM_ADMIN_HELPERS.DS.'class.css.saver.php'); WonderWorksCSS::saveCSS($cloneid); $url= 'admin.php?page=wonder-css&layout='.$cloneid; echo '<script type="text/javascript">parent.location.href="'.$url.'"</script>'; break; default: echo '<h3>Illegal operation</h3>'; break; } } $theme=$_REQUEST['theme']; $themeinfo = getTemplateInfo($theme); ?> <h2><?php _e('LAYOUTS','ultimatum')?> - <small><em>(<?php echo $themeinfo->name;?>)</em></small> <a class="add-new-h2 thickbox" href="<?php echo './index.php?page=layout-create&theme='.$_REQUEST['theme'].'&modal=true&TB_iframe=1&width=640&height=380'; ?>"><?php _e('Add New', 'ultimatum');?></a> <a class="add-new-h2 thickbox" href="<?php echo './index.php?page=layout-assigner&theme='.$_REQUEST['theme'].'&modal=true&TB_iframe=1&width=95%&height=100%'; ?>"><?php _e('Assign Layouts','ultimatum');?></a> <a class="add-new-h2" href="./admin.php?page=wonder-templates"><?php _e('Templates','ultimatum');?></a> </h2> <div id="ultimatum_layout_list"> <?php include(ULTIMATUM_ADMIN_AJAX.DS.'list-layouts.php') ;?> </div> <?php }
$inventory['categories'][$category][$id] = $vendor; $inventory['vendors'][$id] = $vendor; $id += 1; } } function getCurrentDateTime() { date_default_timezone_set('America/Los_Angeles'); //pacific time //year/mm/dd hh:mm $datetime = date("M") . '/' . date("d") . '/' . date("Y") . ' ' . date("H") . ':' . date("i"); return $datetime; } getAccountEmail(); if ($VisibleCtl) { $tempplateInfo = getTemplateInfo(); $Special_Messages = $tempplateInfo[0]; $PickupOptions = $tempplateInfo[1]; $Order_Deadline = $tempplateInfo[2]; $deadline_date = strtotime($Order_Deadline); $Order_Deadline_Display = date("M/d/Y", $deadline_date); $today = time(); $deadline_str = date("Y-m-d", $deadline_date); $today_str = date("Y-m-d", $today); if ($today_str <= $deadline_str) { $System_Enabled = true; getInventoryInfo(); } else { $System_Enabled = false; $Special_Messages = "Order deadline " . $Order_Deadline . " expired, cannot order Anymore. Please wait for next time"; }