Пример #1
1
	<div class="margin-top">
	<div class="row">	
	<div class="span12">	
        <div class="alert alert-info">Add Magazines/ Newspaper</div>
		<p><a href="magazines.php" class="btn btn-info"><i class="icon-arrow-left icon-large"></i>&nbsp;Back</a></p>
		<div class="addstudent">
		<div class="details">Please enter details for Magazines/ Newspaper</div>		
		
		<form enctype="multipart/form-data" class="form-horizontal" method="post">
		
		<div class="control-group">	
		<label class="control-label" for="inputEmail">Date Issue:</label>
			<div class="controls">
					
			<?php 
$myCalendar = new tc_calendar("date5", true, false);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2000, 2030);
$myCalendar->dateAllow('2008-05-13', '2020-03-01');
$myCalendar->setDateFormat('F j, Y');
$myCalendar->setAlignment('left', 'bottom');
$myCalendar->setSpecificDate(array("2011-06-01"), 0, '');
$myCalendar->writeScript();
?>
			<script type="text/javascript">
				var datepick=$("#container_date5").text();
				$('#dateput').html("<input type='hidden' name='date' value='"+datepick+"'");
			</script>			
			</div>
Пример #2
1
}
if ($sly && $sly > $year_end) {
    $sly = $year_end;
}
if (isset($_REQUEST["y"])) {
    $y = $_REQUEST["y"];
} else {
    $y = $cyr ? $sly : date('Y');
}
//echo("<br>y: ".$y);
if ($y <= 0) {
    $y = date('Y');
}
$objname = isset($_REQUEST["objname"]) ? $_REQUEST["objname"] : "";
$dp = isset($_REQUEST["dp"]) ? $_REQUEST["dp"] : "";
$cobj = new tc_calendar("");
$cobj->startMonday($startMonday);
if (!$year_start || !$year_end) {
    $year_start = $cobj->year_start;
    //get default value of year start
    $year_end = $cobj->year_end;
    //get default value of year end
}
//$cobj->setDate($sld, $slm, $sly);
$total_thismonth = $cobj->total_days($m, $y);
if ($m == 1) {
    $previous_month = 12;
    $previous_year = $y - 1;
} else {
    $previous_month = $m - 1;
    $previous_year = $y;
Пример #3
1
<?php

$myCalendar = new tc_calendar("date1", true);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(01, 03, 1960);
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(1960, 2015);
$myCalendar->dateAllow('1960-01-01', '2015-03-01');
$myCalendar->setSpecificDate(array("2011-04-01", "2011-04-13", "2011-04-25"), 0, 'month');
$myCalendar->setOnChange("myChanged('test')");
$myCalendar->writeScript();
?>
 
<html>
<head>
<script language="javascript"> <
!-- function myChanged(v){ alert("Hello, value has been changed : "+document.getElementById("date1").value+"["+v+"]"); } //--> 
</script>
</head>
</html>
Пример #4
0
function generateCalendarScript($name, $default_date)
{
    $myCalendar = new tc_calendar($name, true, false);
    $myCalendar->setIcon("images/iconCalendar.gif");
    $myCalendar->setDate(date('d', strtotime($default_date)), date('m', strtotime($default_date)), date('Y', strtotime($default_date)));
    $myCalendar->setPath("/stats/");
    $myCalendar->setYearInterval(1970, 2020);
    $myCalendar->setAlignment('left', 'bottom');
    $myCalendar->setDatePair('fm_date_start', 'fm_date_end');
    $myCalendar->writeScript();
}
Пример #5
0
function CalendarAutoSubmit($strLabel, $strField, $strForm, $strDate = "")
{
    echo "<tr>";
    echo "\t<td valign=top>";
    echo $strLabel;
    echo "\t</td>";
    echo "\t<td>";
    $myCalendar = new tc_calendar($strField);
    $myCalendar->setIcon("images/iconCalendar.gif");
    if (empty($strDate)) {
        $myCalendar->setDate(date('d'), date('m'), date('Y'));
    } else {
        $arr = explode("-", $strDate);
        $myCalendar->setDate($arr[2], $arr[1], $arr[0]);
    }
    $myCalendar->setPath("calendar/");
    $myCalendar->setYearInterval(1970, 2020);
    $myCalendar->dateAllow('2008-05-13', '2015-03-01', false);
    $myCalendar->startMonday(true);
    $myCalendar->disabledDay("Fri");
    $myCalendar->autoSubmit(true, $strForm);
    $myCalendar->writeScript();
    echo "\t</td>";
    echo "</tr>";
}
Пример #6
0
        $y1 = $cdate->getDate('Y', $time_allow1);
        if ($y == $y1 && (int) $m < (int) $m1) {
            $m = $m1;
        }
    }
    if ($ta2_set) {
        $m2 = $cdate->getDate('m', $time_allow2);
        $y2 = $cdate->getDate('Y', $time_allow2);
        if ($y == $y2 && (int) $m > (int) $m2) {
            $m = $m2;
        }
    }
}
$objname = getParameter("objname");
$dp = getParameter("dp", "boolean");
$cobj = new tc_calendar("");
$cobj->setDate($sld, $slm, $sly);
$cobj->startDate($startDate);
$cobj->dsb_days = explode(",", $dsb_txt);
$cobj->time_allow1 = $time_allow1;
$cobj->time_allow2 = $time_allow2;
$version = $cobj->version;
$check_version = $cobj->check_new_version;
$cobj->setYearInterval($year_start, $year_end);
$cobj->setTimezone($timezone);
//set for further usage, nothing for now
//check and show default calendar month and year on valid range of date_allow
if (!isset($_REQUEST["m"])) {
    if ($time_allow1 != "") {
        //get date of time allow1
        if ($cdate->validDate($time_allow1)) {
Пример #7
0
<?php

$myCalendar = new tc_calendar("date5", true, false);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2000, 2015);
$myCalendar->dateAllow('2008-05-13', '2015-03-01');
$myCalendar->setDateFormat('j F Y');
$myCalendar->setAlignment('left', 'bottom');
$myCalendar->setSpecificDate(array("2011-04-01", "2011-04-04", "2011-12-25"), 0, 'year');
$myCalendar->setSpecificDate(array("2011-04-10", "2011-04-14"), 0, 'month');
$myCalendar->setSpecificDate(array("2011-06-01"), 0, '');
$myCalendar->writeScript();
?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>
Пример #8
0
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<form name="form1" method="post" action="test.php">
  <tr>
              <p class="largetxt"><b>DatePicker with no input box</b></p>
              <table border="0" cellspacing="0" cellpadding="2">
                <tr>
                  <td nowrap>Date 3 :</td>
                  <td><?php 
$i = 0;
while ($i < 3) {
    $myCalendar = new tc_calendar("date{$i}", true, false);
    $myCalendar->setIcon("calendar/images/iconCalendar.gif");
    //$myCalendar->setDate(date('d'), date('m'), date('Y'));
    $myCalendar->setPath("calendar/");
    $myCalendar->setYearInterval(2000, 2020);
    //$myCalendar->dateAllow('2008-05-13', '2015-03-01');
    $myCalendar->setDateFormat('j F Y');
    //$myCalendar->setHeight(350);
    //$myCalendar->autoSubmit(true, "form1");
    $myCalendar->setAlignment('left', 'bottom');
    $myCalendar->writeScript();
    $i++;
}
?>
</td>
                  <td><input type="button" name="button" id="button" value="Check the value" onClick="javascript:alert(this.form.date5.value);"></td>
Пример #9
0
 function _calendar($date)
 {
     $myCalendar = new tc_calendar("date1", true);
     $myCalendar->setIcon("../site/calendar/images/iconCalendar.gif");
     //$myCalendar->setDate(date('d'), date('m'), date('Y'));
     if (isset($date)) {
         $myCalendar->setDate(date('d', strtotime($date)), date('m', strtotime($date)), date('Y', strtotime($date)));
     }
     $myCalendar->setPath("../site/calendar/");
     $myCalendar->setYearInterval(2005, 2045);
     //$myCalendar->dateAllow('2008-05-13', '2015-03-01');
     $myCalendar->setDateFormat('Y-m-d');
     //$myCalendar->setHeight(350);
     //$myCalendar->autoSubmit(true, "phmembership");
     $myCalendar->setAlignment('left', 'bottom');
     //$myCalendar->setSpecificDate(array("2011-04-01", "2011-04-04", "2011-12-25"), 0, 'year');
     //$myCalendar->setSpecificDate(array("2011-04-10", "2011-04-14"), 0, 'month');
     // $myCalendar->setSpecificDate(array("2011-06-01"), 0, '');
     $myCalendar->writeScript();
 }
Пример #10
0
       <div class="column1">Check in date:<br/>
         <?php 
$myCalendar = new tc_calendar("checkin", true, false);
$myCalendar->setIcon("images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("./");
$myCalendar->setYearInterval(2000, 2015);
$myCalendar->dateAllow('2008-05-13', '2015-03-01');
$myCalendar->setDateFormat('j F Y');
$myCalendar->writeScript();
?>
       </div>
  
       <div class="column2">Check out date:<br/>
         <?php 
$myCalendar = new tc_calendar("checkout", true, false);
$myCalendar->setIcon("images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("./");
$myCalendar->setYearInterval(2000, 2015);
$myCalendar->dateAllow('2008-05-13', '2015-03-01');
$myCalendar->setDateFormat('j F Y');
$myCalendar->writeScript();
?>
       </div><br/><br/><br/><br/>
  
       <div class="column1">Adults<br/><select name="adults" id="adults">
           <option  value="1">1</option>
           <option  value="2">2</option>
           <option value="3">3</option>
           <option value="4">4</option>
Пример #11
0
><?php 
    echo A_CONFCONTENT_177;
    ?>
</option>
		</select>
	</td>
</tr>
<tr>
	<td><b><?php 
    echo A_CONFCONTENT_178;
    ?>
</b>
	</td>
	<td class=success>
		<?php 
    $myCalendar = new tc_calendar("date1", true, false);
    $myCalendar->zindex = 150;
    //default 1
    $myCalendar->setIcon("./plugins/calendar/images/iconCalendar.gif");
    $myCalendar->setPath("./plugins/calendar/");
    if ($INSTALL_DATE && $INSTALL_DATE != "") {
        $myCalendar->setDate(substr($INSTALL_DATE, -2), substr($INSTALL_DATE, 5, 2), substr($INSTALL_DATE, 0, 4));
    } else {
        $CorrectedTime = mktime(date("G") + C_TMZ_OFFSET * 60 * 60, date("i"), date("s"), date("m"), date("d"), date("Y"));
        $myCalendar->setDate(date('d', $CorrectedTime), date('m', $CorrectedTime), date('Y', $CorrectedTime));
    }
    $myCalendar->setYearInterval(2000, date('Y'));
    $myCalendar->dateAllow('1900-01-01', date('Y-m-d'));
    $myCalendar->setAlignment('left', 'bottom');
    //optional
    $DbLink->query("SELECT username,birthday,show_age FROM " . C_REG_TBL . " WHERE birthday != '' AND birthday != '0000-00-00' AND show_bday = '1' ORDER BY birthday ASC");
Пример #12
0
    echo '<table id="reservation_table"><colgroup span="1" id="reservation_time_colgroup"></colgroup><colgroup span="7" id="reservation_day_colgroup"></colgroup>';
    $days_row = '<tr  ><td id="reservation_corner_td">Dvorana Vrijeme <br><input type="button" class="blue_button small_button" id="reservation_today_button" value="Danas"></td><th class="reservation_day_th">1</th><th class="reservation_day_th">2</th><th class="reservation_day_th">3</th><th class="reservation_day_th">4</th><th class="reservation_day_th">5</th><th class="reservation_day_th">6</th><th class="reservation_day_th" >7</th></tr>';
    echo $days_row;
    foreach ($global_times as $time) {
        echo '<tr><th class="reservation_time_th">' . $time . '</th>';
        $i = 0;
        while ($i < 7) {
            $i++;
            echo '<td><div class="reservation_time_div"><div class="reservation_time_cell_div" id="div:' . $week . ':' . $i . ':' . $time . '" onclick="void(0)">' . read_reservation($week, $i, $time, $conn) . '</div></div></td>';
        }
        echo '</tr>';
    }
    echo '</table>';
} else {
    echo '<div class="box_div" id="cp_div"><div class="box_top_div"><a href="#"><input type="button" class="small_button blue_button" value="' . $_SESSION['user_name'] . '"></a></div>';
    $myCalendar = new tc_calendar("date1", true, false);
    $myCalendar->setDate(date('d'), date('m'), date('Y'));
    $myCalendar->setPath("calendar/");
    $myCalendar->setYearInterval(date('Y'), date('Y') + 10);
    $myCalendar->dateAllow(date('Y-m-d'), '2020-12-31');
    $myCalendar->setIcon("calendar/images/iconCalendar.gif");
    $myCalendar->setAlignment("right", "bottom");
    $myCalendar->setOnChange("myChanged()");
    $myCalendar->writeScript();
    ?>
	  <script language="javascript">
    var global_week_number ="<?php 
    echo global_week_number;
    ?>
";
	</script> <?php 
Пример #13
0
        $y1 = date('Y', $time_allow1);
        if ($y == $y1 && (int) $m < (int) $m1) {
            $m = $m1;
        }
    }
    if ($ta2_set) {
        $m2 = date('m', $time_allow2);
        $y2 = date('Y', $time_allow2);
        if ($y == $y2 && (int) $m > (int) $m2) {
            $m = $m2;
        }
    }
}
$objname = isset($_REQUEST["objname"]) ? $_REQUEST["objname"] : "";
$dp = isset($_REQUEST["dp"]) ? $_REQUEST["dp"] : "";
$cobj = new tc_calendar("");
$cobj->startMonday($startMonday);
$cobj->dsb_days = explode(",", $dsb_txt);
if (!$year_start || !$year_end) {
    $year_start = $cobj->year_start;
    //get default value of year start
    $year_end = $cobj->year_end;
    //get default value of year end
}
//$cobj->setDate($sld, $slm, $sly);
$total_thismonth = $cobj->total_days($m, $y);
if ($m == 1) {
    $previous_month = 12;
    $previous_year = $y - 1;
} else {
    $previous_month = $m - 1;
Пример #14
0
        echo "<SPAN CLASS=\"error\">*</SPAN>";
    }
    ?>
			</TD>
		</TR>
<?php 
}
?>
		<TR>
			<TD ALIGN="RIGHT" VALIGN="TOP" NOWRAP="NOWRAP"><?php 
echo L_PRO_7;
?>
 :</TD>
			<TD VALIGN="TOP" CLASS=success>
			<?php 
$myCalendar = new tc_calendar("date1", true, true);
$myCalendar->zindex = 150;
//default 1
$myCalendar->setIcon("plugins/calendar/images/iconCalendar.gif");
$myCalendar->setPath("plugins/calendar/");
if (isset($BIRTHDAY)) {
    $birth_day = strtotime($BIRTHDAY);
    $myCalendar->setDate(date('d', $birth_day), date('m', $birth_day), date('Y', $birth_day));
}
$myCalendar->setYearInterval(1935, date('Y'));
$myCalendar->dateAllow('1935-01-01', date('Y-m-d'));
$myCalendar->writeScript();
?>
				&nbsp;<?php 
if (!$done && C_REQUIRE_BDAY) {
    echo "<SPAN CLASS=\"error\">*</SPAN>";
Пример #15
0
        echo 'lag.php?valgtLag=' . $lagid . '';
        ?>
">
		<br><br><br>Legg til ny aktivitet:<br>
		
		Type: <select name="typevalg">
		  <option value="Kamp">Kamp</option>
		  <option value="M&oslash;te">M&oslash;te</option>
		  <option value="Trening">Trening</option>
		</select>
		<br>
		<?php 
        //get class into the page
        require_once 'calendar/classes/tc_calendar.php';
        //instantiate klasse og properties
        $myCalendar = new tc_calendar("date1", true, false);
        $myCalendar->setIcon("calendar/images/iconCalendar.gif");
        $myCalendar->setDate(date('d'), date('m'), date('Y'));
        $myCalendar->setPath("calendar/");
        $myCalendar->setYearInterval(2000, 2016);
        $myCalendar->dateAllow('2008-05-13', '2016-03-01');
        $myCalendar->setDateFormat('j F Y');
        $myCalendar->setAlignment('left', 'bottom');
        $myCalendar->startMonday(True);
        $myCalendar->showWeeks(True);
        //$myCalendar->setSpecificDate(array("2011-04-01", "2011-04-04", "2011-12-25"), 0, 'year');
        //output calendar
        $myCalendar->writeScript();
        echo '<select name="klokke">';
        for ($hours = 0; $hours < 24; $hours++) {
            // the interval for hours is '1'
Пример #16
0
        echo "<script language=\"javascript\" type=\"text/javascript\">";
        echo "alert('Fill in user name to check :)')";
        echo "</script>";
    }
}
?>
                 <br/>Name:&nbsp;&nbsp;<br/>
                <input type='text' class="tb" name='name'  maxlength='50'/><br/>
                 <br/>Password:&nbsp;&nbsp;<br/>
                <input type="password" class="tb" name="password"  maxlength='50'/><br/>(minimum length 6 letters)<br/>
                <br/>Confirm Password:&nbsp;&nbsp;<br/>
                <input type="password" class="tb" name="password_check" maxlength='50'/>
                <br/>DOB:<br/>
                <?php 
require 'calendar/tc_calendar.php';
$myCalendar = new tc_calendar("date1", true);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->zindex = 150;
//default 1
$myCalendar->setYearInterval(1995, date('Y'));
$myCalendar->dateAllow('1920-03-01', date('Y-m-d'));
$myCalendar->setAlignment('right', 'bottom');
//optional
$myCalendar->writeScript();
?>
				<br/>
                <br/>Sex:&nbsp;&nbsp;
                <input type="radio" name="sex" value="Male"> Male &nbsp;&nbsp;
				<input type="radio" name="sex" value="Female" > Female<br>
Пример #17
0
?>
<div id="top_content">
	<div id="cal">
    <form name="form1" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
      <p class="largetxt"><b>Select Date: </b></p>
      <?php 
$thisYear = date("Y");
$thisDate = date("Y-m-d");
$thisRange = date("Y-m-d", strtotime("+7 days"));
if (strtotime($theDate) > strtotime($thisRange) || strtotime($theDate) < strtotime($thisDate)) {
    $theDate = $thisDate;
}
$myCalendar = new tc_calendar("date1");
$myCalendar->setIcon("images/iconCalendar.gif");
if (!empty($theDate)) {
    $newDate = strtotime($theDate);
    $myCalendar->setDate(date('d', $newDate), date('m', $newDate), date('Y', $newDate));
    $nowDate = date("D, F d, Y", $newDate);
} else {
    $myCalendar->setDate(date('d'), date('m'), date('Y'));
    $theDate = date("Y-m-d");
    $nowDate = date("D, F d, Y");
}
$myCalendar->setPath("./");
$myCalendar->setYearInterval($thisYear, $thisYear);
$myCalendar->dateAllow($thisDate, $thisRange, false);
$myCalendar->startMonday(true);
//$myCalendar->setDateFormat('d, m, Y');
Пример #18
0
        echo "<SPAN CLASS=\"error\">*</SPAN>";
    }
    ?>
			</TD>
		</TR>
