示例#1
0
 /**
  * Pubnub
  *
  * Init the Pubnub Client API
  *
  * @param string $publish_key required key to send messages.
  * @param string $subscribe_key required key to receive messages.
  * @param string $secret_key optional key to sign messages.
  * @param string $origin optional setting for cloud origin.
  * @param boolean $ssl required for 2048 bit encrypted messages.
  */
 function Pubnub($publish_key = 'demo', $subscribe_key = 'demo', $secret_key = false, $cipher_key = false, $ssl = false, $origin = false, $pem_path = false)
 {
     $this->SESSION_UUID = $this->uuid();
     $this->PUBLISH_KEY = $publish_key;
     $this->SUBSCRIBE_KEY = $subscribe_key;
     $this->SECRET_KEY = $secret_key;
     if (!isBlank($cipher_key)) {
         $this->CIPHER_KEY = $cipher_key;
     }
     $this->SSL = $ssl;
     if ($pem_path != false) {
         $this->PEM_PATH = $pem_path;
     }
     if ($origin) {
         $this->ORIGIN = $origin;
     }
     if ($this->ORIGIN == "PHP.pubnub.com") {
         trigger_error("Before running in production, please contact support@pubnub.com for your custom origin.\nPlease set the origin from PHP.pubnub.com to IUNDERSTAND.pubnub.com to remove this warning.\n", E_USER_NOTICE);
     }
     if ($ssl) {
         $this->ORIGIN = 'https://' . $this->ORIGIN;
     } else {
         $this->ORIGIN = 'http://' . $this->ORIGIN;
     }
 }
示例#2
0
 /**
  * Creates and returns a query that fetches the book-variables
  * @return QueryBuilder A Doctrine-Query-Builder
  */
 protected function booklistQueryGet()
 {
     $query = $this->_em->createQueryBuilder()->select(array('b, s'))->from('Babesk\\ORM\\SchbasBook', 'b')->leftJoin('b.subject', 's');
     if (isset($_POST['filterFor']) && !isBlank($_POST['filterFor'])) {
         $query->where('b.title LIKE :filterVar')->orWhere('b.author LIKE :filterVar')->orWhere('b.class LIKE :filterVar')->orWhere('b.bundle LIKE :filterVar')->orWhere('b.price LIKE :filterVar')->orWhere('b.isbn LIKE :filterVar')->orWhere('b.publisher LIKE :filterVar')->orWhere('s.name LIKE :filterVar')->orWhere('s.abbreviation LIKE :filterVar')->setParameter('filterVar', '%' . $_POST['filterFor'] . '%');
     }
     $query->setFirstResult($_POST['pagenumber'] * $_POST['booksPerPage'])->setMaxResults($_POST['booksPerPage']);
     return $query;
 }
 protected function execute($data)
 {
     if (isset($data['foreign_languages']) && !isBlank($data['foreign_languages'])) {
         $this->languageApply(implode('|', $data['foreign_languages']), $data['_multiselectionSelectedOfUsers']);
     } else {
         $this->dieError('Keine Daten bekommen!');
     }
     $this->dieSuccess('Die Fremdsprachen wurden erfolgreich verändert.');
 }
示例#4
0
 protected function execute($data)
 {
     if (isset($data['courses']) && !isBlank($data['courses'])) {
         $this->coursesApply(implode('|', $data['courses']), $data['_multiselectionSelectedOfUsers']);
     } else {
         $this->dieError('Keine Daten bekommen');
     }
     $this->dieSuccess('Die Kurse wurden erfolgreich verändert.');
 }
