Exemplo n.º 1
0
 function changelogDate($version)
 {
     //
     $file = file('data/changelogs/' . $version . '.txt');
     $date = substr(trim($file[0]), 1, -1);
     $date = parseDate($date);
     return date('jS F, Y', $date);
 }
Exemplo n.º 2
0
function parseDateTime($datetime)
{
    $reArr = array();
    $timeArr = array();
    list($date, $time) = explode(" ", $datetime);
    $reArr = parseDate($date);
    $timeArr = explode(":", $time);
    $reArr = array_merge($reArr, $timeArr);
    return $reArr;
}
Exemplo n.º 3
0
 function blockMoney($dabAccount, $idCardNo, $epsAccount, $orderID, $orderAmount, $orderDate)
 {
     if (!defined('DAB_TOOLS')) {
         return 0;
     }
     $function = "bid";
     $this->addSOAPHeader($function);
     $arrOrderDate = parseDate($orderDate);
     $sourceDate = $arrOrderDate[0] . $arrOrderDate[1] . $arrOrderDate[2] . date("His");
     $transferDate = $arrOrderDate[0] . $arrOrderDate[1] . $arrOrderDate[2];
     $result = $this->soapClient->call($function, $params = array('custaccount' => $dabAccount, 'CID' => $idCardNo, 'scraccount' => $epsAccount, 'refno' => $orderID, 'amount' => $orderAmount, 'scrdate' => $sourceDate, 'transferflag' => 0, 'transferdate' => $transferDate), $this->soapOptions);
     $content = date("d/m/Y H:i:s") . "\tcustaccount => {$dabAccount}, CID => {$idCardNo}, scraccount => {$epsAccount}, refno => {$orderID}, amount => {$orderAmount}, scrdate => {$sourceDate}, transferdate => {$transferDate} \t--> {$result}";
     write_log($function, $content, DAB_LOG_FILE_PATH);
     /*write_my_log_path('DAB-connect',$_SERVER['REMOTE_ADDR'].' function_name blockMoney custaccount '.$dabAccount.' CID '.$idCardNo.' epsAccount '.$epsAccount.' refno '.$orderID.' amount '.$orderAmount.' sourceDate '.$sourceDate.' transferdate '.$transferDate.'  ' .date('Y-m-d h:i:s'),DAB_PATH.'logs/');*/
     return $result;
 }
Exemplo n.º 4
0
function saveMessage($obj)
{
    global $MENSAGENS;
    //Salva a mensagem enviada pela text area
    $mensagem = $obj['mensagem'];
    unset($obj['mensagem']);
    $fileName = sprintf("messages/%s%s.json", parseDate($obj['data']), $obj['email']);
    $file = fopen($fileName, "w");
    fwrite($file, $mensagem);
    fflush($file);
    fclose($file);
    //Salva os dados de quem enviou a mensagem
    $msgsArr = getMessagesArray();
    $msgsArr[] = $obj;
    $json['mensagens'] = $msgsArr;
    $file = fopen($MENSAGENS, "w");
    fwrite($file, json_encode($json));
    fflush($file);
    fclose($file);
}
Exemplo n.º 5
0
 /**
  * Parses a RFC2616-compatible date string
  *
  * This method returns false if the date is invalid
  *
  * @deprecated Use parseDate
  * @param string $dateHeader
  * @return bool|DateTime
  */
 static function parseHTTPDate($dateHeader)
 {
     return parseDate($dateHeader);
 }
Exemplo n.º 6
0
 function setDateEnd($date_end = "", $time_end = "")
 {
     $datestring = parseDate($date_end . " " . $time_end);
     $this->date_end = substr($datestring, 0, 10);
     $this->time_end = substr($datestring, 11, 8);
 }
Exemplo n.º 7
0
while (date('W', $daystart) == date('W', $week_start)) {
    $weekdays[$i] = $daystart;
    $daystart += 86400;
    $i++;
}
echo '<table width="100%">' . chr(10);
foreach ($weekdays as $daynum => $weekday) {
    echo '<tr>' . chr(10);
    if ($daynum == 6 || $daynum == 7) {
        echo ' <td style="background-color: #FFFFCC;">' . chr(10);
    } else {
        echo ' <td>' . chr(10);
    }
    echo '<a class="graybg" href="day.php?year=' . date('Y', $weekday) . '&amp;month=' . date('m', $weekday) . '&amp;day=' . date('d', $weekday) . '&amp;area=' . $area . '&amp;room=' . $room . '">';
    echo '<b>' . ucfirst(strtolower(parseDate(strftime("%A", $weekday)))) . '</b>';
    echo '<br>' . ucfirst(strtolower(parseDate(strftime("%d. %B", $weekday))));
    echo '</td>' . chr(10);
    if ($daynum == 6 || $daynum == 7) {
        echo ' <td style="background-color: #FFFFCC;">' . chr(10);
    } else {
        echo ' <td>' . chr(10);
    }
    $entries = array();
    $timed_entries = array();
    foreach ($rooms as $room_id => $room) {
        $start = mktime(0, 0, 0, date('m', $weekday), date('d', $weekday), date('Y', $weekday));
        $end = mktime(23, 59, 59, date('m', $weekday), date('d', $weekday), date('Y', $weekday));
        $events_room = checktime_Room($start, $end, $area, $room_id);
        if (isset($events_room[$room_id])) {
            foreach ($events_room[$room_id] as $entry_id) {
                $event = getEntry($entry_id);
Exemplo n.º 8
0
include '../5d6s4fds65/db_params.php';
// Get birthday
$year = $_POST['year'];
$month = $_POST['month'];
$day = $_POST['day'];
$date = "{$year}/{$month}/{$day}";
// Parse date string into 0000-00-00
function parseDate($date)
{
    $timestamp = strtotime($date);
    $parsed = date("Y-m-d", $timestamp);
    return $parsed;
}
// Final string
$birth = parseDate($date);
$username = addslashes($_POST['username']);
$mail = addslashes($_POST['mail']);
$password = $_POST['password'];
$conn = mysqli_connect(HOST, USER, PASSWORD, DB);
$requete = "INSERT INTO users (mail, password, username, birth) VALUES ('{$mail}','{$password}','{$username}','{$birth}')";
if (!mysqli_query($conn, $requete)) {
    echo mysqli_error($conn);
}
if (!$conn) {
    die('Connexion impossible : ' . mysql_error());
    echo "failed";
} else {
    echo "success";
}
?>
Exemplo n.º 9
0
function printLayOver($firstid, $secondid)
{
    $layover = oci_fetch_row(executePlainSQL("select F2.departtime-F1.arrivaltime from Flight F1, Flight F2\n\t\t\t\t\t\t\t\t\twhere F1.fid='{$firstid}' AND F2.fid='{$secondid}'"));
    $layovertime = parseDate($layover[0], 2);
    echo "<br>Lay over for {$layovertime}";
}
Exemplo n.º 10
0
function printFlights($flights, $locations)
{
    echo "<p><br>Search Results: <br></p>";
    echo "<form method='POST' action='reservation.php'>";
    echo '<table class = "pure-table pure-table-bordered">';
    // print the top row (attribute labels)
    echo '<thead>';
    echo "<tr><th>Departure Airport</th><th>City</th><th>Country</th>" . "<th>Arrival Airport</th><th>City</th><th>Country</th><th>Departure Time (GMT)</th>" . "<th>Total Flight Time</th><th>COST (CAD)</th><th>Choose Flight</th></tr>";
    echo '</thead>';
    // print the data rows (tuples)
    $it = 0;
    while ($flight = OCI_Fetch_Array($flights, OCI_ASSOC)) {
        $printout = "<tr>";
        foreach ($locations as $value) {
            $printout = $printout . "<td>{$value}</td>";
        }
        $departtime = parseDate($flight['DT1'], 1);
        $flighttime = parseDate($flight['TOTALTIME'], 2);
        $cost = $flight['TOTALPRICE'];
        $fclassint = 0;
        // Variable costs depends on class
        if (strcmp($_COOKIE['flightclass'], "economy") == 0) {
            $cost *= 1;
            $fclassint = 1;
        } else {
            if (strcmp($_COOKIE['flightclass'], "business") == 0) {
                $cost *= 3;
                $fclassint = 3;
            } else {
                if (strcmp($_COOKIE['flightclass'], "first") == 0) {
                    $cost *= 5;
                    $fclassint = 5;
                }
            }
        }
        // update the cost if the class is changed
        $flight['TOTALPRICE'] = $cost;
        // Add class and num tickets to the post array
        $flight['CLASS'] = $_COOKIE['flightclass'];
        $flight['CLASSINT'] = $fclassint;
        $flight['NUMTICKETS'] = $_COOKIE['numtickets'];
        $flight_string = serialize($flight);
        echo $printout . "<td>{$departtime}</td><td>{$flighttime}</td><td>{$cost}</td>";
        echo "<td><input type='radio' name='flightchoice' value='{$flight_string}' required></td></tr>";
        echo "<tr><td>";
        printDetails($flight, $it, 1);
        echo "</td></tr>";
        $it++;
    }
    echo "</table>";
    echo "<input type='submit' value='Book my flight'></form>";
}
Exemplo n.º 11
0
                     Warn("Value {$uservalue} added to attribute {$att['2']}");
                     $user_att_value = Sql_Insert_Id();
                 } else {
                     $d = Sql_Fetch_Row($val);
                     $user_att_value = $d[0];
                 }
                 break;
             case "checkbox":
                 if ($uservalue && $uservalue != "off") {
                     $user_att_value = "on";
                 } else {
                     $user_att_value = "off";
                 }
                 break;
             case "date":
                 $user_att_value = parseDate($uservalue);
                 break;
             default:
                 $user_att_value = $uservalue;
                 break;
         }
         Sql_query(sprintf('replace into %s (attributeid,userid,value) values(%d,%d,"%s")', $tables["user_attribute"], $attribute_index, $userid, $user_att_value));
     } else {
         if ($item["record"] != "skip") {
             # add an empty entry if none existed
             Sql_Query(sprintf('insert ignore into %s (attributeid,userid,value) values(%d,%d,"")', $tables["user_attribute"], $item["record"], $userid));
         }
     }
 }
 $current_data = Sql_Fetch_Array_Query(sprintf('select * from %s where id = %d', $tables["user"], $userid));
 $current_data = array_merge($current_data, getUserAttributeValues('', $userid));
