function piclr_build($p) { $ra = msql_read('system', 'edition_colors', '', 1); //foreach($ra as $k=>$v)$rb[$i]=$v; $rb = array_keys($ra); $rand = array(4, 12, 24, 78, 14, 19, 44, 21, 32, 79); for ($i = 0; $i < 10; $i++) { $css .= '.clr' . $i . '{background-color:' . $rb[$rand[$i]] . ';}' . "\n"; } echo css_code($css); $pi = msql_read('', 'public_pi', '1', 1); $pi = substr($pi, 0, $p); //bcscale(20); $r = str_split(substr($pi, 2)); foreach ($r as $k => $v) { $ret .= btn('clr' . $v, $v) . " \n"; } return $ret; }
<?php if ($values) { foreach ($values as $v) { echo FileHelper::input_one($v, $field); ?> <?php } } ?> </div> <div style='clear:both;'></div> </div> <?php css_code(' .file .icon-remove{ position: absolute; top: 0px; right: 0px; } .file { width: 130px; float: left; position: relative; margin-right: 10px; margin-top: 10px; margin-bottom: 10px; } ');
/** * masonry/scroll images * * Example masonry: * * <code> * <?php * widget('masonry' , array('tag'=>'#masonry')); * css(" * #masonry li{ * list-style:none; * float:left; * margin-rigth:10px; * } * "); * ?> * <div id='masonry'> * <ul> * <?php for($j=1;$j<=50;$j++){?> * <?php for($i=1;$i<=6;$i++){?> * <li class='item'> * <?php echo image("upload/t/{$i}.jpg" , array( 'resize' => array(120)));?> * </li> * <?php }?> * <?php }?> * </ul> * </div> * </code> * Example scroll: * <code> * <?php * $data = \application\core\DB::pagination('file'); * $count = $data->pages->itemCount; * $size = $data->pages->pageSize; * $models = $data->models; * widget('masonry' , array( * 'tag'=>'#masonry', * 'scroll'=>true * )); * css(" * #masonry li{ * list-style:none; * float:left; * margin-rigth:10px; * } * "); * ?> * <div id='masonry'> * <ul> * <?php foreach($models as $v){?> * <li class='item'> * <?php echo image($v['path'] , array( 'resize' => array(120)));?> * </li> * <?php }?> * </ul> * </div> *</code> * * Example scroll 2: * * <code> * use application\core\Pagination; * $size = 20; * $arr = Pagination::img($post->img , $size); * $models = $arr['models']; * $pages = $arr['pages']; * $count = $arr['count']; * echo \application\core\Pagination::next($count,$size); * </code> */ function run() { core_js('jquery'); $base = publish(dirname(__FILE__) . '/assets'); $tag = $this->tag; $bottom = $this->bottom ? $this->bottom : true; $itemSelector = $this->itemSelector ? $this->itemSelector : '.item'; if (!$this->options['itemSelector']) { $this->options['itemSelector'] = $itemSelector; } $opts = CJavaScript::encode($this->options); if ($this->scroll === true) { if (true === $this->css) { css_code("\n\t\t\t\t#infscr-loading div{} \n\t\t\t\t\t\t#infscr-loading{clear:both; position: absolute;padding-left:10px;\n\t\t\t\t\t\tbottom: -25px;width: 200px;}#infscr-loading img{float: left;margin-right: 5px;}"); } if (!$this->options['loading']['img']) { $this->options['loading']['img'] = $base . "/ajax-loader.gif"; } if (!$this->options['loading']['msgText']) { $this->options['loading']['msgText'] = __('loading content……'); } if (!$this->options['loading']['finishedMsg']) { $this->options['loading']['finishedMsg'] = __('it is over'); } if (!$this->options['dataType']) { $this->options['dataType'] = 'html'; } if (!$this->options['navSelector']) { $this->options['navSelector'] = 'div.pagination'; } if (!$this->options['nextSelector']) { $this->options['nextSelector'] = 'div.pagination a'; } if (!$this->options['itemSelector']) { $this->options['itemSelector'] = $itemSelector; } $infinitescrollOpts = CJavaScript::encode($this->options); widget("imagesloaded", array('tag' => null)); js_code("\n\t\t\t\tvar \$container = \$('" . $tag . "');\n\t\t \t\t\$container.imagesLoaded(function(){\n\t\t\t \$container.masonry({$opts});\n\t\t\t }); \n\t\t\t\tvar \$container = \$('" . $tag . "');\n\t\t\t\t\t\$container.infinitescroll(" . $infinitescrollOpts . ", \n\t\t\t\t function( newElements ) { \n\t\t\t\t var \$newElems = \$( newElements ).css({ opacity: 0 });\n\t\t\t \$newElems.imagesLoaded(function(){\n\t\t\t \$newElems.animate({ opacity: 1 });\n\t\t\t \$container.masonry( 'applicationended', \$newElems, true ); \n\t\t\t });\n\n\t\t\t\t }\n\t\t\t\t); \n\t\t\t"); js($base . '/jquery.infinitescroll.js'); } else { js_code("\n\t\t\t\tvar \$container = \$('" . $tag . "');\n\t\t \t\t\$container.imagesLoaded(function(){\n\t\t\t \$container.masonry({$opts});\n\t\t\t }); \n\t\t\t"); } js($base . '/jquery.masonry.min.js'); js($base . '/jquery.imagesloaded.min.js'); }
function css_fontface($p, $b, $c, $o, $s, $u) { //page,cat,size,opt $csa = 'txtx'; $csb = 'txtred'; $jx = 'pop_'; if (!$b) { $b = 'all'; } $r = msql_read('server', 'edition_typos', '', 1); $n = count($r); asort($r); $rb['all'] = 1; $b = $b == '' ? 'unclassed' : $b; $gf = 'stylsff___'; $s = substr($s, 0, -1); if ($s) { $o = 'rch' . $s; } if (!is_file('msql/server/edition_typos.php')) { $ret .= lkc('txtyl', '?admin=fonts', 'update server_table') . br() . br(); } //rb//rd $ard = array('', 'fontsquirrel', 'fontspring', 'myfonts'); if ($r) { foreach ($r as $k => $v) { if ($v[1]) { $rb[$v[1]] = 1; } if (is_numeric($v[4])) { $rd[$v[4]] = $ard[$v[4]]; } } } // else $rd[$v[4]]=$v[4]; $rb['unclassed'] = 1; ksort($rb); $_SESSION['fntcat'] = $rb; //cat if ($b && $b != 'unclassed' && $b != 'all') { $hlp = divc('panel', helps($b, 'typos')) . br(); } foreach ($rb as $k => $v) { $mnu .= lj($k == $b ? $csb : $csa, $jx . $gf . '1_' . ajx($k) . '_' . $c . '_' . $o, $k) . ' '; } $mnu .= br(); $b = $b == 'unclassed' ? '' : $b; $pk = substr($o, 0, 3); $pv = substr($o, 3); if ($pv) { $pp[$pk] = $pv; } //rech $srch .= input2('text', 'srch" size="8" id="srchfnt', $pp['rch'] ? $pp['rch'] : 'search', ''); $srch .= ' ' . lj('popbt', $jx . $gf . '1_' . $b . '_' . $c . '_' . $o . '_srchfnt', 'ok') . ' '; $srch .= lj('popbt', $jx . $gf . '1_all', 'x'); //tri foreach ($r as $k => $v) { if (!$pv or ($pp['acc'] && $pp['acc'] == $v[2] or $pp['fav'] && $pp['fav'] == $v[3] or $pp['fam'] && $pp['fam'] == $v[4] or $pp['rch'] && stristr($v[0], $pp['rch']) !== false)) { if ($v[1] == $b or $b == 'all') { $rc[$k] = $v; } } } $n = count($rc); //pages $no = 20; $np = 10; $min = $p - $np; $max = $p + $np; $nb = ceil($n / $no); $bb = ajx($b); for ($i = 1; $i <= $nb; $i++) { if ($i == 1 or $i == $nb or $i > $min && $i < $max) { //$rtp.=lj(($i==$p?'active':''),$jx.$gf.$i.'_'.$bb.'_'.$c.'_'.$o,$i); $rtp .= lj($i == $p ? 'active' : '', $jx . $gf . $i . '_' . $bb . '_' . $c . '_' . $o, $i) . ' '; } if ($i == 2 && $min > 2 or $i == $nb - 1 && $max < $nb - 1) { $rtp .= '... '; } } $nbp = divc('nb_pages', $rtp); $c = is_numeric($c) ? $cb = $c : 48; $arz = array(12, 24, 36, 48, 72); foreach ($arz as $k => $v) { //size $siz .= lj($v == $c ? $csb : $csa, $jx . $gf . $p . '_' . $b . '_' . $v . '_' . $o, $v) . ' '; } //label $go = $gf . $p . '_' . $bb . '__'; if ($rd) { foreach ($rd as $k => $v) { $prp .= lj($pp['fam'] == $k ? $csb : $csa, $jx . $go . 'fam' . ($pp['fam'] == $k ? '' : $k), $v) . ' '; } } $prp .= lj($pp['acc'] ? $csb : $csa, $jx . $go . 'acc' . ($pp['acc'] ? '' : 1), 'accents') . ' '; $prp .= lj($pp['fav'] ? $csb : $csa, $jx . $go . 'fav' . ($pp['fav'] ? '' : 1), 'favs') . ' '; //render $max = $p * $no; $min = $max - $no; if ($rc) { foreach ($rc as $k => $v) { $ia++; if ($ia >= $min && $ia < $max && $v[0]) { $rta .= '@font-face {' . css_ff($v[0]) . '}' . "\n"; $rtb .= preview_ff($k, $v, $c); } } } $ret .= css_code($rta) . $mnu . $hlp . $siz . $prp . $srch . br() . br(); $ret .= input(1, 'ffwr', $_SESSION['ffstr'] ? $_SESSION['ffstr'] : 'AaBbCcDdEe0123יא', '" size="44'); $ret .= lj('txtx', 'ffwr_sesmake_ffwr__ffstr', 'set'); $ret .= divd('scroll', divd('pop', $nbp . br() . $rtb . $nbp)) . br(); if ($u) { return popup('create font-face', divs('width:640px;', $ret)); } else { return css_code($rta) . $nbp . br() . $rtb . $nbp; } }
function define_fonts($t) { //echo prma('csscode'); $r = explode(' ', prma('cssfonts')); $n = count($r); //$srvr=prms('upservr'); for ($i = 0; $i < $n; $i++) { switch ($r[$i]) { case 'fontphilum': $ret .= "@font-face {font-family: 'philum';\nsrc: url('/fonts/philum.eot?iefix') format('eot'), url('/fonts/philum.woff?" . $t . "') format('woff'), url('/fonts/philum.svg#philum') format('svg'), url('/fonts/philum.ttf') format('truetype');}\n"; break; case 'fontmicrosys': $ret .= "@font-face {font-family: 'microsys';\nsrc: url('/fonts/microsys4.eot?iefix') format('eot'), url('/fonts/microsys4.woff?" . $t . "') format('woff'), url('/fonts/microsys4.svg#microsys4') format('svg'), url('/fonts/microsys4.ttf') format('truetype');}\n"; break; case 'desktop_img': $ret .= ""; break; } } if ($ret) { return css_code($ret); } }
<!DOCTYPE HTML> <head> <meta charset="utf-8"> <?php core_js('jquery'); css(base_url() . '/misc/bootstrap/css/bootstrap.min.css'); css_code("\n \t\t\t.label-default a{color:#fff;}\n \t\t\tlabel{display:block;}\n \t\t\t.label{color:black;}\n \t\t\t#acl label{margin-right:5px;}\n \t\t"); ?> <!--[if lt IE 9]> <script src="<?php echo base_url(); ?> /misc/html5shiv.js"></script> <![endif]--> <title><?php echo __('Install'); ?> </title> </head> <body> <div class="container" id='main'> <?php echo $content; ?> </div> </body> </html>
<?php $pid = (int) $_GET['pid'] > 0 ? (int) $_GET['pid'] : 0; $this->breadcrumbs = array(__('album') => url('album/default/index'), "[" . $row['name'] . "]"); core_js('jquery'); core_js('jquery.ui'); /*widget('masonry' , array( 'tag'=>'#masonry', 'scroll'=>true, ));*/ UiHelper::sort('#sortable', url('album/image/sort'), 'ul'); css_code("\n#sortable ul{margin:0;padding:0;}\n#sortable li{ list-style:none; float:left;margin-right:5px; margin-bottom:5px;}\n"); ?> <blockquote><h3><?php echo $row['name']; ?> </h3></blockquote> <div class='well'> <?php $this->beginWidget('ActiveForm', array('enableAjaxValidation' => false)); ?> <input type="hidden" name="id" value="<?php echo $id; ?> "> <div class="form-group"> <?php echo CHtml::submitButton(__('save'), array('class' => 'btn btn-primary')); ?>
<!DOCTYPE HTML> <head> <meta charset="utf-8"> <?php core_js('jquery'); css(base_url() . '/misc/bootstrap/css/bootstrap.min.css'); css_code("\n \t\t\t.label-default a{color:#fff;}\n \t\t\tlabel{display:block;}\n \t\t\t.label{color:black;}\n \t\t\t#acl label{margin-right:5px;}\n \t\t\t.bs-sidenav li.active {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcolor: #563d7c;\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tborder-right: 1px solid #563d7c;\n\t\t\t}\n\t\t\t.bs-sidenav{\n\t\t\t\tbackground:#eee;\n\t\t\t\tpadding: 10px;\n \n\t\t\t\tborder:1px solid #eee;\n\t\t\t\t \n\t\t\t\t-webkit-border-radius: 6px;\n\t\t\t\t-moz-border-radius: 6px;\n\t\t\t \n\t\t\t}\n \t\t"); js(base_url() . '/misc/bootstrap/js/bootstrap.min.js'); js(base_url() . '/misc/php.js'); widget("imagesloaded", array('tag' => 'img')); $lang = CDB()->from('languages')->where('is_default=1')->queryRow(); $select_id = $lang['id']; js_code("\n if(!\$('#AutoModel_language_id').val()){\n \$('#AutoModel_language_id option').each(function(){\n if(\$(this).val()== " . $select_id . "){\n \$(this).attr('selected','selected');\n }\n\n });\n }\n "); // widget('select2'); ?> <!--[if lt IE 9]> <script src="<?php echo base_url(); ?> /misc/html5shiv.js"></script> <![endif]--> <title><?php echo __('admin panel'); ?> </title> </head> <body> <div class="navbar navbar-default navbar-static-top" role="navigation"> <div class="container"> <div class="navbar-header">
function desk_css() { $prmd = $_SESSION['prmd']; if ($_SESSION['negcss']) { $prmd .= '_neg'; } $clr = $_SESSION['clrs'][$prmd]; req('styl'); $g = prma('desktop'); //sesmk('desklr'); if ($g) { req('spe'); $g = goodroot($g); } if (is_dir($g)) { $ret = 'background:url(' . randimg($g) . ') no-repeat center fixed; background-size:cover;'; } elseif (is_image($g)) { $ret = 'background:url(' . goodroot($g) . ') no-repeat center fixed; background-size:cover;'; } elseif (strpos($g, ',') === false && $g) { $ret = 'background-color:' . affect_rgba($g, $clr) . ';'; $klr = $g; } else { $g = affect_rgba($g, $clr); $gh = $g ? $g : '#' . $clr[4] . ',#' . $clr[2]; $klr = medium_clr($gh); if (!$g) { $g = 'to bottom, ' . hexrgb($clr[4], 0.4) . ', ' . hexrgb($clr[1], 1) . ''; } $ret = 'height:100%; background:linear-gradient(' . $g . ') no-repeat fixed;'; } return css_code('body {' . $ret . '} #desktop a, #desktop .philum {color:#' . invert_color($klr, 1) . ';} #page {padding:0; margin:0 40px 0 0; border:0; box-shadow:none;}'); }
function header_tags($r) { $ret = ''; if ($r) { foreach ($r as $k => $v) { if (is_array($v)) { $va = current($v); } switch (key($v)) { case 'code': $ret .= $va . "\n"; break; case 'csslink': $ret .= css_link($va); break; case 'jslink': $ret .= js_link($va); break; case 'csscode': $ret .= css_code($va); break; case 'jscode': $ret .= js_code($va); break; case 'rel': $ret .= '<link rel="' . $v['rel'][0] . '" href="' . $v['rel'][1] . '">' . "\n"; break; case 'meta': $ret .= meta($va[0], $va[1], $va[2]); break; case 'name': $ret .= meta('name', $va[0], $va[1]); break; case 'tag': $ret .= bal($va[0], $va[1]); break; default: $ret .= meta(key($v), $va[0], $va[1]); break; } } } return $ret; }