示例#5
0
文件: index.php 项目: hardikk/HNH
function _moduleContent(&$smarty, $module_name)
{
    //include module files
    include_once "modules/{$module_name}/configs/default.conf.php";
    $lang = get_language();
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $lang_file = "modules/{$module_name}/lang/{$lang}.lang";
    if (file_exists("{$base_dir}/{$lang_file}")) {
        include_once "{$lang_file}";
    } else {
        include_once "modules/{$module_name}/lang/en.lang";
    }
    //global variables
    global $arrConf;
    global $arrConfModule;
    global $arrLang;
    global $arrLangModule;
    $arrConf = array_merge($arrConf, $arrConfModule);
    $arrLang = array_merge($arrLang, $arrLangModule);
    //folder path for custom templates
    $base_dir = dirname($_SERVER['SCRIPT_FILENAME']);
    $templates_dir = isset($arrConf['templates_dir']) ? $arrConf['templates_dir'] : 'themes';
    $local_templates_dir = "{$base_dir}/modules/{$module_name}/" . $templates_dir . '/' . $arrConf['theme'];
    $formCampos = array();
    $txtCommand = isset($_POST['txtCommand']) ? $_POST['txtCommand'] : '';
    $oForm = new paloForm($smarty, $formCampos);
    $smarty->assign("asterisk", "Asterisk CLI");
    $smarty->assign("command", $arrLang["Command"]);
    $smarty->assign("txtCommand", htmlspecialchars($txtCommand));
    $smarty->assign("execute", $arrLang["Execute"]);
    $smarty->assign("icon", "modules/{$module_name}/images/pbx_tools_asterisk_cli.png");
    $result = "";
    if (!isBlank($txtCommand)) {
        $result = "<pre>";
        putenv("TERM=vt100");
        putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
        putenv("SCRIPT_FILENAME=" . strtok(stripslashes($txtCommand), " "));
        /* PHP scripts */
        $badchars = array("'", "`", "\\", ";", "\"");
        // Strip off any nasty chars.
        $fixedcmd = str_replace($badchars, "", $txtCommand);
        $ph = popen(stripslashes("asterisk -nrx \"{$fixedcmd}\""), "r");
        while ($line = fgets($ph)) {
            $result .= htmlspecialchars($line);
        }
        pclose($ph);
        $result .= "</pre>";
    }
    if ($result == "") {
        $result = "&nbsp;";
    }
    $smarty->assign("RESPUESTA_SHELL", $result);
    $contenidoModulo = $oForm->fetchForm("{$local_templates_dir}/new.tpl", $arrLang["Asterisk-Cli"], $_POST);
    return $contenidoModulo;
}
示例#6
0
 public function execute($dataContainer)
 {
     parent::entryPoint($dataContainer);
     if (isset($_POST['areSelectionsEnabled']) && !isBlank($_POST['areSelectionsEnabled'])) {
         $areSelEnabled = $_POST['areSelectionsEnabled'] == 'true';
         $this->setSelectionsEnabled($areSelEnabled);
     } else {
         http_response_code(400);
         $this->_logger->log('Correct data not send by client.', 'Notice', Null, json_encode(array('postData' => $_POST)));
     }
 }
 public function execute($dataContainer)
 {
     $this->entryPoint($dataContainer);
     if (isset($_POST['joinId']) && !isBlank($_POST['joinId'])) {
         if ($this->joinDelete($_POST['joinId'])) {
             $this->_interface->dieAjax('success', 'Der Benutzer wurde erfolgreich vom Kurs abgemeldet.');
         } else {
             $this->_interface->dieAjax('error', 'Konnte den Benutzer nicht vom Kurs abmelden.');
         }
     } else {
         $this->_interface->dieAjax('error', 'Keine join-Id gegeben');
     }
 }
示例#8
0
 /**
  * Parses some input so it can be uploaded to the Db
  */
 protected function inputParse()
 {
     if (!isset($_POST['pricegroupId']) || isBlank($_POST['pricegroupId'])) {
         $_POST['pricegroupId'] = 0;
     }
     $_POST['isSoli'] = isset($_POST['isSoli']) && $_POST['isSoli'] == 'true' ? 1 : 0;
     $_POST['accountLocked'] = $_POST['accountLocked'] == 'true' ? 1 : 0;
     if (isset($_POST['credits'])) {
         $_POST['credits'] = str_replace(',', '.', $_POST['credits']);
     } else {
         $_POST['credits'] = 0;
     }
 }
示例#9
0
function fnStripSLD($strInput)
{
    // returns the sld by stripping off the tld and the dot
    // expects a non blank/empty string as input
    if (isBlank($strInput)) {
        $Sld = "";
    } else {
        $Tld = strrchr($strInput, ".");
        if ($Tld == false) {
            $Sld = $strInput;
        } else {
            $Sld = substr($strInput, 0, strlen($strInput) - strlen($Tld));
        }
    }
    return $Sld;
}
 /**
  * ArrowPush
  *
  * Init the ArrowPush Client API
  *
  * @param string $publish_key required key to send messages.
  * @param string $subscribe_key required key to receive messages.
  * @param string $secret_key optional key to sign messages.
  * @param string $origin optional setting for cloud origin.
  * @param boolean $ssl required for 2048 bit encrypted messages.
  */
 function ArrowPush($publish_key = 'demo', $subscribe_key = 'demo', $secret_key = false, $cipher_key = false, $ssl = false, $origin = false)
 {
     $this->SESSION_UUID = $this->uuid();
     $this->PUBLISH_KEY = $publish_key;
     $this->SUBSCRIBE_KEY = $subscribe_key;
     $this->SECRET_KEY = $secret_key;
     if (!isBlank($cipher_key)) {
         $this->CIPHER_KEY = $cipher_key;
     }
     $this->SSL = $ssl;
     if ($origin) {
         $this->ORIGIN = $origin;
     }
     if ($ssl) {
         $this->ORIGIN = 'https://' . $this->ORIGIN;
     } else {
         $this->ORIGIN = 'http://' . $this->ORIGIN;
     }
 }
