コード例 #1
0
ファイル: misc.inc.php プロジェクト: skdong/nfs-ovd
function print_array($data_, $n_ = 0)
{
    if (is_array($data_)) {
        foreach ($data_ as $k => $v) {
            for ($i = 0; $i < $n_; $i++) {
                echo '.';
            }
            echo "<strong>{$k}</strong> => { ";
            if (is_array($v)) {
                echo "<br />\n";
                print_array($v, $n_ + 4);
                for ($i = 0; $i < $n_; $i++) {
                    echo '.';
                }
                echo " }<br />\n";
            } else {
                echo $v . " }<br />\n";
            }
        }
    } else {
        for ($i = 0; $i < $n_; $i++) {
            echo '.';
        }
        echo $data_ . "<br>\n";
    }
}
コード例 #2
0
 function drawline_handle_fatal()
 {
     $error = error_get_last();
     if ($error !== NULL) {
         print_array($error);
     }
 }
コード例 #3
0
function print_array($array)
{
    $result = '';
    foreach ($array as $b => $param) {
        $result .= "<br/> {$b} => ";
        try {
            if (is_array($param)) {
                $result .= print_array($param);
            } else {
                if (is_object($param)) {
                    $result .= print_r($param);
                } else {
                    if (is_string($param)) {
                        $result .= $param;
                    } else {
                        $result .= print_r($param);
                    }
                }
            }
        } catch (Exception $e) {
            $result .= print_r($e);
        }
    }
    return $result;
}
コード例 #4
0
function print_power_sets($arr)
{
    echo "POWER SET of [" . join(", ", $arr) . "]<br>";
    foreach (power_set($arr) as $subset) {
        print_array($subset);
    }
}
コード例 #5
0
ファイル: testmodels.php プロジェクト: iHamburg/kqserver
 function test_from_wx_3g()
 {
     //		print_r($_SERVER);
     $array = getallheaders();
     //		print_r($array);
     print_array($array);
 }