Exemplo n.º 12
0
        echo 'id="next"';
    }
    ?>
>
			<a href="<?php 
    echo get_the_permalink();
    ?>
">
				<div class="hidden-sm hidden-xs hidden-md cd-timeline-img cd-picture <?php 
    if ($post->ID == $nextEvent) {
        echo 'next-project';
    }
    ?>
">
					<span><?php 
    echo parseDate($date);
    ?>
</span>
				</div>
			</a> <!-- cd-timeline-img -->
			<div class="mobile-no-margin cd-timeline-content <?php 
    echo $class . '-wrap';
    ?>
 <?php 
    if ($j == 0) {
        echo 'first';
    }
    ?>
">
			
				<div class="wow animated slideInUp">
Exemplo n.º 13
0
 if ($_contestant1birthdate != "NULL") {
     $_contestant1birthdate = '"' . $_contestant1birthdate . '"';
 }
 $_contestant2passportdate = parseDate($contestant2passportdate);
 if ($_contestant2passportdate != "NULL") {
     $_contestant2passportdate = '"' . $_contestant2passportdate . '"';
 }
 $_contestant2birthdate = parseDate($contestant2birthdate);
 if ($_contestant2birthdate != "NULL") {
     $_contestant2birthdate = '"' . $_contestant2birthdate . '"';
 }
 $_contestant3passportdate = parseDate($contestant3passportdate);
 if ($_contestant3passportdate != "NULL") {
     $_contestant3passportdate = '"' . $_contestant3passportdate . '"';
 }
 $_contestant3birthdate = parseDate($contestant3birthdate);
 if ($_contestant3birthdate != "NULL") {
     $_contestant3birthdate = '"' . $_contestant3birthdate . '"';
 }
 if (isFullFilled($fill)) {
     $fullfilled = 1;
 } else {
     $fullfilled = 0;
 }
 $query = "insert into teams(teamname, city, studyplace, address, phone, fax,\n          contactname, contactphone, contactmail,\n          headname, headpost,\n          headpassportno, headpassportplace, headpassportdate, headbirthdate, headaddress, headinn,\n          coachname, coachpost,\n          coachpassportno, coachpassportplace, coachpassportdate, coachbirthdate, coachaddress, coachinn,\n          contestant1name,\n          contestant1studyplace, contestant1faculty, contestant1classcourse, contestant1age,\n          contestant1passportno, contestant1passportplace, contestant1passportdate,\n          contestant1birthdate, contestant1address, contestant1inn,\n          contestant2name,\n          contestant2studyplace, contestant2faculty, contestant2classcourse, contestant2age,\n          contestant2passportno, contestant2passportplace, contestant2passportdate, \n          contestant2birthdate, contestant2address, contestant2inn,\n          contestant3name,\n          contestant3studyplace, contestant3faculty, contestant3classcourse, contestant3age,\n          contestant3passportno, contestant3passportplace, contestant3passportdate,\n          contestant3birthdate, contestant3address, contestant3inn,\n          `password`, contestteamid,\n          language,\n          fullfilled)\n        values(\"{$teamname}\", \"{$city}\", \"{$studyplace}\", \"{$address}\", \"{$phone}\", \"{$fax}\",\n          \"{$contactname}\", \"{$contactphone}\", \"{$contactmail}\",\n          \"{$headname}\", \"{$headpost}\",\n          \"{$headpassportno}\", \"{$headpassportplace}\", " . $_headpassportdate . ",\n          " . $_headbirthdate . ", \"{$headaddress}\", \"{$headinn}\",\n          \"{$coachname}\", \"{$coachpost}\",\n          \"{$coachpassportno}\", \"{$coachpassportplace}\", " . $_coachpassportdate . ",\n          " . $_coachbirthdate . ", \"{$coachaddress}\", \"{$coachinn}\",\n          \"{$contestant1name}\",\n          \"{$contestant1studyplace}\", \"{$contestant1faculty}\", \"{$contestant1classcourse}\", {$contestant1age},\n          \"{$contestant1passportno}\", \"{$contestant1passportplace}\", " . $_contestant1passportdate . ",\n          " . $_contestant1birthdate . ", \"{$contestant1address}\", \"{$contestant1inn}\",\n          \"{$contestant2name}\", \n          \"{$contestant2studyplace}\", \"{$contestant2faculty}\", \"{$contestant2classcourse}\", {$contestant2age},\n          \"{$contestant2passportno}\", \"{$contestant2passportplace}\", " . $_contestant2passportdate . ",\n          " . $_contestant2birthdate . ", \"{$contestant2address}\", \"{$contestant2inn}\",\n          \"{$contestant3name}\", \n          \"{$contestant3studyplace}\", \"{$contestant3faculty}\", \"{$contestant3classcourse}\", {$contestant3age},\n          \"{$contestant3passportno}\", \"{$contestant3passportplace}\", " . $_contestant3passportdate . ",\n          " . $_contestant3birthdate . ", \"{$contestant3address}\", \"{$contestant3inn}\",\n          password(\"{$password}\"),\n          {$contestteamid},\n          \"{$language}\",\n          {$fullfilled})";
 if (@(!mysql_query($query))) {
     $error = true;
     $msg = 'Не удалось провести добавление новой команды [' . mysql_error() . ', code=' . mysql_errno() . ', sql=' . $query . ']. Попробуйте повторить попытку позже';
 } else {
     $success = true;
     $datamsg = 'Добавление новой команды проведено успешно.';
Exemplo n.º 14
0
function getDetails($bigTuple, $numFlights)
{
    $fid1 = $bigTuple['FID1'];
    $departFlight = oci_fetch_assoc(executePlainSQL("select * from Flight where fid='{$fid1}'"));
    $departDate = parseDate($departFlight['DEPARTTIME'], 1);
    $departApCode = $departFlight['DEPARTAP'];
    $departAp = oci_fetch_assoc(executePlainSQL("select CITY, COUNTRY from Airport where code='{$departApCode}'"));
    $departCity = $departAp['CITY'];
    $departCountry = $departAp['COUNTRY'];
    if ($numFlights == 1) {
        $arrivalFlight = $departFlight;
    } else {
        if ($numFlights == 2) {
            $fid2 = $bigTuple['FID2'];
            $arrivalFlight = oci_fetch_assoc(executePlainSQL("select * from Flight where fid='{$fid2}'"));
        } else {
            $fid3 = $bigTuple['FID3'];
            $arrivalFlight = oci_fetch_assoc(executePlainSQL("select * from Flight where fid='{$fid3}'"));
        }
    }
    $arrivalApCode = $arrivalFlight['ARRIVALAP'];
    $arrivalAp = oci_fetch_assoc(executePlainSQL("select * from Airport where code='{$arrivalApCode}'"));
    $arrivalCity = $arrivalAp['CITY'];
    $arrivalCountry = $arrivalAp['COUNTRY'];
    $flightLoc = array("DEPARTDATE" => $departDate, "DEPARTCITY" => $departCity, "DEPARTCOUNTRY" => $departCountry, "ARRIVALCITY" => $arrivalCity, "ARRIVALCOUNTRY" => $arrivalCountry);
    return $flightLoc;
}
Exemplo n.º 15
0
function display_page_content()
{
    ?>
    
    <div id="edit-header" class="dashboard">
		<h1>Dashboard: Definitions and Recent Activity</h1>
	</div>
    
	<style type="text/css">
	<!--
	.dropslide { background-color: transparent; }
	blockquote { padding: 10px 10px 0 10px; margin: 0 0 10px 0; border: 1px solid #ccc; }
	ul.list { list-style: disc; padding: 0 0 0 15px; margin: -8px 0 10px 0; }
	blockquote blockquote { 
		border: 1px solid #ccc; 
		padding: 5px 5px 0 5px; 
		background-color: #eee; 
		margin: 0 0 10px 20px; 
	}
	-->
	</style>
	
	<ul id="dashboard" class="tabs menu">
		<li><a href="#welcome" class="openclose opened">Welcome</a></li>
		<li><a href="#general" class="openclose">General Features</a></li>
		<li><a href="#navdescript" class="openclose">The Navigation</a></li>
		<li><a href="#glossary" class="openclose">Glossary</a></li>
		<li><a href="#custom" class="openclose">Custom</a></li>
	</ul>
	
	<div id="welcome" class="dropslide">
		<h1>Welcome</h1>
		<p>Welcome to your content management system, the HCd&gt;CMS. This system allows access to the text and image content of your website. Choose a tab above for a description of each concept, what it does, and how to use it. Or, choose an action below or from the navigation to the right to get started. </p>
	</div>
	
	<div id="general" class="dropslide" style="display:none;">
		<h2>Areas and Pages</h2>
		<p>The core of the HCd&gt;CMS is the management of Areas and Pages. Areas are containers for pages, and pages are independent objects that can be placed inside more than one area. A page has content, or a description, whereas an Area has only a name.</p>
		<p>The order in which Areas and Pages appear when viewing <a href="<?php 
    echo get_link("admin/list_pages");
    ?>
">List Pages</a> is the order in which they will appear on the site, either right to left in a horizontal navigation or top to bottom in a vertical navigation. They may be reordered by dragging a dropping them into place. </p>
		
		<h2>Email addresses</h2>
		<p><strong>Email addresses in Page Content do not need to be coded.</strong> When the database sees an email address (.com, .net, .org, .biz, .info, etc...) it will encode and hide the email from spam robots, but make it an active link for browsers with Javascript turned on. There is no need to manually make email addresses a link. </p>
		
		<h2 class="red">Success or Failure Feedback:</h2>
		<p>When a page has been successfully executed, a red message will appear above the page content. If there is a failure, error, or a required field was not filled out, a message will appear below or above the problem field. </p>
		
		<h2>Public vs. Not Public</h2>
		<p>Areas, pages, sections, items, blog posts and events all have the ability to be Public or non-public. Simply stated, public means that the page or item will be available to users on the front-end, while non-public is hidden from view and available only to those who have access to this admin portion of the website.</p>
		<p>Public-ness can be inherited, though. An Area can be not public, while all of its Pages are public. As long as those pages do not appear in any other Area, those pages will only be public once the Area is public. Same thing follows for Portfolio Areas and Sections &ndash; children of containers inherit the parent&rsquo;s public property. In this way, it is possible to launch a whole new section of content at one time. </p>
	</div>
	
	<div id="navdescript" class="dropslide" style="display:none;">
		<h2>The Navigation (to the Right):</h2>
		<p>The navigation is broken into three Main Areas. Here is what to expect in each:</a></p>
		
		<h2>Manage Content</h2>
		<p>&ldquo;Content&rdquo; is most of your site. In this section, you will be able to manage Pages, Calendar Content, Blog Content, or E-Newsletters. Options may vary slightly from one installation to another, and may contain custom options as well.</p>
		<p><strong class="red">Pages</strong> = <em>Edit Existing Pages</em> displays all the pages from the database in a table, organized by what Area they are contained within. Pages that are not in a specific area will show up in the Global area. From here you can choose a page to edit, or change the order in which they are displayed. The order is top-down &ndash; in other words, the first page listed will also be first in the navigation, wheteher your navigation is right to left or top down. <em>Add a Page, Add an Area</em> = These links to create new pages or areas and add them to the database.</p>
		<?php 
    if (BLOG_INSTALL) {
        ?>

		<p><strong class="red">Blog</strong> = <em>Edit Blog Entries</em> displays a date-organized list of past blog entries. Click an entry name to edit it. You may also change the date of an older entry. <em>Add Blog Entry</em> creates a new entry in the database, which you may date as the day it was created or post-date. To edit the &ldquo;name&rdquo; of the Blog, you can edit the name of the Area that represents the blog in the navigation.</p>
		<?php 
    }
    ?>
		<?php 
    if (PORTFOLIO_INSTALL) {
        ?>

		<p><strong class="red">Portfolio</strong> = <em>Edit Portfolio Sections and Items</em> displays a list of all the Items, organized by Sections and Portfolio Areas. The display order is top-down, and areas, sections and items are all click-and-draggable. Click on any name to edit that entry, whether it be the name of a Portfolio Area, the Name and Description of a Section, or the Name, Description and Image Gallery for an Item. </p>
		<?php 
    }
    ?>
		<?php 
    if (CALENDAR_INSTALL) {
        ?>

		<p><strong class="red">Calendar</strong> = <em>Edit Existing Events</em> displays a calendar-formatted list of all the Events in the database. Click an event to edit it, or, use the arrows (to the right and left of the name of the month) to go forward or backward in time. <em>Add a new Event</em> creates an event in the database. <em>Edit Event Types</em> lists the current event types in the database. Click on the name to edit it. An event type is simply a way to organize events for your calendar. You can have as many event types as you like, and customize the colors that they are represented with. Click <em>Add a New Event Type</em> to create a new one.</p>
		<?php 
    }
    ?>
		
		<h2>Manage Extras</h2>
		<p>&ldquo;Extras&rdquo; are objects that are separate from page content &ndash; by this, we mean things like Images, Documents, Products, Galleries and Videos. They can be inserted into content, but may not be accesible on their own. So we manage them here. </p>
		<p><strong class="red">Images</strong> = <em>Edit Existing Images</em> displays images in a grid by thumbnail and name, listed by the newest image first. Click any thumbnail to edit the image&rsquo;s properties. Click <em>Upload a New Image</em> to add more to the database. </p>
		<blockquote>
			<p><strong>Insert Image tags=</strong> <em>what they look like and what they do:</em></p>
			<ul class="list">
				<li>{{name_of_image{{ :: An image name surrounded by double curly braces. In this case, because they both point left, the image will be floated left. </li>
				<li>}}name_of_image}} :: Both braces point right, therefore the image will be floated right. </li>
				<li>{{name_of_image}} :: Braces point in opposing directions, therefore the image will be centered in the content column and text will <em>not</em> be allowed to flow around it. </li>
			</ul>
		</blockquote>
		
		<p><strong class="red">Documents</strong> = <em>Edit Existing Documents</em> lists documents by name, from newest to oldest. Click any document name to edit the document&rsquo;s properties, or click &ldquo;view&rdquo; to download a copy of that document. Click <em>Upload a New Document</em> to add more to the database. </p>
		<blockquote>
			<p><strong>Insert Document tags=</strong> <em>what they look like and what they do:</em></p>
			<ul class="list">
				<li>{{document:name_of_document{{ :: This is what all tags look like. What they insert ends up looking like this on the front-end= &ldquo;<a href="#">name_of_document</a> (pdf)&ldquo; or whatever type the document may be. </li>
			</ul>
		</blockquote>
		<?php 
    if (GALLERY_INSTALL) {
        ?>

		<p><strong class="red">Galleries</strong> = <em>Edit Existing Galleries</em> displays a list of Galleries by thumbnail and name. Click any gallery name or image to edit the name, add photos, change the order of photos, edit captions, or delete images. Click <em>Add a New Gallery</em> to add a new name to the database, and then click the name in the <em>Edit Existing</em> list to add photos to it. </p>
		<blockquote>
			<p><strong>Insert Gallery tags=</strong> <em>what they look like and what they do:</em></p>
			<ul class="list">
				<li>{{gallery:name_of_gallery{{, }}gallery:name_of_gallery}}, {{gallery:name_of_gallery}} :: Gallery tags follow the same pattern as image tags. The thumbnail (the first image in the gallery) will be displayed either left, right, or centered above text. If a gallery is centered, it will normally appear larger on the page than if it was floating left or right.  </li>
				<li>{{carousel:name_of_gallery{{ :: In addition, most installs of the HCd&gt;CMS support auto-playing carousels. Try replacing the word &ldquo;gallery&rdquo; in the tag with &ldquo;carousel&rdquo; to see what happens. </li>
				<li>{{random-from-gallery:name_of_gallery{{ :: As the name suggests, this code will randomly select one image from a gallery of images and display it on the page. The curly braces will denote the placement or &ldquo;float&rdquo; of the image.</li>
			</ul>
		</blockquote>
		<?php 
    }
    ?>
		<?php 
    if (VIDEO_INSTALL) {
        ?>
		<p><strong class="red">Videos</strong> = <em>Edit Existing Videos</em> displays a list of videos available in the database. Click on any video name to edit the video&rsquo;s properties, including title, unique ID, hosting service, width and height. Click <em>Add a New Video</em> to add more to the database. </p>
		<?php 
    }
    ?>
		<?php 
    if (PRODUCT_INSTALL) {
        ?>

		<p><strong class="red">Products</strong> = <em>Edit Existing Products</em> displays a list of Products in the database. Click any product name to edit the product&rsquo;s properties, including price, thumbnail image, and description. Click <em>Add a New Product</em> to add more to the database. </p>
		<?php 
    }
    ?>
		
		<h2>Admin Controls</h2>
		<p>&ldquo;Admin&rdquo; users have ultimate control over the site, and can manage the level of access that other users have as well. This section holds some of the controls that advanced users may have. </p>
		<?php 
    if (PRODUCT_INSTALL) {
        ?>

		<p><strong class="red">PayPal</strong> = If your site has Products installed (Manage Extras &gt; Products), then this is where you may edit the information for your PayPal account. Your site may have at least one account, but could have more. <em>Edit Accounts</em> is where these will be listed &ndash; click a name to edit it.</p>
		<?php 
    }
    ?>
		
		<p><strong class="red">Users</strong> = For any site, users can be Admins (click the box marked &ldquo;Admin?&rdquo;) or they may be just regular users. The difference is that &ldquo;Admins&rdquo; have ultimate control over content &ndash; &ldquo;Admins&rdquo; can delete pages, areas, blog entries, etc... &ldquo;Admins&rdquo; can also create, edit and delete users as well as edit PayPal accounts. Regular users (&ldquo;non-admins&rdquo;) can only edit page, event, or blog content, and upload and edit images, documents or galleries. They can not delete content.</p>
	
	</div>
	
	<div id="glossary" class="dropslide" style="display:none;">
		<h2>Glossary:</h2>
		<dl>
			<dt>Areas</dt>
			<dd>An Area in the HCd&gt;CMS is a grouping of pages &ndash; it is not a page itself, but a way to organize pages into specific groups of content. </dd>
			
			<dt>Global Area</dt>
			<dd>When we say &ldquo;Global Area&rdquo;, or &ldquo;Global Page&rdquo;, that means that it is the first page people see before a choice is made to navigate somewhere else (a home page, or the first page of an &ldquo;area&rdquo;). Sometimes pages that do not have a home of their own will exist in the &ldquo;Global&rdquo; area. </dd>
			
			<dt>Pages</dt>
			<dd>A page exists in the database with specific content. Pages can get added to one or more areas, or be global. </dd>
			
			<dt>Orphans</dt>
			<dd>Any child element without a parent &ndash; A Page without an Area, a Section without an Area, or an Item without a Section.</dd>
		<?php 
    if (PORTFOLIO_INSTALL) {
        ?>

			<dt>Portfolio Area</dt>
			<dd>A Portfolio Area is similar to an area, but it contains &ldquo;Sections&rdquo; and &ldquo;Items&rdquo; instead of pages. The Portfolio Area will also appear in the list of Areas and Pages, allowing you to organize it into the structure of the rest of your site however you like. The Portfolio Area may simply be called &ldquo;Portfolio&rdquo;, and you may only need one. A Portfolio Area can have a description if your templates need it.</dd>
			
			<dt>Portfolio Section</dt>
			<dd>A Portfolio Section acts just like an Area. You may not need a bunch of these to organize your portfolio, but you need at least one. Unlike an Area, though, a Section can have a description like a page might have.</dd>
			
			<dt>Portfolio Item</dt>
			<dd>An Item is more like a page, with a title and description, and a thumbnail and a Gallery of images attached to it. In this way, an Item is like a Page and a Gallery combined into one object.</dd>
		<?php 
    }
    ?>
		<?php 
    if (GALLERY_INSTALL) {
        ?>

			<dt>Galleries</dt>
			<dd>Galleries are simply a collection of images, and the order of images in a gallery can be changed at any time. Images in galleries, however, can not be easily pulled from one and added to another. The source image would need to be uploaded again, so, it is a good idea to keep a version of these images on your computer for later use. </dd>
		<?php 
    }
    ?>
		<?php 
    if (VIDEO_INSTALL) {
        ?>
		    
		    <dt>Videos</dt>
			<dd>Videos are managed through the CMS as well. The embed codes are managed in one place, so if they need to change, they can be changed from one location and that change will go out to where ever the video is used. Right now, the HCd&gt;CMS supports embed codes for Vimeo and YouTube. Others can be embedded with the full share/embed code from the host service. </dd>
		<?php 
    }
    ?>
		</dl>
	</div>
	
	<div id="custom" class="dropslide" style="display:none;">
		<h2>Custom Content</h2>
		<p>Since the HCd&gt;CMS is so customizable, your site may have features not explained here.</p>
	</div>
	
	<p>&nbsp;</p>
	<!-- Now start the dashboard -->
	
<?php 
    $count_dashes = 0;
    if (BLOG_INSTALL) {
        ?>
	<div class="dashboard-widget column">
		<h1><?php 
        echo ucwords(BLOG_STATIC_AREA);
        ?>
 Entries</h1>
		<p>
			<a class="hcdbutton" href="<?php 
        echo get_link("admin/list_entries");
        ?>
">List Entries</a>
			<a class="hcdbutton" href="<?php 
        echo get_link("admin/edit_entry/add");
        ?>
">Add Entry</a>
			<a class="hcdbutton" href="<?php 
        echo get_link("admin/list_categories");
        ?>
">List Categories</a>
			<a class="hcdbutton" href="<?php 
        echo get_link("admin/add_category");
        ?>
">Add Category</a>
		</p>
		<h4>Recently Added Entries:</h4>
		<ul>
		<?php 
        $entries = MyActiveRecord::FindBySQL('Blog_Entries', "SELECT * FROM blog_entries ORDER BY date DESC LIMIT 5");
        if (!empty($entries)) {
            foreach ($entries as $entry) {
                $entrypublic = $entry->public ? "" : "<span class=\"red\">(not public)</span>";
                $entry_date = parseDate($entry->date, "m/d g:i A");
                echo "<li>\n\t\t\t\t\t\t\t<a class=\"item-link\" href=\"" . get_link("admin/edit_entry/" . $entry->id) . "\">" . $entry->get_title() . "</a>\n\t\t\t\t\t\t\t<span class=\"item-revised\">{$entry_date}</span>\n\t\t\t\t\t\t\t<span class=\"item-public\">{$entrypublic}</span>\n\t\t\t\t\t\t</li>";
            }
        }
        ?>
		</ul>
	</div>
<?php 
        $count_dashes++;
    }
    if (PORTFOLIO_INSTALL) {
        ?>
	<div class="dashboard-widget column">
		<h1>Portfolio</h1>
		<p>
			<a class="hcdbutton" href="<?php 
        echo get_link("admin/portfolio_list");
        ?>
">List Items</a>
			<a class="hcdbutton" href="<?php 
        echo get_link("admin/portfolio_add_item");
        ?>
">Add Item</a>
			<a class="hcdbutton" href="<?php 
        echo get_link("admin/portfolio_add_section");
        ?>
">Add Section</a>
			<a class="hcdbutton" href="<?php 
        echo get_link("admin/portfolio_add_area");
        ?>
">Add Area</a>
		</p>
		<h4>Recently Added/Edited Items:</h4>
		<ul>
		<?php 
        $items = Items::FindThisMany(7);
        // BROKEN when the database is missing fields (prolly date_created, date_revised)
        if (!empty($items)) {
            foreach ($items as $theitem) {
                $itempublic = $theitem->public ? "" : "<span class=\"red\">(not public)</span>";
                $section = $theitem->theSection();
                $sectionname = empty($section->name) ? "orphan_section" : $section->name;
                $item_revised = empty($theitem->date_revised) ? '' : formatDateTimeView($theitem->date_revised, "m/d g:i A");
                echo "<li>\n\t\t\t\t\t\t\t<a class=\"item-link\" href=\"" . get_link("admin/portfolio_edit/{$sectionname}/" . $theitem->id) . "\">" . $theitem->get_title() . "</a>\n\t\t\t\t\t\t\t<span class=\"item-public\">{$itempublic}</span>\n\t\t\t\t\t\t\t<span class=\"item-revised\">{$item_revised}</span>\n\t\t\t\t\t\t</li>";
            }
        }
        ?>
		</ul>
	</div>
<?php 
        $count_dashes++;
    }
    if ($count_dashes == 2) {
        echo "<div class=\"clearleft\"></div>\n";
    }
    ?>
			
	<div class="dashboard-widget column">
		<h1>Pages</h1>
		<p>
			<a class="hcdbutton" href="<?php 
    echo get_link("admin/list_pages");
    ?>
">List Pages</a>
			<a class="hcdbutton" href="<?php 
    echo get_link("admin/add_page");
    ?>
">Add Page</a>
			<a class="hcdbutton" href="<?php 
    echo get_link("admin/edit_page/add");
    ?>
">Add Area</a>
			<?php 
    $chunks = Chunks::FindAll();
    if (count($chunks) > 0) {
        ?>
			<a class="hcdbutton" href="<?php 
        echo get_link("admin/list_pages#chunks-list");
        ?>
">List Chunks</a>
			<?php 
    }
    ?>
		</p>
		<h4>Recently Added Pages:</h4>
		<ul>
		<?php 
    $pages = Pages::FindAll("id DESC");
    if (!empty($pages)) {
        $counter = 0;
        foreach ($pages as $thepage) {
            if ($counter < 5) {
                $pagepublic = $thepage->public ? "" : "<span class=\"red\">(not public)</span>";
                //$item_revised = ( empty($theitem->date_revised) ) ? '' : formatDateTimeView( $theitem->date_revised, "m/d g:i A" );
                echo "<li>\n\t\t\t\t\t\t\t\t<a class=\"item-link\" href=\"" . get_link("admin/edit_page/" . $thepage->id) . "\">" . $thepage->get_title() . "</a>\n\t\t\t\t\t\t\t\t<span class=\"item-public\">{$pagepublic}</span>\n\t\t\t\t\t\t\t</li>";
                $counter++;
            }
        }
    }
    ?>
		</ul>
		<h4>Quick select</h4>
		<?php 
    quick_link();
    ?>
	</div>				
<?php 
    $count_dashes++;
    $classes = "dashboard-widget column";
    if (!is_odd($count_dashes)) {
        $classes = "quick_buttons";
        echo "<div class=\"clearleft\"></div>\n";
    }
    ?>
			
	<div class="<?php 
    echo $classes;
    ?>
">
		<h1>Manage Extras:</h1>
		<p>
			<?php 
    if (CALENDAR_INSTALL) {
        ?>
			<strong>Event Calendar:</strong> 
			<a class="hcd_button" href="<?php 
        echo get_link("admin/list_events");
        ?>
">Edit Events</a> 
			<a class="hcd_button" href="<?php 
        echo get_link("admin/add_event");
        ?>
">Add an Event</a><br /><br />
			
			<?php 
    }
    if (GALLERY_INSTALL) {
        ?>
			<strong>Image Galleries:</strong> 
			<a class="hcd_button" href="<?php 
        echo get_link("admin/list_galleries");
        ?>
">Edit Galleries</a> 
			<a class="hcd_button" href="<?php 
        echo get_link("admin/add_gallery");
        ?>
">Add Gallery</a><br /><br />
			
			<?php 
    }
    if (PRODUCT_INSTALL) {
        ?>
			<strong>Products:</strong> 
			<a class="hcd_button" href="<?php 
        echo get_link("admin/list_products");
        ?>
">Edit Products</a> 
			<a class="hcd_button" href="<?php 
        echo get_link("admin/add_product");
        ?>
">Add a Product</a><br /><br />
			
			<?php 
    }
    if (VIDEO_INSTALL) {
        ?>
            <strong>Video:</strong> 
            <a class="hcd_button" href="<?php 
        echo get_link("admin/list_videos");
        ?>
">Edit Videos</a> 
			<a class="hcd_button" href="<?php 
        echo get_link("admin/edit_video/add");
        ?>
">Add a Video</a><br /><br />
			
    		<?php 
    }
    if (TESTIMONIAL_INSTALL) {
        ?>
    		<strong>Testimonials:</strong> 
            <a class="hcd_button" href="<?php 
        echo get_link("admin/list_testimonials");
        ?>
">Edit Testimonials</a> 
			<a class="hcd_button" href="<?php 
        echo get_link("admin/edit_testimonial/add");
        ?>
">Add a Testimonial</a><br /><br />
    		
    		<?php 
    }
    ?>
    		<strong>Images:</strong> 
			<a class="hcd_button" href="<?php 
    echo get_link("admin/list_images");
    ?>
">Edit Images</a> 
			<a class="hcd_button" href="<?php 
    echo get_link("admin/add_image");
    ?>
">Upload an Image</a><br /><br />
			
			<strong>Documents:</strong> 
			<a class="hcd_button" href="<?php 
    echo get_link("admin/list_documents");
    ?>
">Edit Documents</a> 
			<a class="hcd_button" href="<?php 
    echo get_link("admin/add_document");
    ?>
">Upload a Document</a>
		</p>
	</div>
	
	<div class="clearleft"></div>
					
	<!-- TO DO
		Break out the insert patterns into its own tab for images, documents and galleries. Explain galleries better.
	-->
	
	<?php 
    include_once snippetPath("admin_tutorial_list");
}
Exemplo n.º 16
0
        mysql_query($query) or die(mysql_error());
        $r_id = mysql_insert_id();
        header("Location:index.php?inc=manage_releases");
    }
}
if ($action == "update" && $r_id != "") {
    if (!isValidDate($r_date)) {
        $tmp = $lng[14][13];
    }
    if ($r_released_date != "" && !isValidDate($r_released_date)) {
        $tmp = $lng[14][14];
    }
    if ($tmp == "") {
        $r_date = parseDate($r_date, "%d.%m.%Y");
        //parsing date into mysql format
        $r_released_date = parseDate($r_released_date, "%d.%m.%Y");
        //parsing date into mysql format
        $query = "update releases set r_name='" . escapeChars($r_name) . "', r_date='" . escapeChars($r_date) . "', r_released_date='" . escapeChars($r_released_date) . "', r_global='" . escapeChars($r_global) . "' where r_id=" . $r_id;
        mysql_query($query) or die(mysql_error());
        header("Location:index.php?inc=manage_releases");
    }
}
if ($r_id != "") {
    $query = "select *, date_format(r_date, '%d.%m.%Y') as d1, date_format(r_released_date, '%d.%m.%Y') as d2 from releases where r_id=" . $r_id;
    $rs = mysql_query($query) or die(mysql_error());
    if ($row = mysql_fetch_array($rs)) {
        $r_name = htmlspecialchars($row['r_name']);
        $r_date = $row['d1'];
        $r_released_date = $row['d2'];
        $r_global = $row['r_global'];
    }
Exemplo n.º 17
0
function initialize_page()
{
    $event_types = EventTypes::FindAll();
    $event_periods = EventPeriods::FindAll();
    $post_action = "";
    if (isset($_POST['submit'])) {
        $post_action = $_POST['submit'];
        if ($post_action == "Add Event and add another" || $post_action == "Add and Return to List") {
            $event = MyActiveRecord::Create('Events', $_POST);
            if (!getPostValue('time_start')) {
                $event->setDateStart(getPostValue('date_start'), "04:00:00");
            } else {
                $event->time_start = date("H:i:s", strtotime(getPostValue('time_start')));
            }
            if (!getPostValue('date_end') && !getPostValue('time_end')) {
                $event->setDateEnd(getPostValue('date_start'), "04:00:00");
            } else {
                if (!getPostValue('date_end') && getPostValue('time_end')) {
                    $event->setDateEnd(getPostValue('date_start'), date("H:i:s", strtotime(getPostValue('time_end'))));
                } else {
                    $event->setDateEnd(getPostValue('date_end'), date("H:i:s", strtotime(getPostValue('time_end'))));
                }
            }
            $event->eventtype_id = isset($_POST['eventtype_id']) ? $_POST['eventtype_id'] : 1;
            $event->eventperiod_id = $_POST['eventperiod_id'];
            $event->save();
            $notdates = getPostValue('notdates');
            if (is_array($notdates)) {
                foreach ($notdates as $date) {
                    if (strlen($date) > 4) {
                        $query = "INSERT INTO events_notdate VALUES('{$event->id}','" . formatDateView($date, "Y-m-d") . "')";
                        mysql_query($query, MyActiveRecord::Connection()) or die($query);
                    }
                }
            }
            add_eventUpdateRecurrences($event);
            $thisnewevent = Events::FindById($event->id);
            if ($thisnewevent->date_end < $thisnewevent->date_start) {
                setFlash("<h3>Whoops! Event Starts after it Ends! Please correct dates...</h3>");
                $eventyear = parseDate($thisnewevent->date_start, "Y");
                $eventmonth = parseDate($thisnewevent->date_start, "n");
                redirect("/admin/edit_event/{$eventyear}/{$eventmonth}/{$thisnewevent->id}");
            } else {
                setFlash("<h3>Event added</h3>");
                if ($post_action == "Add and Return to List") {
                    // Redirect user to the Main Event List
                    $datestart = explode("/", getPostValue('date_start'));
                    setFlash("<h3>Event added</h3>");
                    redirect("/admin/list_events/{$datestart['2']}/{$datestart['0']}");
                }
            }
        }
    }
}
}
// Fixed args
$csdl_filename = $env->args[0];
$start_date = $env->args[1];
$end_date = $env->args[2];
$sources = $env->args[3];
$sample = $env->args[4];
$name = $env->args[5];
$output_type = $env->args[6];
// The rest of the args will be output parameters, and we'll use them later
// Parse the dates from the command line
$start_date = parseDate($start_date);
if (!$start_date) {
    usage('Invalid start date!');
}
$end_date = parseDate($end_date);
if (!$end_date) {
    usage('Invalid end date!');
}
// Load the CSDL
$csdl = false;
if (file_exists($csdl_filename)) {
    $csdl = file_get_contents($csdl_filename);
}
if (!$csdl) {
    usage('Failed to read CSDL from ' . $csdl_filename);
}
// Create the stream definition
$stream_definition = $env->user->createDefinition($csdl);
try {
    $historic = $stream_definition->createHistoric($start_date, $end_date, explode(',', $sources), $sample);
Exemplo n.º 19
0
function parseDate($str)
{
    if (preg_match('/^(\\d{4})년 (\\d{2})월 (\\d{2})일  (\\d{2}):(\\d{2}):(\\d{2})$/', $str, $matches)) {
        return parseDate("{$matches[1]}-{$matches[2]}-{$matches[3]} {$matches[4]}:{$matches[5]}:{$matches[6]}");
    }
    if (preg_match('/^(\\d{2})-(\\d{2})-(\\d{4}) (\\d{2}):(\\d{2})$/', $str, $matches)) {
        return parseDate("{$matches[3]}-{$matches[1]}-{$matches[2]} {$matches[4]}:{$matches[5]}:00}");
    }
    if (empty($str)) {
        return 0;
    }
    $time = strtotime($str);
    if ($time !== -1) {
        return $time;
    }
    $gmt = substr($str, strpos($str, "GMT")) == "GMT" ? 9 : 0;
    $str = str_replace("년 ", "-", $str);
    $str = str_replace("월 ", "-", $str);
    $str = str_replace("일 ", "", $str);
    $str = str_replace("GMT", "", $str);
    $str = str_replace("KST", "+0900", $str);
    if (strpos($str, "T")) {
        list($date, $time) = explode("T", $str);
        list($y, $m, $d) = explode("-", $date);
        list($time) = explode("+", $time);
        @(list($h, $i, $s) = explode(":", $time));
    } else {
        if (strpos($str, ":") && strpos($str, "-")) {
            list($str) = explode(".", $str);
            list($date, $time) = explode(" ", $str);
            list($y, $m, $d) = explode("-", $date);
            if ($d > 1900) {
                $t = $y;
                $y = $d;
                $d = $m;
                $m = $t;
            }
            @(list($h, $i, $s) = explode(":", $time));
        } else {
            if (strpos($str, ",") && strpos($str, ":")) {
                list($temp, $str) = explode(",", $str);
                $str = trim(str_month_check($str));
                list($d, $m, $y, $time) = explode(" ", $str);
                list($h, $i, $s) = explode(":", $time);
            } else {
                return gmmktime();
            }
        }
    }
    if (!$h) {
        $h = "00";
    }
    if (!$i) {
        $i = "00";
    }
    if (!$s) {
        $s = "00";
    }
    $h += $gmt;
    return mktime($h, $i, $s, $m, $d, $y);
}
Exemplo n.º 20
0
function getDefaultCenterPanel($mapping)
{
    $ctx = Model_Context::getInstance();
    $blogid = $ctx->getProperty('blog.id');
    ?>
									<div id="<?php 
    echo $mapping['plugin'];
    ?>
" class="section">
									<h3 class="caption<?php 
    echo isset($_REQUEST['edit']) ? ' visible' : ' invisible';
    ?>
">
											<span><?php 
    echo _t('알림판');
    if (isset($_REQUEST['edit'])) {
        ?>
											<a id="<?php 
        echo $mapping['plugin'];
        ?>
widgetup" href="<?php 
        echo $ctx->getProperty('uri.blog');
        ?>
/owner/center/dashboard?edit&pos=<?php 
        echo $positionCounter;
        ?>
&amp;rel=-1&edit"><?php 
        echo _t('위로');
        ?>
</a>
											<a id="<?php 
        echo $mapping['plugin'];
        ?>
widgetdown" href="<?php 
        echo $ctx->getProperty('uri.blog');
        ?>
/owner/center/dashboard?edit&pos=<?php 
        echo $positionCounter;
        ?>
&amp;rel=1&edit"><?php 
        echo _t('아래로');
        ?>
</a>
<?php 
    }
    ?>
											</span>
										</h3>
<?php 
    if (isset($_REQUEST['edit'])) {
        ?>
									</div>
<?php 
        return true;
    } else {
        // Get default data
        $stats = Statistics::getStatistics($blogid);
        $latestEntryId = Setting::getBlogSettingGlobal('LatestEditedEntry_user' . getUserId(), 0);
        $comments = getRecentComments($blogid, 10);
        $guestbooks = getRecentGuestbook($blogid, 10);
        list($commentNotifies, $paging) = getCommentsNotifiedWithPagingForOwner($blogid, 0, null, null, null, 1, 10);
        $trackbacks = getRecentTrackbacks($blogid, 10);
        $recents = array();
        // title, date, link, category
        foreach ($comments as $comment) {
            array_push($recents, array('title' => $comment['comment'], 'date' => $comment['written'], 'link' => $ctx->getProperty('uri.blog') . "/" . $comment['entry'] . "#comment" . $comment['id'], 'category' => 'comment'));
        }
        foreach ($commentNotifies as $comment) {
            array_push($recents, array('title' => $comment['comment'], 'date' => $comment['written'], 'link' => $ctx->getProperty('uri.blog') . "/owner/communication/notify", 'category' => 'commentNotify'));
        }
        foreach ($guestbooks as $guestbook) {
            array_push($recents, array('title' => $guestbook['comment'], 'date' => $guestbook['written'], 'link' => $ctx->getProperty('uri.blog') . "/guestbook/" . $guestbook['id'] . "#guestbook" . $guestbook['id'], 'category' => 'guestbook'));
        }
        foreach ($trackbacks as $trackback) {
            array_push($recents, array('title' => $trackback['subject'], 'date' => $trackback['written'], 'link' => $ctx->getProperty('uri.blog') . "/" . $trackback['entry'] . "#trackback" . $trackback['id'], 'category' => 'trackback'));
        }
        $sort_array = array();
        foreach ($recents as $uniqid => $row) {
            // Sorting.
            foreach ($row as $key => $value) {
                if (!array_key_exists($key, $sort_array)) {
                    $sort_array[$key] = array();
                }
                $sort_array[$key][$uniqid] = $value;
            }
        }
        if (!empty($sort_array)) {
            array_multisort($sort_array['date'], SORT_DESC, $recents);
        }
        $recents = array_slice($recents, 0, 14);
        ?>
										<div id="shortcut-collection">
											<h4 class="caption"><span><?php 
        echo _t('바로가기');
        ?>
</span></h4>

											<ul>
												<li class="newPost"><a class="newPost" href="<?php 
        echo $ctx->getProperty('uri.blog');
        ?>
/owner/entry/post"><span><?php 
        echo _t('새 글 쓰기');
        ?>
</span></a></li>
<?php 
        if ($latestEntryId !== 0) {
            $latestEntry = getEntry($blogid, $latestEntryId);
            if (!is_null($latestEntry)) {
                ?>
												<li class="modifyPost"><a href="<?php 
                echo $ctx->getProperty('uri.blog');
                ?>
/owner/entry/edit/<?php 
                echo $latestEntry['id'];
                ?>
"><?php 
                echo _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10)));
                ?>
</a></li>
<?php 
            }
        }
        if ($ctx->getProperty('service.reader') == true) {
            ?>
												<li class="rssReader"><a href="<?php 
            echo $ctx->getProperty('uri.blog');
            ?>
/owner/network/reader"><?php 
            echo _t('RSS로 등록한 이웃 글 보기');
            ?>
</a></li>
<?php 
        }
        if (Acl::check("group.administrators")) {
            ?>
												<li class="deleteCache"><a href="<?php 
            echo $ctx->getProperty('uri.blog');
            ?>
/owner/center/dashboard/cleanup" onclick="cleanupCache();return false;"><?php 
            echo _t('캐시 지우기');
            ?>
</a></li>
<?php 
            if (Acl::check("group.creators")) {
                ?>
												<li class="optimizeStorage"><a href="<?php 
                echo $ctx->getProperty('uri.blog');
                ?>
/owner/data" onclick="optimizeData();return false;"><?php 
                echo _t('저장소 최적화');
                ?>
</a></li>
<?php 
            }
        }
        ?>
												<li class="clear"></li>
											</ul>
										</div>

										<div id="total-information">
											<h4 class="caption"><span><?php 
        echo _t('요약');
        ?>
</span></h4>

											<table class="posts-line">
												<caption><?php 
        echo _t('글');
        ?>
</caption>
												<thead>
													<th>type</th>
													<th>sum</th>
												</thead>
												<tbody>
													<tr>
														<td class="type"><?php 
        echo _t('글');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getEntriesTotalCount($blogid));
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('댓글');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getCommentCount($blogid));
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('방명록');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getGuestbookCount($blogid));
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('걸린 글');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getTrackbackCount($blogid));
        ?>
</td>
													</tr>
												</tbody>
											</table>
											<table class="visitors-line">
												<caption><?php 
        echo _t('방문자');
        ?>
</caption>
												<thead>
													<th>type</th>
													<th>sum</th>
												</thead>
												<tbody>
													<tr>
														<td class="type"><?php 
        echo _t('오늘');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format($stats['today']);
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('어제');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format($stats['yesterday']);
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('7일 평균');
        ?>
</td>
														<td class="sum"><?php 
        $weekly = Statistics::getWeeklyStatistics();
        $weeklycount = 0;
        foreach ($weekly as $day) {
            $weeklycount += $day['visits'];
        }
        echo number_format($weeklycount / 7);
        unset($weekly);
        unset($weeklycount);
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('총방문자');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format($stats['total']);
        ?>
</td>
													</tr>
												</tbody>
											</table>
										</div>

										<div id="myBlogInfo">
											<h4 class="caption"><span><a href="<?php 
        echo $ctx->getProperty('uri.blog') . '/owner/communication/comment';
        ?>
"><?php 
        echo _t('알림판');
        ?>
</a></span></h4>
											<table class="recent">
												<caption>asdasd</caption>
												<thead>
													<tr>
														<th scope="col" class="date"><?php 
        echo _t('날짜');
        ?>
</th>
														<th scope="col" class="category"><?php 
        echo _t('종류');
        ?>
</th>
														<th scope="col"><?php 
        echo _t('내용');
        ?>
</th>
													</tr>
												</thead>
												<tbody>
<?php 
        foreach ($recents as $item) {
            ?>
													<tr class="<?php 
            echo $item['category'];
            ?>
">
														<td class="date"><?php 
            echo Timestamp::format('%m/%d', $item['date']);
            ?>
</td>
														<td class="category">
															<?php 
            switch ($item['category']) {
                case 'trackback':
                    echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/trackback?status=received">' . _t('걸린글') . '</a>';
                    break;
                case 'comment':
                    echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/comment?status=comment">' . _t('댓글') . '</a>';
                    break;
                case 'commentNotify':
                    echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/notify">' . _t('알리미') . '</a>';
                    break;
                case 'guestbook':
                    echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/comment?status=guestbook">' . _t('방명록') . '</a>';
                    break;
            }
            ?>
														</td>
														<td class="title"><a href="<?php 
            echo $item['link'];
            ?>
"><?php 
            echo htmlspecialchars(Utils_Unicode::lessenAsEm($item['title'], 20));
            ?>
</a></td>
													</tr>
<?php 
        }
        ?>
												</tbody>
											</table>
										</div>

<?php 
        $noticeURL = TEXTCUBE_NOTICE_URL;
        $noticeURLRSS = $noticeURL . ($ctx->getProperty('blog.language') ? $ctx->getProperty('blog.language') : "ko") . "/rss";
        $noticeEntries = array();
        if (!is_null(Setting::getServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language')))) {
            $noticeEntries = unserialize(Setting::getServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language')));
        } else {
            list($result, $feed, $xml) = getRemoteFeed($noticeURLRSS);
            if ($result == 0) {
                $xmls = new XMLStruct();
                $xmls->setXPathBaseIndex(1);
                $noticeEntries = array();
                if ($xmls->open($xml, $ctx->getProperty('service.encoding'))) {
                    if ($xmls->getAttribute('/rss', 'version')) {
                        for ($i = 1; $link = $xmls->getValue("/rss/channel/item[{$i}]/link"); $i++) {
                            $item = array('permalink' => rawurldecode($link));
                            $item['title'] = $xmls->getValue("/rss/channel/item[{$i}]/title");
                            if ($xmls->getValue("/rss/channel/item[{$i}]/pubDate")) {
                                $item['written'] = parseDate($xmls->getValue("/rss/channel/item[{$i}]/pubDate"));
                            } else {
                                if ($xmls->getValue("/rss/channel/item[{$i}]/dc:date")) {
                                    $item['written'] = parseDate($xmls->getValue("/rss/channel/item[{$i}]/dc:date"));
                                } else {
                                    $item['written'] = 0;
                                }
                            }
                            array_push($noticeEntries, $item);
                        }
                    }
                }
                Setting::setServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language'), serialize($noticeEntries));
            }
        }
        ?>
										<div id="textcube-notice">
											<h4 class="caption"><span><a href="<?php 
        echo $noticeURL . ($ctx->getProperty('blog.language') ? $ctx->getProperty('blog.language') : "ko");
        ?>
"><?php 
        echo _t('공지사항');
        ?>
</a></span></h4>
<?php 
        if (count($noticeEntries) > 0) {
            array_splice($noticeEntries, 3, count($noticeEntries) - 3);
            ?>
											<table>
												<tbody>
<?php 
            foreach ($noticeEntries as $item) {
                ?>
													<tr>
														<td class="date"><?php 
                echo Timestamp::format2($item['written']);
                ?>
</td>
														<td class="title"><a href="<?php 
                echo $item['permalink'];
                ?>
" onclick="return openLinkInNewWindow(this);" ><?php 
                echo htmlspecialchars(Utils_Unicode::lessenAsEm($item['title'], 35));
                ?>
</a></td>
													</tr>
<?php 
            }
            ?>
												</tbody>
											</table>

<?php 
        } else {
            ?>
											<div id="fail-notice">
												<?php 
            echo _t('공지사항을 가져올 수 없습니다. 잠시 후 다시 시도해 주십시오.');
            ?>
											</div>
<?php 
        }
        ?>
										</div>
<?php 
    }
    ?>
									</div>
<?php 
}
Exemplo n.º 21
0
}
// Only starts retrieving above forms when connection to Oracle is established
if ($db_conn) {
    // Get the drop down table selection and call function to deal with selected table
    if (array_key_exists('tabchoice', $_POST)) {
        // save selection for future load
        setcookie("tabchoice", $_POST['tabchoice']);
    }
    // Handle tuple insert form submission
    if (array_key_exists('insertsubmit', $_POST)) {
        reset($_POST);
        list($key, $value) = each($_POST);
        $tuple = "'{$value}'";
        while (list($key, $value) = each($_POST)) {
            if (strcmp($key, "DEPARTTIME") == 0 || strcmp($key, "ARRIVALTIME") == 0) {
                $value = parseDate($value, 3);
            }
            if (strcmp($key, "insertsubmit") == 0 || strcmp($key, "tablename") == 0) {
                break;
            }
            $tuple = "{$tuple},'{$value}'";
        }
        $tablename = $_POST['tablename'];
        executePlainSQL("insert into {$tablename} values ({$tuple})");
        OCICommit($db_conn);
    }
    // Handle tuple update form submission
    if (array_key_exists('updatesubmit', $_POST)) {
        $tablename = $_POST['tablename'];
        $field2change = $_POST['field2change'];
        $newvalue = $_POST['newvalue'];
Exemplo n.º 22
0
echo '</td><td align="right">' . chr(10);
include "trailer.inc.php";
if ($pview != 1) {
    echo "</td>\n";
    echo "</tr></table>\n";
}
echo '<table class="print" width="100%">' . chr(10);
echo '<tr><td><b>' . _('Area') . ':</b> ' . $this_area_name . ', <b>' . _('Room') . ':</b> ' . $theROOM['room_name'] . '</td></tr>' . chr(10);
echo '<tr><td>' . _('Data collected/printed') . ' ' . date('H:i:s d-m-Y') . ' ' . _('by') . ' ' . $login['user_name'] . '</td></tr>' . chr(10);
echo '<tr><td>' . _('Type of view') . ': ';
if ($thisFile == 'day.php') {
    echo _('day');
} elseif ($thisFile == 'week.php') {
    echo _('week');
} elseif ($thisFile == 'month.php') {
    echo _('month');
} else {
    echo _('unknown');
}
echo '</td></tr>' . chr(10);
echo '<tr><td>&nbsp;</td></tr>' . chr(10);
echo '<tr><td>';
if ($thisFile == 'week.php') {
    echo '<h1>' . _('Week') . ' ' . $thisWeek . ':</h1>';
} elseif ($thisFile == 'day.php') {
    echo '<h1>' . parseDate(strftime("%A", $am7)) . ' ' . strtolower(parseDate(strftime("%d %B %Y", $am7))) . ':</h1>';
} elseif ($thisFile == 'month.php') {
    echo '<h1>' . ucfirst(strtolower(parseDate(strftime("%B %Y", $monthstart)))) . ':</h1>' . chr(10);
}
echo '</td></tr>' . chr(10);
echo '</table>';
Exemplo n.º 23
0
 /**
 	Function: checkSessionForHN
 	Description: checking Stock Price
 	Input: $OrderDate, $Session, $OrderStyle='LO'
 	Output:
 */
 function checkSessionForHN($OrderDate)
 {
     // return ORDER_APPROVED;
     $arrOrderDate = parseDate($OrderDate);
     $unixOrderDate = mktime(0, 0, 0, $arrOrderDate[1], $arrOrderDate[2], $arrOrderDate[0]);
     $today = getdate();
     $unixToday = mktime(0, 0, 0, $today['mon'], $today['mday'], $today['year']);
     if ($unixOrderDate < $unixToday) {
         // some day in the past
         return ORDER_DENIED;
         // denied
     }
     if ($unixOrderDate == $unixToday) {
         // today
         $now = time();
         $DateTimeSession = $OrderDate . " " . HN_SESSION_END;
         $arrDateTimeSession = parseDateTime($DateTimeSession);
         $unixDateTimeSession = mktime($arrDateTimeSession[3], $arrDateTimeSession[4], 0, $arrDateTimeSession[1], $arrDateTimeSession[2], $arrDateTimeSession[0]);
         if ($now < $unixDateTimeSession) {
             //return 0; // available
             return ORDER_APPROVED;
             // FOR TEST TRUNG
         } else {
             return ORDER_DENIED;
             // denied
         }
     } else {
         // future
         //return ORDER_PENDING; // available
         return ORDER_APPROVED;
         // FOR TEST TRUNG
     }
 }
Exemplo n.º 24
0
           $where_clause .= " ( table{$tc}.attributeid = " . $crit_data["attribute"] . " and ";
           if ($crit_data["operator"] == "isnot") {
               $where_clause .= ' not ';
           }
           $valueselect = '';
           if ($value) {
               $valueselect = " length(table{$tc}.value) and table{$tc}.value != \"off\" and table{$tc}.value != \"0\" ";
           } else {
               $valueselect = " table{$tc}.value = \"\" or table{$tc}.value = \"0\" or table{$tc}.value = \"off\" ";
           }
           $where_clause .= '( ' . $valueselect . ') ) ';
           $subqueries[$i]['query'] = sprintf('select userid from %s as table%d where attributeid = %d
 and %s', $GLOBALS['tables']['user_attribute'], $tc, $crit_data['attribute'], $valueselect);
           break;
       case "date":
           $date_value = parseDate($crit_data["values"]);
           if (!$date_value) {
               break;
           }
           if (isset($where_clause)) {
               $where_clause .= " {$mainoperator} ";
               $select_clause .= " left join {$tables['user_attribute']} as table{$tc} on table0.userid = table{$tc}.userid ";
           } else {
               $select_clause = " table{$tc}.userid from {$tables['user_attribute']} as table{$tc} ";
           }
           $where_clause .= ' ( table' . $tc . '.attributeid = ' . $crit_data["attribute"] . ' and table' . $tc . '.value != "" and table' . $tc . '.value ';
           $dateoperator = '';
           switch ($crit_data["operator"]) {
               case "is":
                   $where_clause .= ' = "' . $date_value . '" )';
                   $dateoperator = '=';
Exemplo n.º 25
0
                 } else {
                     $attindex = Sql_Fetch_Row($attindexreq);
                     $attid = $attindex[0];
                 }
                 Sql_Query("update {$tables['user_attribute']} set value = {$attid} where attributeid = {$id} and value = \"{$row['0']}\"");
             }
             break;
         case 'checkbox':
             # in case of checkbox we just need to set the value to "on"
             Sql_Query("update {$tables['user_attribute']} set value = \"off\" where attributeid = {$id} and (value = 0 or value = \"off\")");
             Sql_Query("update {$tables['user_attribute']} set value = \"on\" where attributeid = {$id} and (value = 1 or value = \"on\") ");
         case 'date':
             $attreq = Sql_Query("select * from {$tables['user_attribute']} where attributeid = {$id}");
             while ($row = Sql_Fetch_Array($attreq)) {
                 #                	if (strlen($row["value"] > 5)) {
                 Sql_Query(sprintf('update %s set value = "%s" where attributeid = %d and userid = %d', $tables['user_attribute'], parseDate($row['value']), $row['attributeid'], $row['userid']));
                 #                  }
             }
             break;
     }
     break;
 case 'radio':
 case 'select':
 case 'checkbox':
     if ($_POST['type'][$id] != 'date' && $_POST['type'][$id] != 'hidden' && $_POST['type'][$id] != 'textline') {
         break;
     }
     print s('Converting %s from %s to %s', htmlentities($_POST['name'][$id]), $existingtype, htmlentities($_POST['type'][$id])) . '<br/>';
     # we are turning a radio,select or checkbox into a hidden or textline field
     $valuereq = Sql_Query("select id,name from {$table_prefix}" . "listattr_{$req['1']}");
     while ($row = Sql_Fetch_Row($valuereq)) {
Exemplo n.º 26
0
$room_time3 = array();
// Used to keep track of where to put <td> and at what colspan
$rooms = array();
for ($t = $week_start; $t < $week_end; $t += 86400) {
    /* ## Make map of time ## */
    $am7 = mktime($morningstarts, 0, 0, date('m', $t), date('d', $t), date('Y', $t));
    $pm7 = mktime($eveningends, $eveningends_minutes, 0, date('m', $t), date('d', $t), date('Y', $t));
    for ($i = $am7; $i <= $pm7; $i += $resolution) {
        $room_time[$t][date('Hi', $i)] = array();
        $room_time2[$t][date('Hi', $i)] = array();
        $room_time3[$t][date('Hi', $i)] = array();
    }
    $entries_room[$room] = array();
    // Reset array
    $room_max_col[$t] = 1;
    $rooms[$t] = ucfirst(strtolower(parseDate(strftime($dformat, $t))));
    $start = $am7;
    $end = $pm7;
    $events_room = checktime_Room($start, $end, $area, $room);
    if (isset($events_room[$room])) {
        foreach ($events_room[$room] as $entry_id) {
            // Fixing time for this event
            $event = getEntry($entry_id);
            if (count($event)) {
                //echo '<b>'.date('H:i:s dmY',$event['time_start']).'</b> start<br>'.chr(10);
                //echo '<b>'.date('H:i:s dmY',$event['time_end']).'</b> end<br>'.chr(10);
                // Saving originals
                $event['time_start_real'] = $event['time_start'];
                $event['time_end_real'] = $event['time_end'];
                if ($event['time_start'] < $start) {
                    $event['time_start'] = $start;
Exemplo n.º 27
0
 function setEntryDateAndTime($datetime = "")
 {
     $this->date = parseDate($datetime);
 }
Exemplo n.º 28
0
 public function imprimer()
 {
     parent::printable();
     $view = new View();
     $view->Assign("pdf", $this->pdf);
     switch ($this->request->code) {
         case "0001":
             $personnel = $this->Personnel->findSingleRowBy(["IDPERSONNEL" => $this->request->idpersonnel]);
             $view->Assign("personnel", $personnel);
             $ens = $this->Personnel->getEnseignements($this->request->idpersonnel);
             $view->Assign("enseignements", $ens);
             echo $view->Render("enseignant" . DS . "impression" . DS . "fiche", false);
             break;
             # Absence du jour des enseignant
         # Absence du jour des enseignant
         case "0002":
             $date = parseDate($this->request->datedebut);
             if (empty($date)) {
                 $date = date("Y-m-d", time());
             }
             $view->Assign("datejour", $date);
             $absences = $this->Absenceenseignant->getAbsencesDuJour($date);
             $view->Assign("absences", $absences);
             $classes = $this->Classe->selectAll();
             $view->Assign("classes", $classes);
             $sequence = $this->Sequence->getSequenceByDate($date);
             $view->Assign("sequence", $sequence);
             echo $view->Render("enseignant" . DS . "impression" . DS . "absencejour", false);
             break;
         case "0003":
             # Impression synthese hebdo des absences
             $datedebut = parseDate($this->request->datedebut);
             $datefin = parseDate($this->request->datefin);
             $absences = $this->Absenceenseignant->getAbsencesByPeriode($datedebut, $datefin);
             $view->Assign("absences", $absences);
             $view->Assign("datedebut", $datedebut);
             $view->Assign("datefin", $datefin);
             $sequence = $this->Sequence->getSequenceByDate($datedebut);
             $view->Assign("sequence", $sequence);
             echo $view->Render("enseignant" . DS . "impression" . DS . "absencesemaine", false);
             break;
         case "0004":
             # Impression synthese hebdo des absences
             echo $view->Render("enseignant" . DS . "impression" . DS . "systhesehebdo", false);
             break;
         case "0005":
             $this->pdf->isLandscape = true;
             $this->pdf->bCertify = false;
             $datedebut = parseDate($this->request->datedebut);
             $datefin = parseDate($this->request->datefin);
             $view->Assign("datedebut", $datedebut);
             $view->Assign("datefin", $datefin);
             $sequence = $this->Sequence->getSequenceByDate($datedebut);
             $view->Assign("sequence", $sequence);
             echo $view->Render("enseignant" . DS . "impression" . DS . "suividisciplinairevierge", false);
             break;
         case "0006":
             $this->pdf->isLandscape = true;
             $this->pdf->bCertify = false;
             $datedebut = parseDate($this->request->datedebut);
             $datefin = parseDate($this->request->datefin);
             $view->Assign("datedebut", $datedebut);
             $view->Assign("datefin", $datefin);
             $sequence = $this->Sequence->getSequenceByDate($datedebut);
             $view->Assign("sequence", $sequence);
             $absences = $this->Absenceenseignant->getAbsencesByPeriode($datedebut, $datefin);
             $view->Assign("absences", $absences);
             echo $view->Render("enseignant" . DS . "impression" . DS . "suividisciplinaire", false);
             break;
             # Recapitulatif des absences des enseignants
         # Recapitulatif des absences des enseignants
         case "0007":
             $datedebut = parseDate($this->request->datedebut);
             $datefin = parseDate($this->request->datefin);
             $view->Assign("datedebut", $datedebut);
             $view->Assign("datefin", $datefin);
             $absences = $this->Absenceenseignant->getResumesByPeriode($datedebut, $datefin);
             $view->Assign("absences", $absences);
             echo $view->Render("enseignant" . DS . "impression" . DS . "recapitulatifabsence", false);
             break;
             # Recapitulatif d'absence par enseignant
         # Recapitulatif d'absence par enseignant
         case "0008":
             $datedebut = parseDate($this->request->datedebut);
             if (empty($datedebut)) {
                 $datedebut = date("Y-m-d", time());
             }
             $datefin = parseDate($this->request->datefin);
             $view->Assign("datedebut", $datedebut);
             $view->Assign("datefin", $datefin);
             $absences = $this->Absenceenseignant->getAbsencesByEnseignant($this->request->idpersonnel, $datedebut, $datefin);
             $view->Assign("absences", $absences);
             $enseignant = $this->Personnel->get($this->request->idpersonnel);
             $view->Assign("enseignant", $enseignant);
             $recapitulatif = $this->Absenceenseignant->getResumesByPeriodeByEnseignant($this->request->idpersonnel, $datedebut, $datefin);
             $view->Assign("recapitulatif", $recapitulatif);
             echo $view->Render("enseignant" . DS . "impression" . DS . "recapitulatifindividuelle", false);
             break;
     }
 }
Exemplo n.º 29
0
 public function ajaxoperation()
 {
     $action = $this->request->action;
     $json = array();
     $view = new View();
     $datedebut = parseDate($this->request->datedebut);
     $datefin = parseDate($this->request->datefin);
     switch ($action) {
         case "validerOperation":
             $this->Caisse->update(["valide" => 1], ["idcaisse" => $this->request->idcaisse]);
             break;
         case "percuRecu":
             # Inserer la perception du montant par l'utilisateur connecter
             $personnel = $this->Personnel->getBy(["USER" => $this->session->iduser]);
             $params = ["percupar" => $personnel['IDPERSONNEL'], "dateperception" => date("Y-m-d H:i:s", time())];
             $this->Caisse->update($params, ["idcaisse" => $this->request->idcaisse]);
             # Envoi du SMS a ce numero
             $this->notifyVersement();
             break;
     }
     # 1 = Operation en cours, 2 = Operation validee, 3 = Operation dont le montant est percue
     $filtre = $this->request->filtre;
     if (empty($datedebut)) {
         $datedebut = "1970-01-01";
     }
     if ($filtre == 1) {
         $operations = $this->Caisse->getOperationsEncours($datedebut, $datefin);
     } elseif ($filtre == 2) {
         $operations = $this->Caisse->getOperationsValidees($datedebut, $datefin);
     } elseif ($filtre == 3) {
         $operations = $this->Caisse->getOperationsPercues($datedebut, $datefin);
     } elseif (!empty($this->request->datedebut)) {
         $operations = $this->Caisse->getOperationsByJour($datedebut, $datefin);
     } else {
         $operations = $this->Caisse->selectAll();
     }
     $view->Assign("operations", $operations);
     $json[0] = $view->Render("caisse" . DS . "ajax" . DS . "operation", false);
     # montant
     $totaux = $this->Caisse->getMontantTotaux($datedebut, $datefin);
     $view->Assign("totaux", $totaux);
     $json[1] = $view->Render("caisse" . DS . "ajax" . DS . "tableTotaux", false);
     echo json_encode($json);
 }
                 } else {
                     $attindex = Sql_Fetch_Row($attindexreq);
                     $attid = $attindex[0];
                 }
                 Sql_Query("update {$tables['user_attribute']} set value = {$attid} where attributeid = {$id} and value = \"{$row['0']}\"");
             }
             break;
         case "checkbox":
             # in case of checkbox we just need to set the value to "on"
             Sql_Query("update {$tables['user_attribute']} set value = \"off\" where attributeid = {$id} and (value = 0 or value = \"off\")");
             Sql_Query("update {$tables['user_attribute']} set value = \"on\" where attributeid = {$id} and (value = 1 or value = \"on\") ");
         case "date":
             $attreq = Sql_Query("select * from {$tables['user_attribute']} where attributeid = {$id}");
             while ($row = Sql_Fetch_Array($attreq)) {
                 #                	if (strlen($row["value"] > 5)) {
                 Sql_Query(sprintf('update %s set value = "%s" where attributeid = %d and userid = %d', $tables["user_attribute"], parseDate($row["value"]), $row["attributeid"], $row["userid"]));
                 #                  }
             }
             break;
     }
     break;
 case "radio":
 case "select":
 case "checkbox":
     if ($_POST["type"][$id] != "date" && $_POST["type"][$id] != "hidden" && $_POST["type"][$id] != "textline") {
         break;
     }
     print "Converting " . $_POST["name"][$id] . " from {$existingtype} to " . $_POST["type"][$id] . "<br/>";
     # we are turning a radio,select or checkbox into a hidden or textline field
     $valuereq = Sql_Query("select id,name from {$table_prefix}" . "listattr_{$req['1']}");
     while ($row = Sql_Fetch_Row($valuereq)) {