示例#11
0
			<div class="content">
				<input name="ulfile" type="file" class="btn btn-default btn-sm btn-file" id="ulfile" />
				<br />
				<button name="submit" type="submit" class="btn btn-primary btn-sm" id="upload" value="UPLOAD">
					<i class="fa fa-upload icon-embed-btn"></i>
					<?php 
echo gettext("Upload");
?>
				</button>
			</div>
		</div>
	</div>
<?php 
// Experimental version. Writes the user's php code to a file and executes it via a new instance of PHP
// This is intended to prevent bad code from breaking the GUI
if ($_POST['submit'] == "EXECPHP" && !isBlank($_POST['txtPHPCommand'])) {
    puts("<div class=\"panel panel-success responsive\"><div class=\"panel-heading\"><h2 class=\"panel-title\">PHP Response</h2></div>");
    $tmpname = tempnam("/tmp", "");
    $phpfile = fopen($tmpname, "w");
    fwrite($phpfile, "<?php\n");
    fwrite($phpfile, "require_once(\"/etc/inc/config.inc\");\n");
    fwrite($phpfile, "require_once(\"/etc/inc/functions.inc\");\n\n");
    fwrite($phpfile, $_POST['txtPHPCommand'] . "\n");
    fwrite($phpfile, "?>\n");
    fclose($phpfile);
    $output = array();
    exec("/usr/local/bin/php " . $tmpname, $output);
    unlink($tmpname);
    $output = implode("\n", $output);
    print "<pre>" . htmlspecialchars($output) . "</pre>";
    //		echo eval($_POST['txtPHPCommand']);
示例#12
0
 protected function filterForQuery($columns, $value)
 {
     if (!empty($columns) && !isBlank($value)) {
         $searches = array();
         $query = '';
         foreach ($columns as $col) {
             if (in_array($col, $this->_filterForColumns)) {
                 $searches[] = "{$col} LIKE '%{$value}%'";
             }
         }
         if (!empty($searches)) {
             $query = 'HAVING ' . implode(' OR ', $searches);
         } else {
             $query = '';
         }
         return $query;
     } else {
         return '';
     }
 }
示例#13
0
 /**
  * If value with the $key in array $container is blank, set it to $toSet
  * @param array  $container The array which (maybe) contains an element with
  *                          the key $key
  * @param mixed  $key       The key of the value to check for blank-ness
  * @param mixed  $toSet     The value to set when the original value is blank
  */
 public static function setOnBlank(array &$container, $key, $toSet)
 {
     if (empty($container[$key]) || isBlank($container[$key])) {
         $container[$key] = $toSet;
     }
 }
<?php

include "lib.php";
$connect = dbConn();
// 관리자가 1명이상 있을경우 바로 로그인 페이지로...
$temp = mysql_fetch_array(mysql_query("select count(*) from {$member_table} where is_admin='1'", $connect));
if ($temp[0]) {
    header("location:admin.php");
    mysql_close($connect);
    exit;
}
// 빈문자열인지를 검사
if (isBlank($user_id)) {
    Error("아이디를 입력하셔야 합니다", "");
}
if (isBlank($password1)) {
    Error("비밀번호를 입력하셔야 합니다", "");
}
if (isBlank($password2)) {
    Error("비밀번호 확인을 입력하셔야 합니다", "");
}
if ($password1 != $password2) {
    Error("비밀번호와 비밀번호 확인이 일치하지 않습니다", "");
}
if (isBlank($name)) {
    Error("이름을 입력하셔야 합니다", "");
}
// 관리자 정보 입력
@mysql_query("insert into {$member_table} (user_id,password,name,is_admin,reg_date,level) values ('{$user_id}',password('{$password1}'),'{$name}','1','" . time() . "','1')", $connect) or Error(mysql_error(), "");
mysql_close($connect);
header("location:admin.php");
示例#15
0
文件: reconoce.php 项目: facom/Sinfin
                   $reconocimientos = generateReconocimientos();
                   //RECID
                   if (!isset($recid)) {
                       $recid = generateRandomString(6);
                   }
                   //RECDIR
                   $recdir = getRecdir($recid);
                   $recurl = "{$SITEURL}/" . preg_replace("/^\\/.+\\/data/", "data", $recdir);
                   //INPUT FILE
                   if (isset($recfile)) {
                       $inprecfile = "<input type='hidden' name='recfile' value='{$recfile}'><input type='hidden' name='recid' value='{$recid}'>";
                   } else {
                       $inprecfile = "";
                   }
                   if (isset($status)) {
                       if (!isBlank($status)) {
                           $rstatus = $RECONSTATUS["{$status}"];
                       } else {
                           $status = 3;
                           $rstatus = "Nuevo";
                       }
                   } else {
                       $status = 3;
                       $rstatus = "Nuevo";
                   }
                   //FORM
                   $buttons .= <<<B
   <tr class="boton">
     <td colspan=2>
t<input class="level3" type="submit" name="action" value="Revisado">
t<input class="level3" type="submit" name="action" value="Aprobado">
示例#16
0
 // ok, re parsing function ;)
 // -> remove : function, and spaces ;)
 $rettest[0][$i] = preg_replace("/\\: function\\s?/", null, $rettest[0][$i]);
 $rettest[0][$i] = preg_replace("/\\s/", null, $rettest[0][$i]);
 $rettest[1][$i] = preg_replace("/\\s/", null, $rettest[1][$i]);
 // Yeey! function!
 $functions[$rettest[1][$i]]['function'] = $rettest[0][$i];
 // Exploding, a array, again, yes it are the annotation
 $ExplodeDataNow = explode("\n", $comtest[0][$i + 1]);
 for ($x = 0; $x < sizeof($ExplodeDataNow); $x++) {
     // Removing spaces, and retuns...
     $ExplodeDataNow[$x] = preg_replace("/         /", null, $ExplodeDataNow[$x]);
     $ExplodeDataNow[$x] = preg_replace("/\r/", null, $ExplodeDataNow[$x]);
     // Ok!, we got some annotation cool! parse it.
     // Do nothing...
     if (isBlank($ExplodeDataNow[$x])) {
         /* IGNORE ;) */
     } elseif (isAnnotation($ExplodeDataNow[$x])) {
         $ExplodeDataNow[$x] = preg_replace("/\\*\\s/", null, $ExplodeDataNow[$x]);
         $functions[$rettest[1][$i]]['annotation'][] = $ExplodeDataNow[$x];
         if ($debug) {
             echo "ANO({$rettest[1][$i]}): " . $ExplodeDataNow[$x] . PHP_EOL;
         }
     } else {
         // Ok, this looks weird, but this parses:
         // /**
         // * I WILL BE PARSED
         // *
         // * FUNCTION DEFINITION, TEXT BLA BLA
         // echo $ExplodeDataNow[$x] . PHP_EOL;
         // $ExplodeDataNow[$x] = preg_replace("/\*\s/", null, $ExplodeDataNow[$x]);
<?php

include "lib.php";
include "schema.sql";
if (file_exists("config.php")) {
    error("이미 config.php가 생성되어 있습니다.<br><br>재설치하려면 해당 파일을 지우세요");
}
// 호스트네임, 아이디, DB네임, 비밀번호의 공백여부 검사
if (isBlank($hostname)) {
    Error("HostName을 입력하세요", "");
}
if (isBlank($user_id)) {
    Error("User ID 를 입력하세요", "");
}
if (isBlank($dbname)) {
    Error("DB NAME을 입력하세요", "");
}
// DB에 커넥트 하고 DB NAME으로 select DB
$connect = @mysql_connect($hostname, $user_id, $password) or Error("MySQL-DB Connect<br>Error!!!", "");
if (mysql_error()) {
    Error(mysql_error(), "");
}
mysql_select_db($dbname, $connect) or Error("MySQL-DB Select<br>Error!!!", "");
// 관리자 테이블 생성
if (!isTable($admin_table, $dbname)) {
    @mysql_query($admin_table_schema, $connect) or Error("관리자 테이블 생성 실패", "");
} else {
    $admin_table_exist = 1;
}
// 그룹테이블 생성
if (!isTable($group_table, $dbname)) {
示例#18
0
文件: library.php 项目: facom/Sinfin
function fechaRango($id, $start = "", $end = "")
{
    $code = <<<C
<input type="hidden" id="{$id}" name="{$id}">
<script>
    \$("#{$id}").daterangepicker({
        presetRanges: [{
            text: 'Hoy',
\t    dateStart: function() { return moment() },
\t    dateEnd: function() { return moment() }
\t}, {
            text: 'Mañana',
\t    dateStart: function() { return moment().add('days', 1) },
\t    dateEnd: function() { return moment().add('days', 1) }
\t}, {
            text: 'La próxima semana',
            dateStart: function() { return moment().add('weeks', 1).startOf('week') },
            dateEnd: function() { return moment().add('weeks', 1).endOf('week') }
\t}, {
            text: 'La semana anterior',
            dateStart: function() { return moment().add('weeks',-1).startOf('week') },
            dateEnd: function() { return moment().add('weeks',-1).endOf('week') }
\t}],
\tdatepickerOptions: {
            minDate: null,
            maxDate: null
        },
\tapplyOnMenuSelect: false,
\tinitialText : 'Seleccione el rango de fechas...',
\tapplyButtonText : 'Escoger',
\tclearButtonText : 'Limpiar',
\tcancelButtonText : 'Cancelar',
    });
    jQuery(function(\$){
        \$.datepicker.regional['es'] = {
            closeText: 'Cerrar',
            prevText: '&#x3c;Ant',
            nextText: 'Sig&#x3e;',
            currentText: 'Hoy',
            monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
                         'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
            monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
                              'Jul','Ago','Sep','Oct','Nov','Dic'],
            dayNames: ['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;bado'],
            dayNamesShort: ['Dom','Lun','Mar','Mi&eacute;','Juv','Vie','S&aacute;b'],
            dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],
            weekHeader: 'Sm',
            dateFormat: 'dd/mm/yy',
            firstDay: 1,
            isRTL: false,
            showMonthAfterYear: false,
            yearSuffix: ''};
        \$.datepicker.setDefaults(\$.datepicker.regional['es']);
    });
C;
    if (!isBlank($start)) {
        $code .= <<<C
  \$("#{$id}").daterangepicker({
      onOpen: \$("#{$id}").daterangepicker(
          "setRange",
          {start:\$.datepicker.parseDate("yy-mm-dd","{$start}"),
           end:\$.datepicker.parseDate("yy-mm-dd","{$end}")}
      )
  });
C;
    } else {
        $code .= <<<C
  var today = moment().toDate();
  var tomorrow = today;//moment().add('days', 1).startOf('day').toDate();
  \$("#{$id}").daterangepicker({
    onOpen: \$("#{$id}").daterangepicker("setRange",{start: today,end: tomorrow})
    });
C;
    }
    $code .= "</script>";
    return $code;
}
示例#19
0
                if (!isBlank($explanation)) {
                    $html .= "<li>{$date}<br/>{$explanation}<br/>";
                } else {
                    $html .= "<li>{$date}<br/>";
                }
                $html .= "<a href='?if=search&search={$query_url}'>{$query}</a></li>";
            }
            $html .= "</ul>";
        } else {
            $html = "No history";
        }
        $html .= "<p><a href=?if=search&action=cleanhistory>Clean history</a></p>";
    } else {
        if ($action == "updatejd") {
            $ps = parseParams($params);
            $date = $ps["date"];
            $qjd = rtrim(shell_exec("PYTHONPATH=. python util/date2jd.py '{$date}'"));
            if (isBlank($qjd)) {
                $html = "Bad date";
            } else {
                $html = $qjd;
            }
        } else {
            $html .= "Option not recognized";
        }
    }
}
////////////////////////////////////////////////////////////////////////
//RETURN
////////////////////////////////////////////////////////////////////////
echo $html;
示例#20
0
	$check=mysql_fetch_array(mysql_query("select count(*) from TB_REG2 where BOOK_SNO='$p_book_sno'",$connect));
	if($check[0]>0) Error("이미 등록되어 있는 시리얼입니다","");		
	