コード例 #6
0
function print_array( $array ) {
  $result = '';
  foreach( $array as $b => $param)
   if ( is_array($param) )
      $result .= print_array( $param );
   else
      $result .= "$b => $param<br/>";
  
  return $result;
}
コード例 #7
0
function merge_sort(&$a, $l = 0, $r = -1, $tmp_v = array())
{
    // gestisce la prima chiamata, quella senza argomenti
    if ($r == -1) {
        $r = count($a) - 1;
        $tmp_v = $a;
    }
    // Distingue i casi elementari (1 o 2 elementi)
    if ($l == $r) {
        $pa = array_slice($a, $l, $r - $l + 1);
        print_array($pa, "Dividi - caso elementare 1 elemento", "({$l} {$r})");
    } elseif ($r == $l + 1) {
        $pa = array_slice($a, $l, $r - $l + 1);
        print_array($pa, "Dividi - caso elementare 2 elementi", "({$l} {$r})");
        if ($a[$l] > $a[$r]) {
            $tmp = $a[$r];
            $a[$r] = $a[$l];
            $a[$l] = $tmp;
        }
        $pa = array_slice($a, $l, $r - $l + 1);
        print_array($pa, "Ordina - caso elementare 2 elementi", "({$l} {$r})");
    } elseif ($l != $r) {
        // Caso non elementare
        $pa = array_slice($a, $l, $r - $l + 1);
        print_array($pa, "Dividi - caso non elementare elementi", "({$l} {$r})");
        $center = round(($l + $r) / 2, 0, PHP_ROUND_HALF_DOWN);
        merge_sort($a, $l, $center);
        merge_sort($a, $center + 1, $r);
    }
    // merge
    $n = $r - $l + 1;
    $c = round($n / 2, 0);
    for ($i = 0; $i < $n; $i++) {
        $tmp_v[$i] = $a[$l + $i];
    }
    $i = $j = 0;
    while ($i < $c && $j < $n - $c) {
        if ($tmp_v[$i] < $tmp_v[$c + $j]) {
            $a[$l + $i + $j] = $tmp_v[$i];
            $i++;
        } else {
            $a[$l + $i + $j] = $tmp_v[$c + $j];
            $j++;
        }
    }
    while ($i < $c) {
        $a[$l + $i + $j] = $tmp_v[$i];
        $i++;
    }
    $pa = array_slice($a, $l, $r - $l + 1);
    print_array($pa, "Fondi ", "({$l} {$r})");
}
コード例 #8
0
ファイル: mysql.inc.php プロジェクト: Zerolone/mgroupware
/**
//作者:Zerolone
//日期:20060306
//修改:20070421 -- 添加变量调试信息
//功能:显示调试信息
//返回:
*/
function printDebug()
{
    global $totaltime, $query_count, $show_queries, $query_log;
    $ThisPage = $_SERVER['PHP_SELF'];
    //变量调试信息 20070421
    $variable_log = "本页得到的_GET变量有:\n" . print_array($_GET);
    $variable_log .= "本页得到的_POST变量有:\n" . print_array($_POST);
    $variable_log .= "本页得到的_COOKIE变量有:\n" . print_array($_COOKIE);
    $variable_log .= "本页得到的_SESSION变量有:\n" . print_array(@$_SESSION);
    $variable_log .= "HTTP头文件:\n" . print_array(getallheaders());
    //
    return "当前页面为:{$ThisPage} [<a href=\"javascript:history.go(0);\">刷新该页面</a>]\n\t  <script language=\"javascript\" type=\"text/javascript\">\n\t\tfunction showdebug(span_show, span_source)\n\t\t{\n\t\t\tvar TheImg;\n\t\t\tspan_show\t= eval(span_show);\n\t  \t\tspan_source\t= eval(span_source)\n\t\t\n\t\t\tif(span_show.style.display == \"none\")\n\t\t\t{\n\t\t\t\tspan_show.style.display = \"\";\n\t \t\t\tspan_source.innerHTML\t= \"<font color=\\'blue\\'>关闭</font>调试信息\"; \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tspan_show.style.display = \"none\";\n\t \t\t\tspan_source.innerHTML\t= \"<font color=\\'red\\'>打开</font>调试信息\"; \n\t\t\t}\n\t\t}\n\t  </script>\n\t  <span id=debug_source onClick=showdebug('debug_show','debug_source')><font color=\"red\">打开</font>调试信息</span><br>\n\t  <!-- <span id=debug_source onClick=showdebug('debug_show','debug_source')><font color=\"blue\">关闭</font>调试信息</span><br> -->\n\t  <div align=\"left\"><span id=debug_show style=\"display=none\">\n\t\t\t\t<textarea style='width=800;height=500' cols='100' rows='8'>{$query_log}{$variable_log}</textarea>\n\t  </span>\n\t  </div>\n\t  ";
}
コード例 #9
0
function dev_dump($argument, $heading = "", $dev = 1, $query_trigger = 0)
{
    //print_r($_SERVER);
    //allows the whole lot to be switched off
    $all_off = 0;
    //allows every dev dump encountered to be switched on
    $all_on = 0;
    if ($dev && !$all_off || $all_on) {
        if (is_array($argument)) {
            echo "<div style='width:95%; float:left; position:relative; background-color:#fff; z-index:1000000; margin-bottom:20px; padding:2%; border:1px solid #4242ff; color:#4242ff; border-radius:2px;'>";
            if ($query_trigger) {
                echo "<span class='dd_q_out full_screen_width bold'><strong>" . $heading . "</strong></span>";
            } else {
                echo "<span>ARRAY DUMP - <strong>" . $heading . "</strong></span><br/><br/>";
            }
            echo "<span class='dd_a_out full_screen_width'>";
            print_array("", $argument);
            echo "</span>";
            echo "</div>";
        } else {
            if (is_numeric($argument)) {
                echo "<div style='width:95%; float:left; position:relative; background-color:#fff; z-index:1000000; margin-bottom:20px; padding:2%;border:1px solid #bf42bf; color:#bf42bf; border-radius:2px;'>";
                $type = 'NUMBER';
            } else {
                if (is_null($argument)) {
                    echo "<div style='width:95%; float:left; position:relative; background-color:#fff; z-index:1000000; margin-bottom:20px; padding:2%;border:1px solid #ff4242; color:#ff4242; border-radius:2px;'>";
                    $type = 'NULL';
                } else {
                    echo "<div style='width:95%; float:left; position:relative; background-color:#fff; z-index:1000000; margin-bottom:20px; padding:2%;border:1px solid #428f42; color:#428f42; border-radius:2px;'>";
                    $type = 'STRING / OTHER';
                }
            }
            echo "<span>" . $type . " DUMP - <strong>" . $heading . "</strong></span><br/><br/>";
            echo "<span style='dd_v_out full_screen_width'>";
            var_dump($argument);
            echo "</span>";
            echo "</div>";
        }
        echo "\n\n";
        if (!$query_trigger) {
            echo "<span style='width:100%;height:10px;float:left;'></span>";
        }
    }
}
コード例 #10
0
ファイル: jsonizer.php プロジェクト: siroj100/hidupgue
function print_array($data)
{
    echo '[';
    foreach ($data as $row) {
        echo '{';
        foreach (array_keys($row) as $key) {
            if (isset($row[$key])) {
                echo $key . ': ';
                if (is_array($row[$key]) === FALSE) {
                    echo '"' . str_replace("\n", "\\n", $row[$key]) . '", ';
                } else {
                    print_array($row[$key]);
                    echo ',';
                }
            }
        }
        echo '},';
    }
    echo ']';
}
コード例 #11
0
ファイル: torrent_info.php プロジェクト: CptTZ/NexusPHP
function print_array($array, $offset_symbol = "|--", $offset = "", $parent = "")
{
    if (!is_array($array)) {
        echo "[{$array}] is not an array!<br />";
        return;
    }
    reset($array);
    switch ($array['type']) {
        case "string":
            printf("<li><div align=left class=string> - <span class=icon>[STRING]</span> <span class=title>[%s]</span> <span class=length>(%d)</span>: <span class=value>%s</span></div></li>", $parent, $array['strlen'], $array['value']);
            break;
        case "integer":
            printf("<li><div align=left class=integer> - <span class=icon>[INT]</span> <span class=title>[%s]</span> <span class=length>(%d)</span>: <span class=value>%s</span></div></li>", $parent, $array['strlen'], $array['value']);
            break;
        case "list":
            printf("<li><div align=left class=list> + <span class=icon>[LIST]</span> <span class=title>[%s]</span> <span class=length>(%d)</span></div>", $parent, $array['strlen']);
            echo "<ul>";
            print_array($array['value'], $offset_symbol, $offset . $offset_symbol);
            echo "</ul></li>";
            break;
        case "dictionary":
            printf("<li><div align=left class=dictionary> + <span class=icon>[DICT]</span> <span class=title>[%s]</span> <span class=length>(%d)</span></div>", $parent, $array['strlen']);
            while (list($key, $val) = each($array)) {
                if (is_array($val)) {
                    echo "<ul>";
                    print_array($val, $offset_symbol, $offset . $offset_symbol, $key);
                    echo "</ul>";
                }
            }
            echo "</li>";
            break;
        default:
            while (list($key, $val) = each($array)) {
                if (is_array($val)) {
                    //echo $offset;
                    print_array($val, $offset_symbol, $offset, $key);
                }
            }
            break;
    }
}
コード例 #12
0
ファイル: Main.php プロジェクト: virgenherrera/huayacan58
 public function mail()
 {
     if (count($this->input->post()) > 0) {
         $post = $this->input->post();
         $post['propio'] = isset($post['propio']) ? $this->unRadio($post['propio']) : 'NO';
         $post['franquicia'] = isset($post['franquicia']) ? $this->unRadio($post['franquicia']) : 'NO';
         $post['sucursales'] = isset($post['sucursales']) ? $this->unRadio($post['sucursales']) : 'NO';
         $post['nombreAgente'] = isset($post['nombreAgente']) ? $post['nombreAgente'] : 'No aplica';
         $post['telAgente'] = isset($post['telAgente']) ? $post['telAgente'] : 'No aplica';
         $post['emailAgente'] = isset($post['emailAgente']) ? $post['emailAgente'] : 'No aplica';
         $data = ['intro' => ucfirst('huayacan58') . ' Email enviado desde: ' . base_url(), 'h1' => ucfirst('huayacan58'), 'p' => 'Email enviado desde: ' . base_url(), 'negocioTitle' => 'Datos del negocio', 'negocioP' => 'Nombre: ' . $post['nombreNegocio'] . '<br>' . 'Giro: ' . $post['giroNegocio'] . '<br>' . 'Interesado en: <br>' . $this->parseLocales($post['locales']) . '<br>' . 'es Propio: ' . $post['propio'] . '<br>' . 'es Franquicia: ' . $post['franquicia'] . '<br>' . 'tiene Sucursales: ' . $post['sucursales'] . '<br>', 'agenteTitle' => 'Datos del Agente', 'agenteP' => 'nombre: ' . $post['nombreAgente'] . '<br>' . 'tel: ' . $post['telAgente'] . '<br>' . 'email: <a target="_blank" href="mailto:' . $post['emailAgente'] . '">' . $post['emailAgente'] . '</a><br>', 'interesadoTitle' => 'Datos del interesado', 'interesadoP' => 'nombre: ' . $post['interesado'] . '<br>' . 'telefono: ' . $post['telefono'] . '<br>' . 'email : <a target="_blank" href="mailto:' . $post['email'] . '">' . $post['email'] . '</a><br>'];
         $mensaje = $this->load->view('email/mensaje', $data, TRUE);
         if ($this->mailer('*****@*****.**', 'Huayacan58.com', $mensaje)) {
             redirect(base_url('enviado#contacto'), 'refresh');
         } else {
             print_array($this->mailer('*****@*****.**', 'Huayacan58.com', $mensaje), 1);
             // <Ojo no dejar en produccion
         }
     } else {
         redirect(base_url(), 'refresh');
     }
 }
