echo stringUrl($profissao->titulo); ?> .html"> <p><?php echo $profissao->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/profissao/form/<?php echo cr($profissao->id); ?> /<?php echo stringUrl($profissao->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
function create($nfname, $isfolder, $ndir) { global $meurl, $folder; if (!$nfname == "") { maintop("Create"); $ndir = iconv("UTF-8", "GBK", $ndir); $nfname = iconv("UTF-8", "GBK", $nfname); if ($isfolder == 1) { if (@mkdir($ndir . "/" . $nfname, 0755)) { $ndir = iconv("GBK", "UTF-8", $ndir); $nfname = iconv("GBK", "UTF-8", $nfname); echo "Your directory<a href=\"" . $meurl . "?op=root&folder=./" . $nfname . "/\">" . $ndir . $nfname . "/</a> has been created successfully.\n" . "<br><a href=\"" . $meurl . "?op=root&folder=" . $ndir . $nfname . "/\">Enter</a> | <a href=\"" . $meurl . "?op=root&folder=" . $_SESSION['folder'] . "\">Back</a>\n"; } else { $ndir = iconv("GBK", "UTF-8", $ndir); $nfname = iconv("GBK", "UTF-8", $nfname); echo "<span class='error'>Your directory " . $ndir . "" . $nfname . " can not be created. Please check if permissions has already been set whether or directory have already exists!</span>\n"; } } else { if (@fopen($ndir . "/" . $nfname, "w")) { $ndir = iconv("GBK", "UTF-8", $ndir); $nfname = iconv("GBK", "UTF-8", $nfname); echo "Your file <a href=\"" . $meurl . "?op=viewframe&file=" . $nfname . "&folder={$ndir}\">" . $ndir . $nfname . "</a> has been created successfully!\n" . "<br><a href=\"" . $meurl . "?op=edit&fename=" . $nfname . "&folder=" . $ndir . "\">Edit</a> | <a href=\"" . $meurl . "?op=root&folder=" . $_SESSION['folder'] . "\">Back</a>\n"; } else { $ndir = iconv("GBK", "UTF-8", $ndir); $nfname = iconv("GBK", "UTF-8", $nfname); echo "<span class='error'>your file " . $ndir . $nfname . " can not be created. Please check if permissions has already been set whether or file have already exists!</span> <a onclick=\"history.go(-1);\" style=\"cursor:pointer\">Back</a>\n"; } } mainbottom(); } else { cr(); } }
function csf_resumo() { $sql = "select csf_status, count(*) as total, cs_descricao\n\t\t\t\t\t\tfrom " . $this->tabela . " \n\t\t\t\t\t\tleft join csf_status on csf_status = id_cs\n\t\t\t\t\t\tgroup by csf_status "; $rlt = $this->db->query($sql); $rlt = $rlt->result_array($rlt); $sx = '<table width="70%" class="border1 tabela00">'; $sx .= '<tr> <th align=left>situação</th> <th align=center>estudantes</th> </tr> '; $tot = 0; for ($r = 0; $r < count($rlt); $r++) { $line = $rlt[$r]; $link = base_url('index.php/csf/status/' . $line['csf_status'] . '/' . checkpost_link($line['csf_status'])); $link = '<A HREF="' . $link . '" class="lt2 link">'; $sx .= '<tr>'; $sx .= '<td borderb1" align=left>'; $sx .= $link . trim($line['cs_descricao']) . '</A>'; $sx .= '</td>'; $link = base_url('index.php/csf/status/' . $line['csf_status'] . '/' . checkpost_link($line['csf_status'])); $link = '<A HREF="' . $link . '" class="lt2 link">'; $sx .= '<td borderb1" align=center>'; $sx .= $link . trim($line['total']) . '</A>'; $sx .= '</td>'; $sx .= cr(); $tot = $tot + $line['total']; } $sx .= '<tr class="lt0"> <td class="bold">Total ' . $tot . ' estudantes.</td> </tr>'; $sx .= '</table>'; return $sx; }
function create($nfname, $isfolder, $ndir) { global $l; if (!$nfname == "") { maintop($l['TOP_CREATE']); if (substr($ndir, -1) != '/') { $ndir .= '/'; } if ($isfolder == 1) { if (@mkdir($ndir . $nfname, 0777)) { echo str_replace('%1', "[ <span class='breadcrumb'>" . breadcrumb($ndir . $nfname) . "</span> ]", $l['CRT_MSG1']) . "\n"; } else { echo str_replace('%1', "[ <span class='breadcrumb'>" . breadcrumb($ndir . $nfname) . "</span> ]", $l['CRT_MSG2']) . "\n"; } } else { if (@fopen($ndir . $nfname, "w")) { echo str_replace('%1', "[ <span class='breadcrumb'>" . breadcrumb($ndir) . " / " . $nfname . "</span> ]", $l['CRT_MSG3']) . "\n"; } else { echo str_replace('%1', "[ <span class='breadcrumb'>" . breadcrumb($ndir) . " / " . $nfname . "</span> ]", $l['CRT_MSG4']) . "\n"; } } mainbottom(); } else { cr(); } }
echo stringUrl($areaProfissao->titulo); ?> .html"> <p><?php echo $areaProfissao->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/areaProfissao/form/<?php echo cr($areaProfissao->id); ?> /<?php echo stringUrl($areaProfissao->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
echo stringUrl($pessoaFisica->pessoa->nome); ?> .html"> <p><?php echo $profissional->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/profissao/form/<?php echo cr($profissional->id); ?> /<?php echo stringUrl($pessoaFisica->pessoa->nome); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
echo stringUrl($caixa->titulo); ?> .html"> <p><?php echo $caixa->permiteSaldoNegativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/caixa/form/<?php echo cr($caixa->id); ?> /<?php echo stringUrl($caixa->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
echo stringUrl($situacaoAtividade->titulo); ?> .html"> <p><?php echo $situacaoAtividade->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/situacaoAtividade/form/<?php echo cr($situacaoAtividade->id); ?> /<?php echo stringUrl($situacaoAtividade->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
echo stringUrl($filial->titulo); ?> .html"> <p><?php echo $filial->permiteSaldoNegativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/filial/form/<?php echo cr($filial->id); ?> /<?php echo stringUrl($filial->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
Assert::equal(['1' => 'b'], (new Map([true, 'b']))->toAssocArray()); Assert::equal(['0' => 'b'], (new Map([false, 'b']))->toAssocArray()); Assert::equal(['a' => 'b'], (new Map([new Keyword('a'), 'b']))->toAssocArray()); function ct() { return new Transit(new JSONReader(true), new JSONWriter(true)); } function cr($input) { return ct()->read($input); } function cw($input) { return ct()->write($input); } // use assoc arrays instead of maps Assert::equal([], cr('["^ "]')); Assert::equal(['foo' => 'bar'], cr('["^ ","foo","bar"]')); Assert::equal([6 => 'six'], cr('["^ ","~i6","six"]')); Assert::equal(['1.25' => 'x'], cr('["^ ","~d1.25","x"]')); Assert::equal(['1' => 'x'], cr('["^ ","~?t","x"]')); Assert::equal(['0' => 'x'], cr('["^ ","~?f","x"]')); Assert::equal(['' => 'x'], cr('["^ ","~_","x"]')); Assert::equal(['a' => 'b'], cr('["^ ","~$a","b"]')); Assert::equal(['a' => 'b'], cr('["^ ","~:a","b"]')); Assert::equal(new Map([['a'], 'b']), cr('["~#cmap",[["a"],"b"]]')); Assert::equal(new Map([new Set(['a']), 'b']), cr('["~#cmap",[["~#set",["a"]],"b"]]')); Assert::equal(new Map([['foo' => 'bar'], 'b']), cr('["~#cmap",[["^ ","foo","bar"],"b"]]')); Assert::equal('["^ ","key","value"]', cw(['key' => 'value'])); Assert::equal('["^ ","~i0","a","x","b"]', cw([0 => 'a', 'x' => 'b'])); Assert::equal('["a","b"]', cw([0 => 'a', '1' => 'b']));
if ($permedit == 1) { edit($_REQUEST['fename']); } else { permerror("You do not currently have permission to edit.\n"); } break; case "save": if ($permedit == 1) { save($_REQUEST['ncontent'], $_REQUEST['fename'], $d, $_REQUEST['next_action']); } else { permerror("You do not currently have permission to edit.\n"); } break; case "cr": if ($permcreate == 1) { cr(); } else { permerror("You do not currently have permission to create.\n"); } break; case "create": if ($permcreate == 1) { create($_REQUEST['nfname'], $_REQUEST['isfolder'], $d, $_REQUEST['ndir']); } else { permerror("You do not currently have permission to create.\n"); } break; case "ren": if ($permrename == 1) { ren($_REQUEST['file']); } else {
attack,a // <? // if we're calling ourself if($d){ $C[$s][b]=0; // make sure the target's still around $t=s($r); // load target if($C[$s][a]!=$C[$t][a]||$C[$s][r]!=$C[$t][r]) return w($s,"~12can't find that target"); $p=cr($C[$s][str],$C[$t][vit]); if($p==0)$p=1; if($p<0)$p=0; $C[$t][hp]-=$p; w($s,"~12you attack for $p pts"); w($t,"~11{$C[$s][name]} ~06attacks you for $p pts!"); // check if other players in the room notice foreach($C as$l) if($l[s]!=$s&&$l[s]!=$t&&$l[a]==$C[$s][a]&&$l[r]==$C[$s][r]&&cr($l[per],1)>0) w($t,"~11{$C[$s][name]} ~06attacks ~11{$C[$t][name]}~06 for $p pts"); }else{ $C[$s][b]=1; t('$a',$r,3,$s); w($s,"~12attacking..."); }
regen,r // <? // if we're calling ourself to regen if($d){ $C[$s][b]=0; // make sure regen's needed if($C[$s][hp]>9) return w($s,"~12no regen needed"); // calc the points healed $p=cr($C[$s][vit],rand(2,4)); if($p<1)$p=0; $C[$s][hp]+=$p; w($s,"~12you regen $p pts"); }else{ $C[$s][b]=1; t('$r','',12,$s); w($s,"~12regening..."); }
function ajax_submit($cp, $url = '', $div = '') { $vdata = ""; $data = ""; $saved = 0; $CI =& get_instance(); $acao = $CI->input->post('acao'); /* VALIDA POST */ if (strlen($acao) > 0) { $saved = valida_post($cp); if ($saved > 0) { return $saved; } } //valida_post for ($r = 0; $r < count($cp); $r++) { $tp = substr($cp[$r][0], 0, 2); if ($tp == '$O' or $tp == '$Q') { $vdata .= '$dd' . $r . ' = $("#dd' . $r . ' option:selected").val(); ' . cr(); } else { $vdata .= '$dd' . $r . ' = $("#dd' . $r . '").val(); ' . cr(); } if (strlen($data) > 0) { $data .= ', ' . cr(); } $data .= 'dd' . $r . ': $dd' . $r; } $data .= ', acao: "save" '; $sx = ' <script> $("#acao").click(function() { ' . $vdata . ' $.ajax({ url : "' . $url . '", type : "post", data : { ' . $data . ' }, success : function(data) { $("#' . $div . '").html(data); } }); }); </script> '; return $sx; }
echo stringUrl($capacidade->titulo); ?> .html"> <p><?php echo $capacidade->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/capacidade/form/<?php echo cr($capacidade->id); ?> /<?php echo stringUrl($capacidade->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
function zscore($c, $t) { $z = cr($t) - cr($c); $s = cr($t) * (1 - cr($t)) / $t[0] + cr($c) * (1 - cr($c)) / $c[0]; return $z / sqrt($s); }
echo stringUrl($categoriaProjeto->titulo); ?> .html"> <p><?php echo $categoriaProjeto->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/categoriaProjeto/form/<?php echo cr($categoriaProjeto->id); ?> /<?php echo stringUrl($categoriaProjeto->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
function create($nfname, $isfolder, $ndir) { global $folder; if (!$nfname == "") { maintop("Create"); if ($isfolder == 1) { if (mkdir($ndir . "/" . $nfname, 0777)) { echo "Your directory, <a href=\"" . $adminfile . "?op=viewframe&file=" . $nfname . "&folder={$ndir}\">" . $ndir . "/" . $nfname . "</a> was succesfully created.\n"; } else { echo "The directory, " . $ndir . "/" . $nfname . " could not be created. Check to make sure the permisions on the /files directory is set to 777\n"; } } else { if (fopen($ndir . "/" . $nfname, "w")) { echo "Your file, <a href=\"" . $adminfile . "?op=viewframe&file=" . $nfname . "&folder={$ndir}\">" . $ndir . $nfname . "</a> was succesfully created.\n"; } else { echo "The file, " . $ndir . "/" . $nfname . " could not be created. Check to make sure the permisions on the /files directory is set to 777\n"; } } mainbottom(); } else { cr(); } }
/************************************************************** DATAS */ $op_data_1 = ''; $op_data_2 = ''; for ($r = 2015; $r < date("Y") + 4; $r++) { for ($m = 1; $m <= 12; $m++) { $select = ''; $mes = $r . strzero($m, 2) . '01'; if ($dd24 == $mes) { $select = ' selected '; } $op_data_1 .= '<option value="' . $mes . '" ' . $select . '>' . strzero($m, 2) . '/'.$r.'</option>' . cr(); $select = ''; if ($dd25 == $mes) { $select = ' selected '; } $op_data_2 .= '<option value="' . $mes . '" ' . $select . '>' . strzero($m, 2) . '/'.$r.'</option>' . cr(); } } ?> <!---- cabeclaho -----> <h1>Página 1/3 - Dados da proposta</h1> <form method="post"> <table width="80%"> <!---- Parte 1 -----> <tr> <td class="lt4 bold">1) Título do projeto do professor</td> </tr> <tr> <td> <textarea name='dd1' rows=5 cols=80 style="width: 98%"><?php echo $dd1; ?>
echo stringUrl($usuario->pessoa->nome); ?> .html"> <p><?php echo $usuario->perfilAcesso->titulo; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/usuario/form/<?php echo cr($usuario->id); ?> /<?php echo stringUrl($usuario->pessoa->nome); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
echo stringUrl($situacaoProjeto->titulo); ?> .html"> <p><?php echo $situacaoProjeto->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/situacaoProjeto/form/<?php echo cr($situacaoProjeto->id); ?> /<?php echo stringUrl($situacaoProjeto->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
echo stringUrl($perfilAcesso->titulo); ?> .html"> <p><?php echo $perfilAcesso->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/perfilAcesso/form/<?php echo cr($perfilAcesso->id); ?> /<?php echo stringUrl($perfilAcesso->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
echo stringUrl($categoriaConta->titulo); ?> .html"> <p><?php echo $categoriaConta->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/categoriaConta/form/<?php echo cr($categoriaConta->id); ?> /<?php echo stringUrl($categoriaConta->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
function cr_cb() { $fields = array(); $errors = new WP_Error(); // Buffer output ob_start(); // Custom registration, go! cr($fields, $errors); // Return buffer return ob_get_clean(); }
else $e.=":~14{$W[$C[$s][a]][n][$n[f]][type]}"; // and the name if they're really good if($x>2) if($n[f]==$C[$s][r]) $e.="~07:~14{$n[t]}"; else $e.="~07:~14{$n[f]}"; } w($s,"Connections:$e"); // give list of players foreach($C as $n=>$i) if($i[a]==$C[$s][a]&&$i[r]==$C[$s][r]&&$s!=$n){ $x=cr($C[$s][per],$i[ste]); // print the player if they detect them if($x>0) $l.=" ~11{$i[name]}"; // and their life if they're really good if($x>2) $l.="~07:~01{$i[hp]}"; } w($s,"Players :$l"); }else{ w($s,"not yet"); } }else{ $C[$s][b]=1;
echo stringUrl($conta->titulo); ?> .html"> <p><?php echo $conta->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/conta/form/<?php echo cr($conta->id); ?> /<?php echo stringUrl($conta->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
echo stringUrl($categoriaAtividade->titulo); ?> .html"> <p><?php echo $categoriaAtividade->ativo == 1 ? "ATIVO" : "INATIVO"; ?> </p> </a> </td> <td align="right"> <a href="<?php echo PATH; ?> configuracoes/categoriaAtividade/form/<?php echo cr($categoriaAtividade->id); ?> /<?php echo stringUrl($categoriaAtividade->titulo); ?> .html" class="edit"> <i class="fa fa-pencil"></i> </a> </td> </tr> <? } ?> </tbody> </table>
function create($nfname, $isfolder, $ndir) { global $meurl, $folder; if (!$nfname == "") { maintop("创建"); echo '<div class="box">'; $ndir = iconv("UTF-8", "GBK", $ndir); $nfname = iconv("UTF-8", "GBK", $nfname); if ($isfolder == 1) { if (@mkdir($ndir . "/" . $nfname, 0755)) { $ndir = iconv("GBK", "UTF-8", $ndir); $nfname = iconv("GBK", "UTF-8", $nfname); echo "您的目录<a href=\"" . $meurl . "?op=home&folder=./" . $nfname . "/\">" . $ndir . $nfname . "/</a> 已经成功被创建。\n" . "请选择 <a href=\"" . $meurl . "?op=home&folder=" . $ndir . $nfname . "/\">打开文件夹</a> 或者 <a href=\"" . $meurl . "?op=home&folder=" . $_SESSION['folder'] . "\">返回上次浏览的文件夹</a>\n"; } else { $ndir = iconv("GBK", "UTF-8", $ndir); $nfname = iconv("GBK", "UTF-8", $nfname); echo "<span class='error'>您的目录" . $ndir . "" . $nfname . " 不能被创建。请检查您的目录权限是否已经被设置为可写 或者 目录是否已经存在</span> <a href=\"" . $meurl . "?op=home&folder=" . $_SESSION['folder'] . "\">返回上次浏览的文件夹</a>\n"; } } else { if (@fopen($ndir . "/" . $nfname, "w")) { $ndir = iconv("GBK", "UTF-8", $ndir); $nfname = iconv("GBK", "UTF-8", $nfname); echo "您的文件, <a href=\"" . $meurl . "?op=viewframe&file=" . $nfname . "&folder={$ndir}\">" . $ndir . $nfname . "</a> 已经成功被创建\n" . "<br><a href=\"" . $meurl . "?op=edit&fename=" . $nfname . "&folder=" . $ndir . "\">编辑文件</a> 或者是 <a href=\"" . $meurl . "?op=home&folder=" . $_SESSION['folder'] . "\">返回上次浏览的文件夹</a>\n"; } else { $ndir = iconv("GBK", "UTF-8", $ndir); $nfname = iconv("GBK", "UTF-8", $nfname); echo "<span class='error'>您的文件 " . $ndir . $nfname . " 不能被创建。请检查您的目录权限是否已经被设置为可写 或者 文件是否已经存在</span> <a onclick=\"history.go(-1);\" style=\"cursor:pointer\">返回上一步</a>\n"; } } echo "</box>"; mainbottom(); } else { cr(); } }
$sa .= '<sub_css>' . $line['sub_css'] . '</sub_css>' . cr(); $sa .= '<sub_descricao>' . $line['sub_descricao'] . '</sub_descricao>' . cr(); $sa .= '<sub_ativo>' . $line['sub_ativo'] . '</sub_ativo>' . cr(); $sa .= '<sub_codigo>' . $line['sub_codigo'] . '</sub_codigo>' . cr(); $sa .= '<sub_pag>' . $line['sub_pag'] . '</sub_pag>' . cr(); $sa .= '<sub_obrigatorio>' . $line['sub_obrigatorio'] . '</sub_obrigatorio>' . cr(); $sa .= '<sub_editavel>' . $line['sub_editavel'] . '</sub_editavel>' . cr(); $sa .= '<sub_informacao>' . $line['sub_informacao'] . '</sub_informacao>' . cr(); $sa .= '<sub_projeto_tipo>' . $line['sub_projeto_tipo'] . '</sub_projeto_tipo>' . cr(); $sa .= '<sub_ordem>' . $line['sub_ordem'] . '</sub_ordem>' . cr(); $sa .= '<sub_pdf_title>' . $line['sub_pdf_title'] . '</sub_pdf_title>' . cr(); $sa .= '<sub_pdf_mostra>' . $line['sub_pdf_mostra'] . '</sub_pdf_mostra>' . cr(); $sa .= '<sub_pdf_align>' . $line['sub_pdf_align'] . '</sub_pdf_align>' . cr(); $sa .= '<sub_pdf_font_size>' . $line['sub_pdf_font_size'] . '</sub_pdf_font_size>' . cr(); $sa .= '<sub_pdf_space>' . $line['sub_pdf_space'] . '</sub_pdf_space>' . cr(); $sa .= '<sub_limite>' . $line['sub_limite'] . '</sub_limite>' . cr(); $sa .= '<sub_caption>' . $line['sub_caption'] . '</sub_caption>' . cr(); $sa .= '<sub_id>' . $line['sub_id'] . '</sub_id>' . cr(); $sa .= '</reg>' . cr(); $sa = troca($sa, '&', '[e]'); echo $sa; } echo '</fields>' . cr(); function cr() { $sx = chr(13) . chr(10); return $sx; } ?>