// 정품 시리얼 번호 검사	
	$p_book_sno = str_replace("ㅤ","",$p_book_sno);	
	$p_book_sno=trim($p_book_sno);
	if(isBlank($p_book_sno)) Error("시리얼번호를 입력하셔야 합니다","");
	unset($check);
	$check=mysql_fetch_array(mysql_query("select count(*) from TB_BOOK_SNO where BOOK_SNO='$p_book_sno'",$connect));
	if($check[0]<1) Error("잘못된 시리얼입니다","");	
	

// 수강반ID 검사	
	$p_class_id = str_replace("ㅤ","",$p_class_id);	
	$p_class_id=trim($p_class_id);
	if(isBlank($p_class_id)) Error("수강반ID를 입력하셔야 합니다","");
	unset($check);
	$check=mysql_fetch_array(mysql_query("select count(*) from TB_CLASS where CLASS_ID='$p_class_id'",$connect));
	if($check[0]<1) Error("등록되어 있는 않은 수강반ID 입니다","");

// 사용자 ID
	$user_id=$member[user_id];
	
// 각종 정보	
	$reg_ilsi=date("Y:m:d H:i:s");
	$remote_addr = $HTTP_SERVER_VARS['REMOTE_ADDR'];
	$remote_host = $HTTP_SERVER_VARS['REMOTE_HOST'];
	echo($remote_host);