コード例 #13
0
ファイル: ajax.php プロジェクト: eliascantoral/guaflix
                if ($user_id == 0) {
                    ?>
							<input type="text" id="txt_ver1" class="form-control" value="0" aria-describedby="basic-addon4" >
						<?php 
                    $_SESSION = array();
                } else {
                    $_SESSION = array();
                    ?>
							<input type="text" id="txt_ver1" class="form-control" value="<?php 
                    echo $user_id;
                    ?>
" aria-describedby="basic-addon4" >
						<?php 
                    session_start();
                    $_SESSION["userid"] = $user_id;
                    print_array($_SESSION);
                    echo is_login();
                }
            }
            break;
        case "profile":
            ////Login
            if (isset($_POST["pass_"]) && isset($_POST["id_"])) {
                $user_id = change_pass($_POST["id_"], $_POST["pass_"]);
            } else {
                if (isset($_POST["oldpass_"]) && isset($_POST["id_"])) {
                    echo "entro aqui";
                    $user_id = check_old_pass($_POST["id_"], $_POST["oldpass_"]);
                } else {
                    if (isset($_POST["name_"]) && isset($_POST["last_"]) && isset($_POST["mail_"]) && isset($_POST["id_"])) {
                        $user_id = change_data($_POST["id_"], $_POST["name_"], $_POST["last_"], $_POST["mail_"]);
コード例 #14
0
ファイル: sqlsrv_tests.php プロジェクト: codifyllc/phpopenfw
$data1->prepare($strsql2);
$data1->execute($params);
$data1->commit();
print_sub_header('Inserted two rows and committed. They should exist...');
$data1->prepare($strsql);
$data1->execute(array(&$param1, &$param2));
$data = $data1->data_key_assoc('id');
print_array($data);
print_sub_header('Deleted the two rows that were added then rolled back.');
$strsql3 = 'delete from contacts where id IN (?, ?)';
$data1->prepare($strsql3);
$data1->execute(array(&$param1, &$param2));
$data1->rollback();
//$data1->commit();
print_sub_header('They should still be there...');
$data1->prepare($strsql);
$data1->execute(array(&$param1, &$param2));
$data = $data1->data_key_assoc('id');
print_array($data);
print_sub_header('Deleted the two rows that were added then committed.');
$data1->prepare($strsql3);
$data1->execute(array(&$param1, &$param2));
$data1->commit();
print_sub_header('They should gone.');
$data1->prepare($strsql);
$data1->execute(array(&$param1, &$param2));
$data = $data1->data_key_assoc('id');
print_array($data);
// Stop Benchmark
$cb->stop_timer();
$cb->print_results(true);
コード例 #15
0
ファイル: user_helper.php プロジェクト: nwtug/academia
function get_all_session_data()
{
    $ci =& get_instance();
    return print_array($ci->session->all_userdata());
}
コード例 #16
0
        print_array($db1->error_message);
    }
    $sql = "select {$sk}.new_pkey('user_project','user_project_id') as newid;";
    if (!$db1->sql_query($sql)) {
        print_array($db1->error_message);
    }
    $newId = $db1->sql_fetchfield('newid');
    $sql = "INSERT INTO {$sk}.user_project(user_project_id,user_id,project_id,usergroup_id) VALUES({$newId},{$newUserId},{$projectId},{$usergroupId})";
    if (!$db1->sql_query($sql)) {
        print_array($db1->error_message);
    }
} else {
    $sql = "select {$sk}.new_pkey('user_admin','user_id',100) as newid;";
    if (!$db1->sql_query($sql)) {
        print_array($db1->error_message);
    }
    $newUserId = $db1->sql_fetchfield('newid');
    $sql = "INSERT INTO {$sk}.user_admin(user_id,username,pwd,admintype_id) VALUES({$newUserId},'{$username}','{$pwd}',2)";
    if (!$db1->sql_query($sql)) {
        print_array($db1->error_message);
    }
    $sql = "select {$sk}.new_pkey('user_project','user_project_id') as newid;";
    if (!$db1->sql_query($sql)) {
        print_array($db1->error_message);
    }
    $newId = $db1->sql_fetchfield('newid');
    $sql = "INSERT INTO {$sk}.user_project(user_project_id,user_id,project_id,usergroup_id) VALUES({$newId},{$newUserId},{$projectId},2)";
    if (!$db1->sql_query($sql)) {
        print_array($db1->error_message);
    }
}
コード例 #17
0
    unset($_SESSION["ADD_NEW"]);
    ?>
	
		<FORM id="stati" name="utenti" method="post" action="<?php 
    echo $formaction;
    ?>
">
		<!-- <<<<<<<<<<<<<<<<<<<<<   MODALITA' FORM IN EDITING  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>--->
		<TABLE cellPadding=0  cellspacing=0 border=0 class="stiletabella" width="75%">		
				  
		<tr> 
			<td> 
				<!-- contenuto-->
				<?php 
    if ($id) {
        print_array($Errors);
        if ($Errors) {
            $tabella->set_errors($Errors);
        }
        if (!count($Errors)) {
            $tabella->set_dati("id={$id}");
        } else {
            $tabella->set_dati($_POST);
        }
    }
    $tabella->edita();
    ?>
				<!-- fine contenuto-->
			</td>
		  </tr> 
		</TABLE>
コード例 #18
0
ファイル: page.class.php プロジェクト: codifyllc/phpopenfw
 public function render()
 {
     //-------------------------------------------------------------
     // No Render?
     //-------------------------------------------------------------
     if ($this->get_data('no-render') || defined('POFW_SKIP_RENDER') && POFW_SKIP_RENDER) {
         return true;
     }
     //-------------------------------------------------------------
     // JavaScript / CSS Add-in Files
     //-------------------------------------------------------------
     if (!empty($this->js_files)) {
         $this->set_data('js_files', $this->js_files);
     }
     if (!empty($this->css_files)) {
         $this->set_data('css_files', $this->css_files);
     }
     //-------------------------------------------------------------
     // Escape Data (or not)
     //-------------------------------------------------------------
     if ($this->data_format == 'xml') {
         foreach ($this->data as $dkey => &$dval) {
             if (!isset($this->no_escape_elements[$dkey])) {
                 $dval = xml_escape_array($dval);
             }
         }
     }
     //-------------------------------------------------------------
     // Create Data
     //-------------------------------------------------------------
     if ($this->data_format == 'xml') {
         $data = array2xml($this->root_node, $this->data);
     } else {
         if ($this->data_format == 'json') {
             $data = json_encode($this->data);
         } else {
             $data = $this->data;
         }
     }
     //-------------------------------------------------------------
     // Output
     //-------------------------------------------------------------
     if ($this->show_data_only) {
         if (is_array($data)) {
             print_array($data);
         } else {
             print $data;
         }
         return true;
     } else {
         $render_function = $this->get_data('render-function');
         //----------------------------------------------------
         // XML
         //----------------------------------------------------
         if ($this->data_format == 'xml') {
             if ($render_function) {
                 return $render_function($data, $this->template);
             } else {
                 if (file_exists($this->template)) {
                     return xml_transform($data, $this->template);
                 } else {
                     if (empty($this->template)) {
                         print "No template file has been specified.";
                     } else {
                         print "Invalid template file specified.";
                     }
                 }
             }
         } else {
             if ($render_function) {
                 return $render_function($data, $this->template);
             } else {
                 print "No valid render function was specified.";
             }
         }
     }
     return false;
 }
コード例 #19
0
ファイル: MY_Model.php プロジェクト: rmuyinda/dms-1
 function check_by_filename($file = '', $sort = 'DESC')
 {
     if ($file == '') {
         return NULL;
     } else {
         $data = array('trash' => 'n', 'fileurl' => $file);
         //$this->output->cache(60); // Will expire in 60 minutes
         $query = $this->db->select()->from($this->_tablename)->where($data)->order_by($this->_primary_key, $sort)->get();
         print_array($this->db->last_query());
         if ($query->num_rows() > 0) {
             foreach ($query->result() as $row) {
                 return $row->id;
             }
         } else {
             return FALSE;
         }
     }
 }
コード例 #20
0
ファイル: qdb_row.inc.php プロジェクト: codifyllc/phpopenfw
            $setup = true;
            break;
        case 'db2':
            $strsql0 = 'select * from contacts where id IN (?, ?, ?, ?)';
            $params = array(1, 2, 3, 4);
            $cols = array(0, 'ID:FIRST_NAME', 'ID', 'FIRST_NAME:CITY', 'FIRST_NAME');
            $setup = true;
            break;
        case 'sqlsrv':
            $strsql0 = 'select * from contacts where id IN (?, ?, ?, ?)';
            $params = array(1, 2, 3, 4);
            $cols = array(0, 'id:first_name', 'id', 'first_name:city', 'first_name');
            $setup = true;
            break;
    }
    //*****************************************************
    // Are We Setup? Run Tests.
    //*****************************************************
    if ($setup) {
        //print_array($cols);
        print_array(qdb_row($data_source, $strsql0, $cols[0], false, $params));
        print qdb_row($data_source, $strsql0, '3', $cols[1], $params);
        print_array(qdb_row($data_source, $strsql0, '3', $cols[2], $params));
        print qdb_row($data_source, $strsql0, 'Chris', $cols[3], $params);
        print_array(qdb_row($data_source, $strsql0, 'Chris', $cols[4], $params));
    } else {
        print div($no_setup_msg, array('class' => 'message_box no_setup'));
    }
} else {
    print div($no_bind_msg, array('class' => 'message_box notice'));
}
コード例 #21
0
ファイル: referral_requests.php プロジェクト: pamalite/yel
print_array(ReferralRequests::get_all());
?>
</p><p style="font-weight: bold;">Referrer confirms for referral 1... </p><p><?php 
$data = array();
$data['id'] = 1;
$data['referrer_acknowledged_on'] = now();
if (ReferralRequests::update($data)) {
    ReferralRequests::close_similar_requests_with_id(1);
    print_array(ReferralRequests::get($data['id']));
} else {
    echo "failed";
    exit;
}
?>
</p><p style="font-weight: bold;">Referrer confirms for referral 4... </p><p><?php 
$data = array();
$data['id'] = 4;
$data['referrer_acknowledged_on'] = now();
if (ReferralRequests::update($data)) {
    ReferralRequests::close_similar_requests_with_id(4);
    print_array(ReferralRequests::get($data['id']));
} else {
    echo "failed";
    exit;
}
?>
</p><p style="font-weight: bold;">Show all requests... </p><p><?php 
print_array(ReferralRequests::get_all());
?>
</p>
コード例 #22
0
ファイル: invoice.php プロジェクト: pamalite/yel
</p><p style="font-weight: bold;">Add an item... </p><p><?php 
if (Invoice::add_item($id, 270.98, 23, 'some references')) {
    print_array(Invoice::get_items_of($id));
} else {
    echo "failed";
    exit;
}
?>
</p><p style="font-weight: bold;">Add another item... </p><p><?php 
if (Invoice::add_item($id, 0.05, 93, 'some other charges')) {
    print_array(Invoice::get_items_of($id));
} else {
    echo "failed";
    exit;
}
?>
</p><p style="font-weight: bold;">Pay an invoice... </p><p><?php 
$data = array();
$data['id'] = $id;
$data['paid_on'] = sql_date_add(today(), 30, 'day');
$data['paid_through'] = 'CHQ';
$data['paid_id'] = 'a_cheque_number';
if (Invoice::update($data)) {
    print_array(Invoice::get($id));
} else {
    echo "failed";
    exit;
}
?>
</p>
コード例 #23
0
ファイル: mysql5.php プロジェクト: Zerolone/soutuan8
 /**
  * 函数调用错误提示
  *
  * @param 方法名 $n
  * @param 参  数 $v
  */
 public function __call($n, $v)
 {
     echo '错误的方法名:' . $n;
     echo '<br>错误的参数:' . print_array($v);
     echo '<hr>';
 }
