Esempio n. 1
0
 function dd($var)
 {
     if (is_object($var)) {
         print_r_pre($var);
     } else {
         if (is_array($var)) {
             print_r_pre($var);
         } else {
             echo $var;
         }
     }
     die;
 }
Esempio n. 2
0
 public function testMicrotimeError()
 {
     $db = $this->connectionFactory->get('RW');
     $c = 0;
     while ($c++ < 999) {
         $time = "2000-01-01T00:00:00." . str_pad($c, 6, '0', \STR_PAD_LEFT);
         $time = rtrim($time, '0');
         $obj = new DateTime($time);
         $time[10] = ' ';
         if ($obj->parse($db) !== "'{$time}'") {
             print_r_pre($time);
             print_r_pre($obj);
             $this->fail("yeah, we've still got that really annoying microtime bug. See Pete or Matt");
         }
     }
 }
Esempio n. 3
0
function generate_transactions_listing()
{
    global $database, $category_array_organised, $numtransaction_days, $date_today_long;
    $category_rules_array = $database->select("category_rules", "*");
    //get all category_rules
    if ($numtransaction_days == 0) {
        //get all transactions, depending on value of text field on the page
        $temp_where = '"*"';
    } else {
        $temp_where = '"*", ["transaction_date[><]" => ["' . date("Y-m-d", strtotime($date_today_long) - $numtransaction_days * 60 * 60 * 24) . '","' . $date_today_long . '"]]';
    }
    $row_history_array = $database->select("history_transactions", $temp_where);
    echo $temp_where;
    print_r_pre($row_history_array);
    $payments_array = $database->select("forecast_payments", "*");
    //get all payments
    $row_history_table = "Number of days to show: " . $numtransaction_days . " <a href='#' class='btnsmall xedit_test' id=numtransaction_days' data-name='numtransaction_days' data-type='text' data-pk='{$numtransaction_days}' data-value='' data-title='Enter number of days to show (0 = all, warning may take over a minute)'>edit</a>";
    $myDateSort = function ($obj1, $obj2) {
        //sort by date
        $date1 = strtotime($obj1['transaction_date']);
        $date2 = strtotime($obj2['transaction_date']);
        return $date2 - $date1;
        // if date1 is earlier, this will be negative
    };
    usort($row_history_array, $myDateSort);
    foreach ($row_history_array as $r) {
        $r_date = $r["transaction_date"];
        $r_name = $r["transaction_name"];
        $r_amount = $r["transaction_amount"];
        $r_rule = $r["transaction_category_rule"];
        $r_category = $r["transaction_category"];
        if (is_null($r_category)) {
            $r_text = "-";
            $r_payment = "u n a s s i g n e d";
        } else {
            $r_text = $category_rules_array[$r_rule];
            $r_payment = $payments_array[$r_category];
        }
        $row_history_table .= "<tr><td>" . $r_date . "</td>" . "<td>" . $r_name . "</td>" . "<td>" . format_dolla($r_amount) . "</td>" . "<td>#" . $r_rule . ": " . $r_text . "</td>" . "<td>" . $r_payment . "</td></tr>";
    }
    $row_history_table = "<table class='treetable'><thead><th>Date</th><th>Transaction</th><th>Amount</th><th>Rule</th><th>Assigned to</th></thead><tbody>" . $row_history_table . "</tbody></table>";
    return $row_history_table;
}
Esempio n. 4
0
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
print_r_pre($profile);
?>
<div class="container main-content">
    <div class="row">
        <?php 
/*CARD PROFILE*/
?>
        <div class="col s12 m3">
            <div class="card card-panel profile hoverable">
                <?php 
if (isset($profile->avatar) and $profile->avatar != '') {
    ?>
                    <div class="col s12 m12 l12 center-align"><img src="<?php 
    echo base_url('assets/images/profiles/' . $profile->avatar);
    ?>
" alt="Avatar" class="profile-pic responsive-img circle"></div>
                <?php 
}
?>
                <p class="user-name center-align blue-grey-text text-darken-4"><?php 
echo $profile->full_name;
?>
</p>
Esempio n. 5
0
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
print_r_pre($organization);
?>
<div class="container main-content">
    <div class="row">
        <?php 
/*CARD PROFILE*/
?>
        <div class="col s12 m3">
            <div class="card card-panel profile hoverable">
                <?php 
if (isset($organization->avatar) and $organization->avatar != '') {
    ?>
                    <div class="col s12 m12 l12 center-align"><img src="<?php 
    echo base_url('assets/images/profiles/' . $organization->avatar);
    ?>
" alt="Avatar" class="profile-pic responsive-img circle"></div>
                <?php 
}
?>
                <p class="user-name center-align blue-grey-text text-darken-4"><?php 
echo $organization->name;
?>
</p>
Esempio n. 6
0
$actor = "http://schemas.xmlsoap.org/soap/actor/next";
// le destinataire est le premier récepteur
//$actor = "http://localhost/github/PGROU/testsCedric/testWStoken/server.php"; // le destinataire est ce récepteur (ne marche pas)
//$actor = ""; // le destinataire est le dernier récepteur (marche mais lance un warning)
$Username = $login;
$Password = $password;
$UsernameToken["Username"] = new SoapVar($Username, XSD_STRING, NULL, $wsse, NULL, $wsse);
$UsernameToken["Password"] = new SoapVar($Password, XSD_STRING, "PasswordDigest", $wsse, NULL, $wsse);
$Security = array();
$Security["UsernameToken"] = new SoapVar($UsernameToken, SOAP_ENC_OBJECT, NULL, $wsse, NULL, $wsse);
$Security = new SoapVar($Security, SOAP_ENC_OBJECT, NULL, $wsse, NULL, $wsse);
$Header = array();
$Header[] = new SoapHeader($wsse, "Security", $Security, $mustUnderstand, $actor);
$client->__setSoapHeaders(NULL);
$client->__setSoapHeaders($Header);
print_r_pre($Header);
$token = $client->authenticate();
echo getLastHTTPRequest($client);
echo $token . "<br/>\n";
$Security = array();
$Security["BinarySecurityToken"] = new SoapVar($token, XSD_STRING, NULL, $wsse, NULL, $wsse);
$Security = new SoapVar($Security, SOAP_ENC_OBJECT, NULL, $wsse, NULL, $wsse);
$Header = array();
$Header[] = new SoapHeader($wsse, "Security", $Security, $mustUnderstand, $actor);
$client->__setSoapHeaders(NULL);
$client->__setSoapHeaders($Header);
$var = "Machine";
$res = $client->hello(new SoapParam($var, "name"));
echo getLastHTTPRequest($client);
print $res . "<br/>\n";
sleep(2);
                                if (isset($replacementnode['recursive'])) {
                                    if ($replacementnode['recursive'] == "false") {
                                        $recursive = false;
                                    }
                                }
                                $externalfull = $sd . $root . "/" . $replacementnode['external'];
                                if ($recursive) {
                                    $folderfiles = directoryScanRecursive($externalfull, true, false, "files/" . $replacementnode['disc']);
                                } else {
                                    $folderfiles = directoryScan($externalfull, false);
                                }
                                print_r_pre($folderfiles);
                                break;
                            case "memory":
                                break;
                        }
                    }
                } else {
                    echo "Error: patch with id '{$patchunique}' does not exist.";
                }
            }
        }
    }
}
//print_r_pre(directoryScan($patchfiles, false, false));
//print_r_pre($base);
//print_r_pre($replacements);
print_r_pre(array_replace($base, $replacements));
//createSymlinkStructure(array_replace($base, $replacements));
?>
</div>