// 수강 정보 삽입
	mysql_query("insert into TB_REG2 (CLASS_ID, USER_ID, BOOK_SNO, REG_ILSI, IP, HOST) values ('$p_class_id','$user_id','$p_book_sno','$reg_ilsi', '$remote_addr','$remote_host' )");
示例#21
0
                    }
                    if ($restricciones == "Restricciones:<br/><ul>") {
                        $restricciones = "";
                    }
                    ////////////////////////////////////////////////////
                    //COLOR
                    ////////////////////////////////////////////////////
                    $color = $ESTADOS_COLOR["{$estado}"];
                    ////////////////////////////////////////////////////
                    //SELECCION
                    ////////////////////////////////////////////////////
                    $estadotxt = $ESTADOS["{$estado}"];
                    $respuestatxt = $BOOLEAN["{$respuesta}"];
                    $helpicon = "<a href='JavaScript:void(null)' onclick='toggleHelp(this)'><img src='img/help.png' width='15em'></a>";
                    $readonly = 0;
                    if (!isBlank($perm1)) {
                        $readonly = 1;
                    }
                    $tiposel = generateSelection($TIPO_EVENTO, "tipoevento", "{$tipoevento}", "", $readonly);
                    $programasel = generateSelection($PROGRAMAS_FCEN, "programa", "{$programa}", "", $readonly);
                    $apoyosel = generateSelection($APOYOS, "apoyo", "{$apoyo}", "", $readonly);
                    $estadosel = generateSelection($ESTADOS, "estado", "{$estado}", "", $readonly);
                    ////////////////////////////////////////////////////
                    //DISPLAY
                    ////////////////////////////////////////////////////
                    if ($estado == "nueva") {
                        $content .= <<<FORM
<style>
.escondida{
 display:none;
}
}
if (isBlank($password1)) {
    Error("비밀번호 확인을 입력하셔야 합니다", "");
}
if ($password != $password1) {
    Error("비밀번호와 비밀번호 확인이 일치하지 않습니다", "");
}
if (isBlank($name)) {
    Error("이름을 입력하셔야 합니다", "");
}
if (eregi("<", $name) || eregi(">", $name)) {
    Error("이름을 영문, 한글, 숫자등으로 입력하여 주십시요");
}
if ($group_data[use_jumin] && !$mode) {
    // 주민등록 번호 루틴
    if (isBlank($jumin1) || isBlank($jumin2) || strlen($jumin1) != 6 || strlen($jumin2) != 7) {
        Error("주민등록번호를 올바르게 입력하여 주십시요", "");
    }
    if (!check_jumin($jumin1 . $jumin2)) {
        Error("잘못된 주민등록번호입니다", "");
    }
    $check = mysql_fetch_array(mysql_query("select count(*) from {$member_table} where jumin=password('" . $jumin1 . $jumin2 . "')", $connect));
    if ($check[0] > 0) {
        Error("이미 등록되어 있는 주민등록번호입니다", "");
    }
    $jumin = $jumin1 . $jumin2;
}
$name = addslashes($name);
$email = addslashes($email);
if ($_zbDefaultSetup[check_email] == "true" && !mail_mx_check($email)) {
    Error("입력하신 {$email} 은 존재하지 않는 메일주소입니다.<br>다시 한번 확인하여 주시기 바랍니다.");
示例#23
0
    $upload_image2 = "<img src={$reply_data['file_name2']} border=0><br>";
}
// 카테고리의 이름을 구함
if ($reply_data[category] && $setup[use_category]) {
    $category_name = $category_data[$reply_data[category]];
} else {
    $category_name = "&nbsp;";
}
// 글쓴 시간을 년월일 시분초 로 변환함
$reg_date = "<span title='" . date("m/d/y  H:i:s", $reply_data[reg_date]) . "'>" . date("Y/m/d", $reply_data[reg_date]) . "</span>";
$temp_name = get_private_icon($reply_data[ismember], "2");
if ($temp_name) {
    $name = "<img src='{$temp_name}' border=0 align=absmiddle>";
}
// 메일주소가 있으면 이름에 메일 링크시킴
if (!isBlank($email) || $reply_data[ismember]) {
    if (!$setup[use_formmail]) {
        $name = "<a href=mailto:{$email}>{$name}</a>";
    } else {
        $name = "<a href=javascript:void(window.open('view_info.php?to={$email}&id={$id}&member_no={$reply_data['ismember']}','mailform','width=400,height=500,statusbar=no,scrollbars=yes,toolbar=no'))>{$name}</a>";
    }
}
// Depth에 의한 들임값을 정함
$insert = "";
for ($z = 0; $z < $reply_data[depth]; $z++) {
    $insert .= "&nbsp; ";
}
$icon = get_icon($reply_data);
// 이름앞에 붙는 아이콘 정의;;
$face_image = get_face($reply_data);
// 바로 전에 본 글인 경우 번호를 아이콘으로 바꿈
示例#24
0
    echo "<p><strong>" . $ulmsg . "</strong></p>\n";
}
if (isset($_POST['txtCommand']) && !isBlank($_POST['txtCommand'])) {
    puts("<pre>");
    puts("\$ " . htmlspecialchars($_POST['txtCommand']));
    putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
    putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " "));
    /* PHP scripts */
    $ph = popen($_POST['txtCommand'], "r");
    while ($line = fgets($ph)) {
        echo htmlspecialchars($line);
    }
    pclose($ph);
    puts("</pre>");
}
if (isset($_POST['txtPHPCommand']) && !isBlank($_POST['txtPHPCommand'])) {
    puts("<pre>");
    require_once "config.inc";
    require_once "functions.inc";
    require_once "util.inc";
    require_once "rc.inc";
    require_once "email.inc";
    require_once "tui.inc";
    require_once "array.inc";
    require_once "services.inc";
    require_once "zfs.inc";
    echo eval($_POST['txtPHPCommand']);
    puts("</pre>");
}
?>
<form action="<?php 
示例#25
0
文件: view.php 项目: kkskipper/KNOWME
/****************************************************************************************
 * 변수 설정
 ***************************************************************************************/