コード例 #24
0
ファイル: keyword.php プロジェクト: rhoone/rhoone-keyword
 * @license https://vistart.name/license/
 */
use rhoone\models\Keyword;
/* @var $keyword Keyword */
function print_array($array)
{
    foreach ($array as $content) {
        echo $content . "<br/>";
    }
}
?>
<table class="table">
    <thead>
        <tr>
            <th>Keyword</th>
            <th>Segmented</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><?php 
echo $keyword->raw;
?>
</td>
            <td><?php 
print_array($keyword->segmented);
?>
</td>
        </tr>
    </tbody>
</table>
コード例 #25
0
            </select>
            <label for="bloque">Bloque</label>
        	<select name="bloque">
            	<option value=""></option>
                <option value="I">I</option>
                <option value="II">II</option>
                <option value="III">III</option>
                <option value="IV">IV</option>
                <option value="V">V</option>
            </select>
        </form>
	</section>

	<?php 
    $level = 'Secundaria';
    ?>
	<?php 
    $meta_query = array('meta_key' => 'pl_nivel', 'meta_value' => $level);
    $planeaciones = get_plans($meta_query);
    ?>
    <?php 
    print_array($planeaciones);
    ?>

<?php 
}
// end of the loop.
?>

<?php 
get_footer();
コード例 #26
0
ファイル: index.php プロジェクト: onexite/File-Manager
            $html .= '<td class="hidden-xs col-xs-3 col-sm-3 col-md-3">' . action($file) . '</td></tr>';
        }
    }
    $html .= '<tr>';
    if ($table_fixed == '') {
        $html .= '<td colspan="5" class="col-xs-12 col-sm-12 col-md-12">';
    } else {
        $html .= '<td colspan="4" class="col-xs-12 col-sm-12 col-md-12">';
    }
    $html .= $lang[9] . ' : <mark>' . $page . '</mark> ' . $lang[10] . ' : <mark>' . $total_files . '</mark></td></tr></tbody></table></div>';
    if ($alert_msg != '') {
        $alert_msg = alert($alert_msg);
    }
    $response = array('table' => $html, 'total' => $total_pages, 'page' => $page, 'dir' => $directory, 'dirHtml' => GetOldirectory(), 'alert' => $alert_msg);
    unset($html);
    die(print_array($response));
}
// free memory
unset($files);
unset($times);
//unset($directory);
unset($total_files);
//unset($page);
unset($offset);
//unset($total_pages);
unset($perpage);
unset($table_fixed);
unset($RTL_languages);
unset($show_file_or_dir);
unset($alert_msg);
?>
コード例 #27
0
ファイル: jsn.php プロジェクト: MarekBielik/jsn-to-xml
function print_object($item)
{
    global $options;
    foreach ($item as $name => $value) {
        $name = replace_inv($name);
        switch (gettype($value)) {
            case "array":
                write('elem_s', $name);
                print_array($value);
                write('elem_e', $name);
                break;
            case "object":
                write('elem_s', $name);
                print_object($value);
                write('elem_e', $name);
                break;
            case "integer":
            case "string":
                write('obj_int_str', $name, $value);
                break;
            case "boolean":
            case "NULL":
                write('obj_bool_null', $name, $value);
                break;
        }
    }
}
コード例 #28
0
ファイル: amavis.stats.php プロジェクト: BillTheBest/1.6.x
function print_array($array, $prep = '', $no_pre = false)
{
    $newArray = array();
    foreach ($array as $key => $value) {
        $newArray[$key] = $value;
    }
    // Print an array tree.
    $ret = '';
    $prep = "{$prep}|";
    foreach ($array as $key => $val) {
        $type = gettype($val);
        if (is_array($val) && !$val) {
            $line = "-+ {$key} (<strong>{$type}</strong>)\n";
            $line .= "\t" . $prep . " |\t(<em>is empty</em>)\n";
        } elseif (is_array($val)) {
            $line = "-+ {$key} (<strong>{$type}</strong>)\n";
            $line .= print_array($val, "{$prep} ", true);
        } else {
            $val = trim($val);
            $line = "-&gt; {$key} = \"{$val}\" (<em>{$type}</em>)\n";
        }
        $ret .= "\t" . $prep . $line;
    }
    if ($no_pre) {
        return $ret;
    }
    return "<pre>\n" . $ret . "</pre>\n";
}
コード例 #29
0
<?php

