コード例 #1
0
ファイル: test_json.php プロジェクト: jjjj222/hsinfo
function dump_array($arr, $indent)
{
    $i = 0;
    foreach ($arr as $key => $value) {
        $value_type = gettype($value);
        echo "{$indent}" . $i++ . ": ";
        #echo "$indent";
        echo "Key=" . $key . ", Value=";
        if ($value_type == "array") {
            echo "<br>";
            dump_array($value, $indent . "--> ");
            #dump_array_type($value, $indent . "--> ");
        } else {
            if ($value_type == "object") {
                #echo $value_type;
                #var_dump($value);
                echo "<br>";
                dump_array((array) $value, $indent . "--> ");
            } else {
                echo $value;
                echo "<br>";
            }
        }
    }
}
コード例 #2
0
ファイル: HFile_ueconv.php プロジェクト: isantiago/foswiki
function dump_colours($cats)
{
    global $colours;
    $usedcols = array();
    foreach ($cats as $c) {
        array_push($usedcols, $colours[$c - 1]);
    }
    dump_array($usedcols, "\$colours        ");
}
コード例 #3
0
ファイル: debug.php プロジェクト: klr2003/sourceread
function dump_array(&$mit, $indent = "")
{
    while (list($key, $value) = each($mit)) {
        if (gettype($value) == "array") {
            echo "<br>" . $indent . "<font face='verdana,helvetica' size=1><b>[{$key}]</b> =";
            echo " ARRAY<br>\n" . $indent . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[</font><br>\n";
            dump_array($value, $indent . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
            echo $indent . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]<br>\n";
        } else {
            echo $indent . "<font face='verdana,helvetica' size=1><b>[{$key}]</b> =";
            echo " [" . htmlspecialchars($value) . "]</font><br>\n";
        }
    }
}
コード例 #4
0
ファイル: vardump.php プロジェクト: Sywooch/dobox
/**
 * Works in conjunction with the debug function to pretty-print a variable of arbitrary type.
 *
 * @return string
 * @param mixed $var A reference to the variable to pretty-print
 * @param bool $b_verbose A boolean that indicates whether to print verbose output.
 * @param int $i_indent The current intendation level.
 */
function dump_arbitrary(&$var, $b_verbose = false, $i_indent = 0, $str_unique_id = '')
{
    // if the var is an array, recurse...
    if (is_array($var)) {
        dump_array($var, $b_verbose, $i_indent);
    } else {
        if (is_object($var)) {
            dump_object($var, $b_verbose, $i_indent);
        } else {
            dump_scalar($var, $b_verbose, $str_unique_id);
        }
    }
}
コード例 #5
0
function read($resource, $len = null)
{
    global $udp_host_map;
    # Max packet length is magic.  If we're reading a pipe that has data but
    # isn't going to generate any more without some input, then reading less
    # than all bytes in the buffer or 8192 bytes, the next read will never
    # return.
    if (is_null($len)) {
        $len = 8192;
    }
    #my_print(sprintf("Reading from $resource which is a %s", get_rtype($resource)));
    $buff = '';
    switch (get_rtype($resource)) {
        case 'socket':
            if (array_key_exists((int) $resource, $udp_host_map)) {
                my_print("Reading UDP socket");
                list($host, $port) = $udp_host_map[(int) $resource];
                socket_recvfrom($resource, $buff, $len, PHP_BINARY_READ, $host, $port);
            } else {
                my_print("Reading TCP socket");
                $buff .= socket_read($resource, $len, PHP_BINARY_READ);
            }
            break;
        case 'stream':
            global $msgsock;
            # Calling select here should ensure that we never try to read from a socket
            # or pipe that doesn't currently have data.  If that ever happens, the
            # whole php process will block waiting for data that may never come.
            # Unfortunately, selecting on pipes created with proc_open on Windows
            # always returns immediately.  Basically, shell interaction in Windows
            # is hosed until this gets figured out.  See https://dev.metasploit.com/redmine/issues/2232
            $r = array($resource);
            my_print("Calling select to see if there's data on {$resource}");
            while (true) {
                $cnt = stream_select($r, $w = NULL, $e = NULL, 0);
                # Stream is not ready to read, have to live with what we've gotten
                # so far
                if ($cnt === 0) {
                    break;
                }
                # if stream_select returned false, something is wrong with the
                # socket or the syscall was interrupted or something.
                if ($cnt === false or feof($resource)) {
                    my_print("Checking for failed read...");
                    if (empty($buff)) {
                        my_print("----  EOF ON {$resource}  ----");
                        $buff = false;
                    }
                    break;
                }
                $md = stream_get_meta_data($resource);
                dump_array($md);
                if ($md['unread_bytes'] > 0) {
                    $buff .= fread($resource, $md['unread_bytes']);
                    break;
                } else {
                    #$len = 1;
                    $tmp = fread($resource, $len);
                    $buff .= $tmp;
                    if (strlen($tmp) < $len) {
                        break;
                    }
                }
                if ($resource != $msgsock) {
                    my_print("buff: '{$buff}'");
                }
                $r = array($resource);
            }
            my_print(sprintf("Done with the big read loop on {$resource}, got %d bytes", strlen($buff)));
            break;
        default:
            # then this is possibly a closed channel resource, see if we have any
            # data from previous reads
            $cid = get_channel_id_from_resource($resource);
            $c = get_channel_by_id($cid);
            if ($c and $c['data']) {
                $buff = substr($c['data'], 0, $len);
                $c['data'] = substr($c['data'], $len);
                my_print("Aha!  got some leftovers");
            } else {
                my_print("Wtf don't know how to read from resource {$resource}, c: {$c}");
                if (is_array($c)) {
                    dump_array($c);
                }
                break;
            }
    }
    my_print(sprintf("Read %d bytes", strlen($buff)));
    return $buff;
}
コード例 #6
0
            require_once 'includes/content/start.php';
    }
}
// Debug informations
if ($config['debug']) {
    $endTime = getTime();
    $totalTime = $endTime - $startTime;
    $debug['pageGenerated'] = 'Page was generated in ' . $totalTime . ' seconds';
    if (function_exists('memory_get_usage')) {
        $debug['memoryUsage'] = 'Memory usage : ' . round(memory_get_usage() / 1024) . ' KB';
    } else {
        $debug['memoryUsage'] = '';
    }
    $debug['numberQueries'] = 'Page used ' . $con->getNumQueries() . ' queries';
    $debug['queriesData'] = '<div id="queriesList">';
    foreach ($con->getQueriesDebug() as $queryData) {
        $debug['queriesData'] .= $queryData . '<br />';
    }
    $debug['queriesData'] .= '</div>';
    function dump_array($array)
    {
        return print_r($array, true);
    }
    $debug['dumpVars'] = '<div id="dumpVars">Variables dump<br />GET Vars<br />' . dump_array($_GET) . '<br /><br />POST Vars<br />
    ' . dump_array($_POST) . '<br /><br />SESSION Vars<br />
    ' . dump_array($_SESSION) . '<br /><br />COOKIE Vars<br />' . dump_array($_COOKIE) . '</div>';
    echo '<link rel="stylesheet" href="../includes/commonStyle.css" type="text/css" />';
    echo '<div id="debug">DEBUG<br />' . $debug['pageGenerated'] . '<br />' . $debug['memoryUsage'] . '<br />' . $debug['numberQueries'] . '<br />' . $debug['queriesData'] . '<hr />' . $debug['dumpVars'] . '</div>';
}
echo '</div>';
echo "</body></html>";
コード例 #7
0
ファイル: subpool_delete.php プロジェクト: kfarr2/psu-orsee
                <FORM action="subpool_delete.php">
                <INPUT type=hidden name="subpool_id" value="' . $subpool_id . '">
                <TABLE class="or_formtable">
                <TR><TD colspan="2">
				<TABLE width="100%" border=0 class="or_panel_title"><TR>
						<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
							' . lang('delete_subpool') . ' "' . $subpool['subpool_name'] . '"
						</TD>
				</TR></TABLE>
				</TD></TR>
                
                <TR>
                	<TD colspan=2>
                       	' . lang('really_delete_subpool?') . '
                                <BR><BR>';
    dump_array($subpool);
    echo '</TD></TR>
                <TR><TD align=left colspan=2>
                    <INPUT class="button" type=submit name=reallydelete value="' . lang('yes_delete') . '">
				<BR>' . lang('merge_subject_pool_with') . ' ';
    echo subpools__select_field("merge_with", "1", array($subpool_id));
    echo '		</TD></TR><TR>
					<TD align=center colspan=2><BR><BR>
					<INPUT class="button" type=submit name=betternot value="' . lang('no_sorry') . '">
					</TD>
					</TR>
	                </TABLE>
                </FORM>
                </center>';
}
include "footer.php";
コード例 #8
0
    // form
    echo '<center>';
    echo '
		<TABLE class="or_formtable">
			<TR><TD colspan="2">
				<TABLE width="100%" border=0 class="or_panel_title"><TR>
						<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
							' . lang('delete_symbol') . ' ' . $symbol['content_name'] . '
						</TD>
				</TR></TABLE>
			</TD></TR>
			<TR>
				<TD colspan=2>
					' . lang('do_you_really_want_to_delete') . '
					<BR><BR>';
    dump_array($symbol);
    echo '
				</TD>
			</TR>
			<TR>
				<TD align=left>
                        ' . button_link('lang_symbol_delete.php?lang_id=' . urlencode($lang_id) . '&reallydelete=true', lang('yes_delete'), 'check-square biconred') . '
                </TD>
                <TD align=right>
                    	' . button_link('lang_symbol_delete.php?lang_id=' . urlencode($lang_id) . '&betternot=true', lang('no_sorry'), 'undo bicongreen') . '
				</TD>
			</TR>
		</TABLE>
		</center>';
}
include "footer.php";
コード例 #9
0
ファイル: session_delete.php プロジェクト: kfarr2/psu-orsee
if ($proceed) {
    // form
    echo '	<CENTER>
		<TABLE class="or_formtable">
			<TR><TD colspan="2">
				<TABLE width="100%" border=0 class="or_panel_title"><TR>
								<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '">
									' . lang('delete_session') . ' ' . session__build_name($session) . '
								</TD>
				</TR></TABLE>
			</TD></TR>
			<TR>
				<TD colspan=2>
					' . lang('really_delete_session') . '
					<BR><BR>';
    dump_array($session);
    echo '
				</TD>
			</TR>
			<TR>
				<TD align=left>
					' . button_link('session_delete.php?session_id=' . $session_id . '&reallydelete=true', lang('yes_delete'), 'check-square biconred') . '
				</TD>
				<TD align=right>
					' . button_link('session_delete.php?session_id=' . $session_id . '&betternot=true', lang('no_sorry'), 'undo bicongreen') . '
				</TD>
			</TR>
		</TABLE>
		</center>';
}
include "footer.php";
コード例 #10
0
<?php