// 글보기에서 쓰는 변수 수정
$subject = $data[subject];
if ($data[homepage]) {
    $a_homepage = "<a onfocus=blur() href='{$data['homepage']}' target=_blank>";
} else {
    $a_homepage = "<Zetx";
}
// 홈페이지 주소 링크
/****************************************************************************************
 * 버튼 정리
 ***************************************************************************************/
// 메일주소가 있으면 이름에 메일 링크
if (!isBlank($email) || $data[ismember]) {
    if (!$setup[use_formmail]) {
        $a_email = "<a onfocus=blur() href='mailto:{$email}'>";
    } else {
        $a_email = "<a onfocus=blur() href=\"javascript:void(window.open('view_info.php?to={$email}&id={$id}&member_no={$data['ismember']}','mailform','width=400,height=500,statusbar=no,scrollbars=yes,toolbar=no'))\">";
    }
} else {
    $a_email = "<Zeroboard ";
}
// 글쓰기버튼
if ($is_admin || $member[level] <= $setup[grant_write]) {
    $a_write = "<a onfocus=blur() href='write.php?{$href}{$sort}&no={$no}&mode=write&sn1={$sn1}'>";
} else {
    $a_write = "<Zeroboard ";
}
// 답글 버튼
示例#26
0
function fnStripTLD($strInput)
{
    // returns the tld by stripping off the dot sld
    // expects a non blank/empty string as input
    // Check if the string is blank
    if (isBlank($strInput)) {
        $Tld = "";
    } else {
        if (substr($strInput, -4) == "name") {
            $Tld = "name";
        } else {
            $Tld = substr($strInput, strpos($strInput, ".") + 1, strlen($strInput));
        }
        // Check if a "." was found
        if ($Tld == false) {
            // No ".", return blank TLD
            $Tld = "";
        }
    }
    return $Tld;
}
示例#27
0
        //Set bold start
        $be = "[/b]";
        //Set bold end
        $cs = "[code]";
        //Set code end
        $ce = "[/code]";
        //Set code end
    }
    print str_replace("; ", "\n", $sys_summary) . $nl . $nl;
    if (isset($_POST['chk_Hardware'])) {
        print wordwrap($hwinfo, 70, $nl, true);
        print $nl;
    }
    print wordwrap($hr . $nl . $nl . $bs . "Subject:" . $be . $nl . $_POST['txtSubject'] . $hr, 80, $nl, true);
    print wordwrap($nl . $nl . $bs . "Description:" . $be . $nl . $_POST['txtDescription'], 80, $nl, true);
    if (!isBlank($_POST['txtError'])) {
        print wordwrap($nl . $nl . $hr . $cs . $nl . $_POST['txtError'] . $nl . $ce, 80, $nl, true);
    }
    puts("</pre>");
}
?>
	<?php 