//***********************************************************************
// Standard Query
//***********************************************************************
print_header('Standard Query');
$strsql = 'select * from contacts where id IN (2, 4)';
$data1->data_query($strsql);
print_array($data1->data_assoc_result());
//***********************************************************************
// Standard Query using qdb_list()
//***********************************************************************
print_header('Standard Query using qdb_list()');
$strsql = 'select * from contacts where id IN (1, 3)';
print_array(qdb_list($data_source, $strsql));
コード例 #30
0
function print_array($array, $title = NULL, $htmlisekey = false, $indent = '')
{
    global $vbphrase;
    if ($title === NULL) {
        $title = 'My Array';
    }
    if (is_array($array)) {
        echo iif(empty($indent), "<div class=\"echoarray\">\n") . "{$indent}<li><b" . iif(empty($indent), ' style="font-size: larger"', '') . ">" . iif($htmlisekey, htmlspecialchars_uni($title), $title) . "</b><ul>\n";
        foreach ($array as $key => $val) {
            if (is_array($val)) {
                print_array($val, $key, $htmlisekey, $indent . "\t");
            } else {
                echo "{$indent}\t<li>" . iif($htmlisekey, htmlspecialchars_uni($key), $key) . " = '<i>" . htmlspecialchars_uni($val) . "</i>'</li>\n";
            }
        }
        echo iif(empty($indent), "</div>\n") . "{$indent}</ul></li>\n";
    }
}