<?php 
}
?>
		<TR>
			<TD ALIGN="RIGHT" VALIGN="TOP" NOWRAP="NOWRAP"><?php 
echo L_PRO_7;
?>
 :</TD>
			<TD VALIGN="TOP" CLASS=success>
			<?php 
$myCalendar = new tc_calendar("date1", true, true);
$myCalendar->setAutoHide(false);
$myCalendar->zindex = 150;
//default 1
$myCalendar->setIcon("plugins/calendar/images/iconCalendar.gif");
$myCalendar->setPath("plugins/calendar/");
if (isset($BIRTHDAY)) {
    $myCalendar->setDate(substr($BIRTHDAY, -2), substr($BIRTHDAY, 5, 2), substr($BIRTHDAY, 0, 4));
}
$myCalendar->setYearInterval(1900, date('Y'));
$myCalendar->dateAllow('1900-01-01', date('Y-m-d'));
$DbLink->query("SELECT username,birthday,show_age FROM " . C_REG_TBL . " WHERE birthday != '' AND birthday != '0000-00-00' AND show_bday = '1' ORDER BY birthday ASC");
if ($DbLink->num_rows() != 0) {
    $mday = array();
    include_once 'plugins/birthday/age.class.php';
    $my_dob = new DateOfBirth();
Пример #19
0
" /></td>
    </tr>
    <tr>
    	<td class="title">Email</td>
        <td class="info"><input type="text" name="txtemail" size="30" value="<?php 
echo $email;
?>
"/></td>
    </tr>
        
    <tr>
    	<td class="title">Ngày Sinh</td>
        <td class="info">
        <form id="form2" name="form2" method="post" action="">
		<?php 
$myCalendar = new tc_calendar("date1", true);
$myCalendar->setIcon("images/iconCalendar.gif");
$myCalendar->setDate($ngaysinh, $thangsinh, $namsinh);
$myCalendar->setPath("./");
$myCalendar->setYearInterval(1920, date('Y', time()));
$myCalendar->dateAllow('1960-01-01', '2015-03-01');
//$myCalendar->setHeight(350);
//$myCalendar->autoSubmit(true, "form1");
$myCalendar->disabledDay("Sat");
$myCalendar->disabledDay("sun");
$myCalendar->writeScript();
?>
      
      </form>
      </td>
    </tr>
Пример #20
0
Файл: sale.php Проект: kxr/stock
	</table>

	<div id="popupForm">
		<table width=100% cellspacing="5">
		 <form name="addform" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">		
			<tr>
				<td colspan="2" align="center" valign="center"><h2>Add Sale</h2></td>
				<td align="right"><a href="javascript:;"><img src="imgs/close.png" height="35" width="35" id="popupFormClose"></img></a></td>
			</tr>
			<tr>
				<td> <b>Date: </b> </td>
				<td>	<?php 
$myCalendar = new tc_calendar("sdate", true, false);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2012, 2020);
$myCalendar->setAlignment('left', 'bottom');
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->writeScript();
?>
				</td>	
			</tr>
			<tr>
				<td> <b>Item : </b> </td>
				<td>
					<select id="svenid">
						<?php 