include "formend.inc";
?>
</form>
<script type="text/javascript">
<!--
document.forms[0].txtDescription.focus();
//-->
</script>
<?php 
示例#28
0
文件: genrecon.php 项目: facom/Sinfin
        $ia++;
        $hrow .= "</tr>";
    }
    $obstextm[$ir] = rtrim($obstextm[$ir], ",");
    $obstexta[$ir] = rtrim($obstexta[$ir], ",");
}
if ($debug) {
    echo "<hr/>";
}
if ($debug) {
    echo "Observations:";
    print_r($obstextm);
    print_r($obstexta);
}
$notas = "";
if (!isBlank($acto)) {
    $notas .= "Acto administrativo {$acto}<br/>";
}
$obs = 1;
foreach ($reconocimientos as $ir) {
    if (preg_match("/,/", $obstextm[$ir]) or preg_match("/,/", $obstexta[$ir])) {
        //$notas.="<tr><td class=content>$obs ) ".$obstextm[$ir]." se homologa (reconoce) por ".$obstexta[$ir]."</td><td></td></tr>";
        $notas .= "{$obs} ) " . $obstextm[$ir] . " se homologa (reconoce) por " . $obstexta[$ir] . "<br/>";
        $obs++;
    }
}
////////////////////////////////////////////////////////////////////////
//GENERATE CONTENT
////////////////////////////////////////////////////////////////////////
$format = "";
$format .= <<<F
示例#29
0
    echo "<p><strong>" . $ulmsg . "</strong></p>\n";
}
if (!isBlank($_POST['txtCommand'])) {
    puts("<pre>");
    puts("\$ " . htmlspecialchars($_POST['txtCommand']));
    putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
    putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " "));
    /* PHP scripts */
    $ph = popen($_POST['txtCommand'], "r");
    while ($line = fgets($ph)) {
        echo htmlspecialchars($line);
    }
    pclose($ph);
    puts("</pre>");
}
if (!isBlank($_POST['txtPHPCommand'])) {
    puts("<pre>");
    require_once "config.inc";
    require_once "functions.inc";
    echo eval($_POST['txtPHPCommand']);
    puts("</pre>");
}
?>
<div id="niftyOutter">
<form action="exec.php" method="POST" enctype="multipart/form-data" name="frmExecPlus" onSubmit="return frmExecPlus_onSubmit( this );">
  <table>
	<tr>
	  <td colspan="2" valign="top" class="vnsepcell">Bir kabuk komutu çalıştır</td>
	</tr>  
    <tr>
      <td class="label" align="right">Komut:</td>