// these lines format the output as HTML comments
// and call dump_array repeatedly
echo '\\n<!-- BEGIN VARIABLE DUMP -->\\n\\n';
echo '<!-- BEGIN GET VARS -->\\n';
echo '<!-- ' . dump_array($HTTP_GET_VARS) . ' -->\\n';
echo '<!-- BEGIN POST VARS -->\\n';
echo '<!-- ' . dump_array($HTTP_POST_VARS) . ' -->\\n';
echo '<!-- BEGIN SESSION VARS -->\\n';
echo '<!-- ' . dump_array($HTTP_SESSION_VARS) . ' -->\\n';
echo '<!-- BEGIN COOKIE VARS -->\\n';
echo '<!-- ' . dump_array($HTTP_COOKIE_VARS) . ' -->\\n';
echo '\\n<!-- END VARIABLE DUMP -->\\n';
// dump_array() takes one array as a parameter
// It iterates through that array, creating a string
// to represent the array as a set
function dump_array($array)
{
    if (is_array($array)) {
        $size = count($array);
        $string = '';
        if ($size) {
            $count = 0;
            $string .= '{ ';
            // add each element's key and value to the string
            foreach ($array as $var => $value) {
                $string .= "{$var} = {$value}";
                if ($count++ < $size - 1) {
                    $string .= ', ';
                }
コード例 #11
0
    // form
    echo '  <CENTER>
			<FORM action="options_participant_profile_delete.php">
			<INPUT type="hidden" name="mysql_column_name" value="' . $field_name . '">
			<TABLE class="or_formtable">
				<TR><TD colspan="2">
					<TABLE width="100%" border=0 class="or_panel_title"><TR>
							<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
								' . lang('delete_participant_profile_field') . ' "' . $field_name . '"
							</TD>
					</TR></TABLE>
				</TD></TR>
				<TR>
					<TD colspan=2>' . lang('really_delete_profile_form_field?') . '<BR><BR>
								<B>' . lang('delete_profile_form_field_note') . '</B><BR><BR>';
    dump_array($field);
    echo '			</TD>
				</TR>
				<TR>
				<TD align=center>
				' . button_link('options_participant_profile_delete.php?mysql_column_name=' . urlencode($field_name) . '&reallydelete=true', lang('yes_delete'), 'check-square biconred') . '	
				</TD>
			</TR>
			<TR>
				<TD align="right" colspan=2><BR><BR>
				' . button_link('options_participant_profile_edit.php?mysql_column_name=' . urlencode($field_name), lang('no_sorry'), 'undo bicongreen') . '
				</TD>
			</TR>
			</TABLE>

			</FORM>
コード例 #12
0
                <FORM action="experiment_type_delete.php">
                <INPUT type=hidden name="exptype_id" value="' . $exptype_id . '">

                <TABLE class="or_formtable">
                	<TR><TD colspan="2">
						<TABLE width="100%" border=0 class="or_panel_title"><TR>
								<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
									' . lang('delete_experiment_type') . ' "' . $exptype['exptype_name'] . '"
								</TD>
						</TR></TABLE>
					</TD></TR>
                        <TR>
                        <TD colspan="2" align="center">
                                        ' . lang('do_you_really_want_to_delete') . '
                                        <BR><BR>';
    dump_array($exptype);
    echo '
                                </TD>
                        </TR>
                        <TR>
                            <TD align=left width="50%">
                            ' . lang('replace_experimenttype_with') . ' ';
    experiment__exptype_select_field("merge_with", "exptype_id", "exptype_name", "", $exptype['exptype_id']);
    echo '<BR><BR>
                        <INPUT class="button" type="submit" name="reallydelete" value="' . lang('yes_delete') . '">';
    echo '		</TD>
                                </TD>
                                <TD align=right>
                                        <INPUT class="button" type="submit" name="betternot" value="' . lang('no_sorry') . '">
                                </TD>
                        </TR>
コード例 #13
0
ファイル: experiment_delete.php プロジェクト: danorama/orsee
if ($proceed) {
    // form
    echo '<center>
        <TABLE class="or_formtable">
            <TR><TD colspan="2">
                <TABLE width="100%" border=0 class="or_panel_title"><TR>
                        <TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
                            ' . lang('delete_experiment') . ' ' . $experiment['experiment_name'] . '
                        </TD>
                </TR></TABLE>
            </TD></TR>
            <TR>
                <TD colspan=2>
                    ' . lang('really_delete_experiment') . '
                    <BR><BR>';
    dump_array($experiment);
    echo '
                </TD>
            </TR>
            <TR>
                <TD align=left>
                    ' . button_link('experiment_delete.php?experiment_id=' . $experiment_id . '&reallydelete=true', lang('yes_delete'), 'check-square biconred') . '
                </TD>
                <TD align=right>
                    ' . button_link('experiment_delete.php?experiment_id=' . $experiment_id . '&betternot=true', lang('no_sorry'), 'undo bicongreen') . '
                </TD>
            </TR>
        </TABLE>
        </center>';
}
include "footer.php";
コード例 #14
0
ファイル: handler.php プロジェクト: TU-Berlin/Mumie
/**
 * Function to write some information into a logfile
 */
function event_logoutput($event_name, $eventdata)
{
    global $CFG;
    if ($LOGG = fopen($CFG->dirroot . '/mod/mumiemodule/logs/event_log.txt', 'a')) {
        fputs($LOGG, date("F d Y h:i:s A") . ": ");
        fputs($LOGG, $event_name);
        fputs($LOGG, dump_array($eventdata));
        fputs($LOGG, "\n \n");
    }
}
コード例 #15
0
ファイル: File.php プロジェクト: crodas/path
 /**
  *  Dump array into a file. Similar to *var_dump* but the result
  *  is not human readable (reduces space by a third in large arrays)
  */
 public static function dumpArray($path, array $data, $perm = 0644)
 {
     self::write($path, "<?php return " . dump_array($data) . ';', $perm);
 }
コード例 #16
0
ファイル: dump_variables.php プロジェクト: joe-bq/phpWebDev
<?php

// <!-- NOTE -->
// <!-- you can check the source of dump_variables.php to see dumped value of variables. -->
// these lines format the output as HTML comments
// and call dump_array repeatedly
echo "\n<!-- BEGIN VARIABLE DUMP -->\n\n";
echo "<!-- BEGIN GET VARS -->\n";
echo '<!-- ' . dump_array($_GET) . " -->\n";
echo "<!-- BEGIN POST VARS -->\n";
echo '<!-- ' . dump_array($_POST) . " -->\n";
echo "<!-- BEGIN SESSION VARS -->\n";
echo '<!-- ' . dump_array($_SESSION) . " -->\n";
echo "<!-- BEGIN COOKIE VARS -->\n";
echo '<!-- ' . dump_array($_COOKIE) . " -->\n";
echo "\n<!-- END VARIABLE DUMP -->\n";
// dump_array() takes one array as a parameter
// It iterates through that array, creating a single
// line string to represent the array as a set
function dump_array($array)
{
    if (is_array($array)) {
        $size = count($array);
        $string = '';
        if ($size) {
            $count = 0;
            $string .= '{ ';
            // add each element's key and value to the string
            foreach ($array as $var => $value) {
                $string .= "{$var} = {$value}";
                if ($count++ < $size - 1) {
コード例 #17
0
function dump_array($array)
{
    if (gettype($array) == "array") {
        echo "<ul>";
        while (list($index, $subarray) = each($array)) {
            echo "<li><b>{$index} </b><code>=&gt;</code> ";
            dump_array($subarray);
            echo "</li>";
        }
        echo "</ul>";
    } else {
        echo $array;
    }
}
コード例 #18
0
ファイル: download_delete.php プロジェクト: danorama/orsee
        $target = $experiment_id ? "experiment_id:" . $experiment_id : "general";
        log__admin("file_delete", $target);
        message(lang('download_deleted'));
        redirect('admin/download_main.php');
        $proceed = false;
    }
}
if ($proceed) {
    // form
    echo '  <CENTER>
        <TABLE class="or_formtable">
            <TR>
                <TD colspan=2>
                    ' . lang('do_you_really_want_to_delete') . '
                    <BR><BR>';
    dump_array($upload);
    echo '
                </TD>
            </TR>
            <TR>
                <TD align=left>
                    ' . button_link('download_delete.php?dl=' . $upload_id . '&reallydelete=true', lang('yes_delete'), 'check-square biconred') . '
                </TD>
                <TD align=right>
                    ' . button_link('download_delete.php?dl=' . $upload_id . '&betternot=true', lang('no_sorry'), 'undo bicongreen') . '
                </TD>
            </TR>
        </TABLE>
        </center>';
}
include "footer.php";
コード例 #19
0
function dump_resource_map()
{
    global $resource_type_map;
    dump_array($resource_type_map, 'Resource map');
}
コード例 #20
0
<?php

// these lines format the output as HTML comments
// and call dump_array repeatedly
echo "\n<!-- BEGIN VARIABLE DUMP -->\n\n";
echo "<!-- BEGIN GET VARS -->\n";
echo "<!-- " . dump_array($_GET) . " -->\n";
echo "<!-- BEGIN POST VARS -->\n";
echo "<!-- " . dump_array($_POST) . " -->\n";
echo "<!-- BEGIN SESSION VARS -->\n";
echo "<!-- " . dump_array($_SESSION) . " -->\n";
echo "<!-- BEGIN COOKIE VARS -->\n";
echo "<!-- " . dump_array($_COOKIE) . " -->\n";
echo "\n<!-- END VARIABLE DUMP -->\n";
// dump_array() takes one array as a parameter
// It iterates through that array, creating a single
// line string to represent the array as a set
function dump_array($array)
{
    if (is_array($array)) {
        $size = count($array);
        $string = "";
        if ($size) {
            $count = 0;
            $string .= "{ ";
            // add each element's key and value to the string
            foreach ($array as $var => $value) {
                $string .= $var . " = " . $value;
                if ($count++ < $size - 1) {
                    $string .= ", ";
                }
コード例 #21
0
ファイル: events_delete.php プロジェクト: danorama/orsee
        $query = "DELETE FROM " . table('events') . "\n                WHERE event_id= :event_id";
        $result = or_query($query, $pars);
        log__admin("events_delete", "event_id:" . $event_id);
        message(lang('lab_reservation_deleted'));
        redirect('admin/calendar_main.php');
    }
}
if ($proceed) {
    // form
    echo '  <CENTER>
        <TABLE>
            <TR>
                <TD colspan=2>
                    ' . lang('do_you_really_want_to_delete') . '
                    <BR><BR>';
    dump_array($space);
    echo '
                </TD>
            </TR>
            <TR>
                <TD align=left>
                    ' . button_link('events_delete.php?event_id=' . $event_id . '&reallydelete=true', lang('yes_delete'), 'check-square biconred') . '
                </TD>
                <TD align=right>
                    ' . button_link('events_delete.php?event_id=' . $event_id . '&betternot=true', lang('no_sorry'), 'undo bicongreen') . '
                </TD>
            </TR>
        </TABLE>
        </center>';
}
include "footer.php";
コード例 #22
0
function dump_array($var)
{
    switch (gettype($var)) {
        case 'integer':
        case 'double':
        case 'string':
            echo "{$var}";
            break;
        case 'array':
            if (!count($var)) {
                echo 'Empty Array.<br>';
            } else {
                echo '<table border="1" width="100%">';
                echo '<tr><th>Key</th><th>DataType</th><th>Value</th></tr>';
                do {
                    echo '<tr><td align="left" valign="top">';
                    echo key($var);
                    echo '</td><td align="left" valign="top">';
                    echo gettype(key($var));
                    echo '</td><td align="left" valign="top">';
                    dump_array($var[key($var)]);
                    echo "</td></tr>";
                } while (next($var));
                echo "</table>";
            }
            break;
        default:
            echo "unknown data type";
            break;
    }
}
コード例 #23
0
 function stdapi_registry_create_key($req, &$pkt)
 {
     my_print("doing stdapi_registry_create_key");
     if (is_windows() and is_callable('reg_open_key')) {
         $root_tlv = packet_get_tlv($req, TLV_TYPE_ROOT_KEY);
         $base_tlv = packet_get_tlv($req, TLV_TYPE_BASE_KEY);
         $perm_tlv = packet_get_tlv($req, TLV_TYPE_PERMISSION);
         dump_array($root_tlv);
         dump_array($base_tlv);
         # For some reason the php constants for registry root keys do not have
         # the high bit set and are 1 less than the normal Windows constants, so
         # fix it here.
         $root = ($root_tlv['value'] & ~0x80000000) + 1;
         $base = $base_tlv['value'];
         my_print("reg opening '{$root}', '{$base}'");
         $key = reg_open_key($root, $base);
         if (!$key) {
             my_print("reg open failed: {$key}");
             return ERROR_FAILURE;
         }
         $key_id = register_registry_key($key);
         packet_add_tlv($pkt, create_tlv(TLV_TYPE_HKEY, $key_id));
         return ERROR_SUCCESS;
     } else {
         return ERROR_FAILURE;
     }
 }
コード例 #24
0
    echo '  <CENTER>
                <FORM action="participation_status_delete.php">
                <INPUT type="hidden" name="pstatus_id" value="' . $pstatus_id . '">

                <TABLE class="or_formtable">
    	            <TR><TD colspan="2">
						<TABLE width="100%" border=0 class="or_panel_title"><TR>
								<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
									' . lang('delete_participation_status') . ' "' . $pstatus_internal_name[lang('lang')] . '"
								</TD>
						</TR></TABLE>
					</TD></TR>
                    <TR>
						<TD colspan=2>
                                ' . lang('really_delete_participation_status?') . '<BR><BR>';
    dump_array($pstatus);
    echo '
                        </TD>
                    </TR>';
    $pstatus_internal_names = lang__load_lang_cat('participation_status_internal_name');
    echo '
                        <TR>
                            <TD align=left colspan=2>
                            <INPUT class="button" type=submit name=reallydelete value="' . lang('yes_delete') . '">
					<BR>
					' . lang('merge_participation_status_with') . '
					' . expregister__participation_status_select_field('merge_with', '', array($pstatus_id)) . '  				
					</TD></TR>
				<TR>
                                <TD align=center colspan=2><BR><BR>
                                <INPUT class="button" type=submit name=betternot value="' . lang('no_sorry') . '">
コード例 #25
0
ファイル: lang_item_delete.php プロジェクト: danorama/orsee
if ($proceed) {
    // form
    echo '  <CENTER>
                <TABLE class="or_formtable">
                <TR><TD colspan=2>
                    <TABLE width="100%" border=0 class="or_panel_title"><TR>
                        <TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
                            ' . $header . ' - ' . $titem[$headervar] . '
                        </TD>
                    </TR></TABLE>
                </TD></TR>
                        <TR>
                                <TD colspan=2>
                                        ' . lang('do_you_really_want_to_delete') . '
                                        <BR><BR>';
    dump_array($titem);
    echo '
                                </TD>
                        </TR>
                        <TR>
                                <TD align=left>
                                        ' . button_link('lang_item_delete.php?id=' . urlencode($id) . '&item=' . urlencode($item) . '&reallydelete=true', lang('yes_delete'), 'check-square biconred') . '
                                </TD>
                                <TD align=right>
                                        ' . button_link('lang_item_delete.php?id=' . urlencode($id) . '&item=' . urlencode($item) . '&betternot=true', lang('no_sorry'), 'undo bicongreen') . '
                                </TD>
                        </TR>
                </TABLE>
                </center>';
}
include "footer.php";
コード例 #26
0
if ($proceed) {
    // form
    echo '  <CENTER>
			<FORM action="payments_budget_delete.php">
			<INPUT type="hidden" name="budget_id" value="' . $budget_id . '">
			<TABLE class="or_formtable">
				<TR><TD colspan="2">
					<TABLE width="100%" border=0 class="or_panel_title"><TR>
							<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
								' . lang('delete_budget') . ' "' . $budget['budget_name'] . '"
							</TD>
					</TR></TABLE>
				</TD></TR>
				<TR>
					<TD colspan=2>' . lang('really_delete_budget?') . '<BR><BR>';
    dump_array($budget);
    echo '			</TD>
				</TR>
				<TR>
				<TD align=left colspan=2>
				' . lang('merge_budget_with') . '
				' . payments__budget_selectfield('merge_with', '', array($budget_id)) . ' 
				<BR>
				<INPUT class="button" type=submit name=reallydelete value="' . lang('yes_delete') . '">		
				</TD>
			</TR>
			<TR>
				<TD align=center colspan=2><BR><BR>
					<INPUT class="button" type=submit name=betternot value="' . lang('no_sorry') . '">
				</TD>
			</TR>
コード例 #27
0
ファイル: orsee_mysql.php プロジェクト: kfarr2/psu-orsee
function dump_array($array, $title = "", $dolang = true)
{
    echo '<TABLE border=0>';
    if ($title) {
        echo '<TR><TD colspan=2 align="center"><B>' . $title . '</B></TD></TR>';
    }
    foreach ($array as $key => $value) {
        echo '<TR><TD align="right" valign="top">';
        if ($dolang) {
            echo lang($key);
        } else {
            echo stripslashes($key);
        }
        echo ':</TD><TD>&nbsp;</TD><TD align=left valign="top">';
        if (is_array($value)) {
            dump_array($value, $title, $dolang);
        } else {
            if ($dolang) {
                echo lang($value);
            } else {
                echo stripslashes($value);
            }
        }
        echo "</TD></TR>\n";
    }
    echo '</TABLE>';
}
コード例 #28
0
ファイル: admin_delete.php プロジェクト: danorama/orsee
        echo lang('admin_delete_warning');
    }
    echo '
        <TABLE class="or_formtable">
            <TR><TD colspan="2">
                <TABLE width="100%" border=0 class="or_panel_title"><TR>
                        <TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
                            ' . $admin['fname'] . ' ' . $admin['lname'] . ' (' . $admin['adminname'] . ')
                        </TD>
                </TR></TABLE>
            </TD></TR>
            <TR>
                <TD colspan=2>
                    ' . lang('do_you_really_want_to_delete') . '
                    <BR><BR>';
    dump_array($admin);
    echo '
                </TD>
            </TR>
            <TR>
                <TD align=left>
                    ' . button_link('admin_delete.php?admin_id=' . $admin_id . '&reallydelete=true', lang('yes_delete'), 'check-square biconred') . '
                </TD>
                <TD align=right>
                    ' . button_link('admin_delete.php?admin_id=' . $admin_id . '&betternot=true', lang('no_sorry'), 'undo bicongreen') . '
                </TD>
            </TR>
        </TABLE>
        </center>';
}
include "footer.php";
コード例 #29
0
 function dump_array($params, &$data, $level = 1, $ignore = array(), $accessor)
 {
     $maxlevel = 3;
     if (isset($params['maxlevel'])) {
         $maxlevel = (int) $params['maxlevel'];
         $maxlevel = max(1, $maxlevel);
         $maxlevel = min(10, $maxlevel);
     }
     if ($level > $maxlevel) {
         return;
     }
     $str = '';
     foreach ($data as $key => $value) {
         $acc = build_accessor($accessor, 'array', $key);
         $type = gettype($value);
         if (is_object($value)) {
             $str .= str_repeat('  ', $level) . '- <u>' . $key . ' = Object</u> <em>{$' . $acc . '}</em><br/>';
             if (isset($params['recurse'])) {
                 $str .= dump_object($params, $value, $level + 1, $ignore, $acc);
             }
         } else {
             if (is_array($value)) {
                 $str .= str_repeat('  ', $level) . "- <u>{$key} = Array (" . count($value) . ')</u> <em>{$' . $acc . '}</em><br/>';
                 if (isset($params['recurse'])) {
                     $str .= dump_array($params, $value, $level + 1, $ignore, $acc);
                 }
             } else {
                 if ($type == 'NULL') {
                     $str .= str_repeat('  ', $level) . '- ' . $name . ': NULL <em>{$' . $acc . '\\}</em><br/>';
                 } else {
                     $str .= str_repeat('  ', $level) . "- {$key} = " . cms_htmlentities($value) . ' {$' . $acc . '}<br/>';
                 }
             }
         }
     }
     return $str;
 }
コード例 #30
0
if ($proceed) {
    // form
    echo '  <CENTER>
            <FORM action="participant_status_delete.php">
            <INPUT type="hidden" name="status_id" value="' . $status_id . '">
            <TABLE class="or_formtable">
                <TR><TD colspan="2">
                    <TABLE width="100%" border=0 class="or_panel_title"><TR>
                            <TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '" align="center">
                                ' . lang('delete_participant_status') . ' "' . $status_name[lang('lang')] . '"
                            </TD>
                    </TR></TABLE>
                </TD></TR>
                <TR>
                    <TD colspan=2>' . lang('really_delete_participant_status?') . '<BR><BR>';
    dump_array($status);
    echo '          </TD>
                </TR>
                <TR>
                <TD align=left colspan=2>
                ' . lang('merge_participant_status_with') . '
                ' . participant_status__select_field('merge_with', '', array(0, $status_id)) . '
                <BR>
                <INPUT class="button" type=submit name=reallydelete value="' . lang('yes_delete') . '">
                </TD>
            </TR>
            <TR>
                <TD align=center colspan=2><BR><BR>
                    <INPUT class="button" type=submit name=betternot value="' . lang('no_sorry') . '">
                </TD>
            </TR>