$sql = "SELECT * FROM stock_vendors";
//get class into the page
require_once 'calendar/tc_calendar.php';
//instantiate class and set properties
$myCalendar = new tc_calendar("date1", true);
$myCalendar->setIcon("images/iconCalendar.gif");
$myCalendar->setDate(1, 1, 2000);
//output the calendar
$myCalendar->writeScript();
?>
</form>




<?php 
$myCalendar = new tc_calendar("date2");
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(1970, 2020);
$myCalendar->dateAllow('2008-05-13', '2015-03-01', false);
$myCalendar->startMonday(true);
$myCalendar->disabledDay("Sat");
$myCalendar->disabledDay("sun");
$myCalendar->writeScript();
// Use the uppercase column names for the associative array indices
/*   echo $row[0] . $row['EventNo']   . " are the same<br>\n"; //i must use capital letters!!
    echo $row[1] . $row['eventFN']   . " are the same<br>\n"; //i must use capital letters!!
    echo $row[2] . $row['eventLN']   . " are the same<br>\n"; //i must use capital letters!! make sure that the eventomer has a surname entered!!!
    echo $row[3] . $row['eventTEL']   . " are the same<br>\n"; //i must use capital letters!!
    echo $row[4] . $row['eventCELL']   . " are the same<br>\n"; //i must use capital letters!!
Пример #22
0
</form>
</td>
<td>
<?php 
$date3_default_not_formatted = mktime(0, 0, 0, date("m") - 1, date("d"), date("Y"));
$date3_default = date("Y-m-d", $date3_default_not_formatted);
$date4_default = date("Y-m-d");
$myCalendar = new tc_calendar("date3", true, false);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d', strtotime($date3_default)), date('m', strtotime($date3_default)), date('Y', strtotime($date3_default)));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2000, 2020);
$myCalendar->setAlignment('left', 'bottom');
$myCalendar->setDatePair('date3', 'date4', $date4_default);
$myCalendar->writeScript();
$myCalendar = new tc_calendar("date4", true, false);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d', strtotime($date4_default)), date('m', strtotime($date4_default)), date('Y', strtotime($date4_default)));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2000, 2020);
$myCalendar->setAlignment('left', 'bottom');
$myCalendar->setDatePair('date3', 'date4', $date3_default);
$myCalendar->writeScript();
?>
</td>
<td><div class="arrow-right"></div></td>
</tr>
</table>
</body>
</html>
Пример #23
0
            
			<form id="frmregister" method="post" action="#">
					<input type="text" id="username" name="uname" class="form-control" value="<?php 
echo $_SESSION["user_name"];
?>
" readonly="readonly"   placeholder="User Name" required="required" /><br />
                    <input type="text" id="hotel" name="hname" class="form-control"  value="<?php 
echo $_SESSION["hot"];
?>
" readonly="readonly"  placeholder="Hotel Name" required="required" /><br />
                    <input type="text" id="date" name="date" class="form-control" value=""  placeholder="Date"  required="required" />
  
  <br />
  
    	<?php 
$myCalendar = new tc_calendar("date", true, false);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(1, date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2000, 2015);
$myCalendar->setDateFormat('j F Y');
//$myCalendar->autoSubmit(true, "form1");
$myCalendar->setAlignment('left', 'bottom');
$myCalendar->setAutoHide(true, 1000);
$myCalendar->showWeeks(true);
$myCalendar->startMonday(true);
$myCalendar->writeScript();
?>
  

	<input type="text" id="amount" name="amount" class="form-control"   placeholder="Total amount" value="<?php 
Пример #24
0
}
$myCalendar = new tc_calendar("date3", true, false);
$myCalendar->setIcon("images/iconCalendar.gif");
$myCalendar->setDate(date('d', strtotime($date1)), date('m', strtotime($date1)), date('Y', strtotime($date1)));
$myCalendar->setPath("./");
$myCalendar->setYearInterval(1970, 2020);
//$myCalendar->dateAllow('2009-02-20', "", false);
$myCalendar->writeScript();
?>
                </div>
              </div>
              <div style="float: left;">
                <div style="float: left; padding-left: 3px; padding-right: 3px; line-height: 18px;">to</div>
                <div style="float: left;">
                  <?php 
$myCalendar = new tc_calendar("date4", true, false);
$myCalendar->setIcon("images/iconCalendar.gif");
$myCalendar->setDate(date('d', strtotime($date2)), date('m', strtotime($date2)), date('Y', strtotime($date2)));
$myCalendar->setPath("./");
$myCalendar->setYearInterval(1970, 2020);
//$myCalendar->dateAllow("", '2009-11-03', false);
$myCalendar->writeScript();
?>
                </div>
              </div>
              <p>
                <input type="button" name="button2" id="button2" value="Check the value" onClick="javascript:alert('Date select from '+this.form.date3.value+' to '+this.form.date4.value);">
              </p>
              <p><b>Code:</b></p>
              <pre>&lt;?php					<br>	  $myCalendar = new tc_calendar(&quot;date3&quot;, true, false);<br>	  $myCalendar-&gt;setIcon(&quot;images/iconCalendar.gif&quot;);<br>	  $myCalendar-&gt;setDate(date('d', strtotime($date1))
            , date('m', strtotime($date1))
Пример #25
0
        $y1 = $cdate->getDate('Y', $time_allow1);
        if ($y == $y1 && (int) $m < (int) $m1) {
            $m = $m1;
        }
    }
    if ($ta2_set) {
        $m2 = $cdate->getDate('m', $time_allow2);
        $y2 = $cdate->getDate('Y', $time_allow2);
        if ($y == $y2 && (int) $m > (int) $m2) {
            $m = $m2;
        }
    }
}
$objname = getParameter("objname");
$dp = getParameter("dp", "boolean");
$cobj = new tc_calendar("");
$cobj->setDate($sld, $slm, $sly);
$cobj->startDate($startDate);
$cobj->dsb_days = explode(",", $dsb_txt);
$cobj->time_allow1 = $time_allow1;
$cobj->time_allow2 = $time_allow2;
$cobj->setYearInterval($year_start, $year_end);
$cobj->setTimezone($timezone);
//set for further usage, nothing for now
$theme_path = $theme != "" ? $cobj->getThemePath($theme) : "";
if (!is_file($theme_path)) {
    $theme_path = "";
}
//check and show default calendar month and year on valid range of date_allow
if (!isset($_REQUEST["m"])) {
    if ($time_allow1 != "") {
Пример #26
0
><?php 
    echo A_CONFCONTENT_177;
    ?>
</option>
        </select>
    </td>
</tr>
<tr>
    <td><b><?php 
    echo A_CONFCONTENT_178;
    ?>
</b>
    </td>
    <td class=success>
		<?php 
    $myCalendar = new tc_calendar("date1", true, false);
    $myCalendar->zindex = 150;
    //default 1
    $myCalendar->setIcon("./plugins/calendar/images/iconCalendar.gif");
    $myCalendar->setPath("./plugins/calendar/");
    if ($INSTALL_DATE && $INSTALL_DATE != "") {
        $installdate = strtotime($INSTALL_DATE);
        $myCalendar->setDate(date('d', $installdate), date('m', $installdate), date('Y', $installdate));
    } else {
        $CorrectedTime = mktime(date("G") + C_TMZ_OFFSET * 60 * 60, date("i"), date("s"), date("m"), date("d"), date("Y"));
        $myCalendar->setDate(date('d', $CorrectedTime), date('m', $CorrectedTime), date('Y', $CorrectedTime));
    }
    $myCalendar->setYearInterval(2000, date('Y'));
    $myCalendar->dateAllow('2000-01-01', date('Y-m-d'));
    $myCalendar->setAlignment('left', 'bottom');
    //optional
Пример #27
0
// Load the calendar class
require 'calendar/tc_calendar.php';
?>
</head>

<body>
[...]
<br />
Your page content to the point you want to insert the calendar form
<form name="calendar" method="post" action="">
<table>
	<tr>
		<td>
		<?php 
// Call the calendar constructor - use the desired form and format, according to the instructions/samples provided on triconsole.com
$myCalendar = new tc_calendar("date1", true);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->zindex = 150;
//default 1
$myCalendar->setYearInterval(1995, date('Y'));
$myCalendar->dateAllow('1960-03-01', date('Y-m-d'));
//$myCalendar->autoSubmit(true, "calendar");
//$myCalendar->setDateFormat('l, dS \of F Y');
$myCalendar->disabledDay("sat");
$myCalendar->disabledDay("sun");
$myCalendar->setSpecificDate(array("2011-04-14", "2010-12-25"), 0, 'month');
$myCalendar->setSpecificDate(array("2011-04-01"), 0, 'year');
$myCalendar->setAlignment('right', 'bottom');
//optional
Пример #28
0
      <li class='active'><a href='list.php'>Ride Search</a></li>
   <li><a href='confirm-ride.php'>Book Ride</a></li>
   <li><a href='cancel-ride.php'>Cancel Ride</a></li>
</ul>
</div>
<div class="content">
welcome : <?php 
print $userRow['username'];
?>

<div class="form-container">
<form id="form_search" method="post">
<h2>Search by date.</h2><hr />
<?php 
require 'calendar/tc_calendar.php';
$myCalendar = new tc_calendar("date5", true, false);
$myCalendar->setIcon("calendar/images/iconCalendar.gif");
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval(2015, 2017);
$myCalendar->dateAllow('2015-11-11', '2016-01-01');
$myCalendar->writeScript();
?>
	  <div class="clearfix"></div><hr />
<div class="form-group">
            	<button type="submit" class="btn btn-block btn-primary" name="btn_search">
                	<i class="glyphicon glyphicon-open-file"></i>&nbsp;Search
                </button>
            </div>
			</form>
</div>
Пример #29
0
				 <tr>
                 <td>Epiweek</td>
                    <td>	
                        <?php 
echo "<select>";
for ($x = 1; $x < 54; $x++) {
    echo "<option>" . $x . "</option>";
}
echo "</select>";
?>
                        	             
                    </td>
				 	<td>Week Ending</td>
					<td>
					<?php 
$myCalendar = new tc_calendar("endmonth", true);
$myCalendar->setDate(date('d'), date('m'), date('Y'));
$myCalendar->setPath("calendar/");
$myCalendar->setYearInterval($yearsago, $currentyear);
//$myCalendar->dateAllow('1960-01-01', '2015-03-01');
$myCalendar->writeScript();
?>
	
					</td>
				 </tr>
				 
				 <tr>
				
				  <td><span class="mandatory">* </span>Health Facility </td>
				  <td colspan="6"><strong>
					 <select  style="width:262px"  id='cat' name="cat">
Пример #30
0
 private function RenderPanel($Prefix, $DefaultTime)
 {
     require_once 'calendar/calendar/classes/tc_calendar.php';
     $html = "";
     $html .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\"><tr><td nowrap>";
     $html .= "<SPAN CLASS='fieldtext'>" . $Prefix . " Date:</SPAN>";
     $html .= "</td><td>";
     //@todo: give an appropriate html name to this.
     $myCalendar = new \tc_calendar($Prefix . "datepicker", true, false);
     //date5->HTML name.
     $myCalendar->setIcon("calendar/calendar/images/iconCalendar.gif");
     $myCalendar->setDate(date('d', $DefaultTime), date('m', $DefaultTime), date('Y', $DefaultTime));
     //$myCalendar->setDate(date('d'), date('m'), date('Y'));
     $myCalendar->setPath("calendar/calendar/");
     $myCalendar->setYearInterval(2000, 2050);
     $myCalendar->dateAllow('2008-05-13', '2015-03-01');
     $myCalendar->setDateFormat('j F Y');
     $myCalendar->setAlignment('left', 'bottom');
     $myCalendar->zindex = 10;
     // This should, hypothetically, redirect the output from echo to a string.
     // It's either this, or rewrite the control.
     ob_start();
     $myCalendar->writeScript();
     $calendarhtml = ob_get_contents();
     ob_end_clean();
     $html .= "<SPAN CLASS='fieldtext'>";
     $html .= $calendarhtml;
     $html .= "</SPAN>";
     $html .= "</td><td>";
     //$html .= $myCalendar->writeScript();
     $html .= "<SELECT NAME=\"" . $Prefix . "hour\">";
     // $_POST["starthour"], $_POST["endhour"]
     for ($hour = 1; $hour <= 12; $hour++) {
         $html .= "<OPTION value=\"" . str_pad($hour, 2, "0", STR_PAD_LEFT) . "\"";
         if ($hour == date("g", $DefaultTime)) {
             $html .= " selected=\"selected\"";
         }
         $html .= ">" . $hour . "</OPTION>";
     }
     $html .= "</SELECT>";
     $html .= "<SELECT NAME=\"" . $Prefix . "minute\">";
     // $_POST["startminute"], $_POST["endminute"]
     for ($minute = 0; $minute < 60; $minute++) {
         $html .= "<OPTION VALUE=\"" . str_pad($minute, 2, "0", STR_PAD_LEFT) . "\"";
         if ($minute == date("i", $DefaultTime)) {
             $html .= " selected=\"selected\"";
         }
         $html .= ">" . str_pad($minute, 2, "0", STR_PAD_LEFT) . "</OPTION>";
     }
     $html .= "</SELECT>";
     $html .= "<SELECT NAME=\"" . $Prefix . "period\">";
     // $_POST["startperiod"], $_POST["startperiod"]
     $html .= "<OPTION VALUE=\"AM\"";
     if ("AM" == date("A", $DefaultTime)) {
         $html .= " selected=\"selected\"";
     }
     $html .= ">AM</OPTION>";
     $html .= "<OPTION VALUE=\"PM\"";
     if ("PM" == date("A", $DefaultTime)) {
         $html .= " selected=\"selected\"";
     }
     $html .= ">PM</OPTION>";
     $html .= "</SELECT>";
     $html .= "</tr></table>";
     $html .= "<BR>";
     return $html;
 }