示例#30
0
     return 0;
 } else {
     if ($action == "analysis") {
         $sql = "update {$QUAKESRUN} set astatus='3',stationid='{$station_id}',calctime2='{$deltat}',adatetime=now(),qsignal='{$qsignal}',qphases='{$qphases}',aphases='{$aphases}' where quakeid='{$quakeid}';";
         mysqlCmd($sql);
         return 0;
     } else {
         if ($action == "checkstation") {
             $sql = "select station_receiving from Stations where station_id='{$station_id}';";
             $result = mysqlCmd($sql);
             $status = $result[0];
             if ($status == 0) {
                 $sql = "update Stations set station_status='6',station_statusdate=now() where station_id='{$station_id}';";
                 mysqlCmd($sql);
             }
             if (isBlank($status)) {
                 $status = -2;
             }
             echo $status;
             return 0;
         } else {
             if ($action == "testdb") {
                 $sql = "select count(quakeid) from {$QUAKESRUN};";
                 $result = mysqlCmd($sql);
                 echo $result[0];
                 return 0;
             } else {
                 if ($action == "submit") {
                     $sql = "update {$QUAKESRUN} set astatus='4',stationid='{$station_id}',adatetime=now(),calctime3='{$deltat}' where quakeid='{$quakeid}';";
                     mysqlCmd($sql);
                     return 0;