예제 #1
0
function populateDatabase($sqlfile, $db)
{
    if (!($buffer = file_get_contents($sqlfile))) {
        return -1;
    }
    $queries = splitSql($buffer);
    $q = new mysql();
    foreach ($queries as $query) {
        $query = trim($query);
        if ($query != '' && $query[0] != '#') {
            $query = str_replace("#__", "jos_", $query);
            $q->QUERY_SQL($query, $db);
            $count = $count + 1;
            write_events("Execute query {$count}");
            if (!$q->ok) {
                write_events($q->mysql_error);
            }
        }
    }
}
예제 #2
0
						<?php 
write_right($date);
?>
					</td>
				</tr>
				<tr>
					<td align=center colspan=3>
						<?php 
write_bottom($date);
?>
					</td>
				</tr>
			</table>
			<p>
			<?php 
write_ar_table($date);
?>
			<p>
			<?php 
write_events($date);
?>
			<p>
			<hr size=2>
			<p>
		</center>
	<?php 
write_footer($time_updated);
?>
	</body>
</html>
예제 #3
0
파일: log.php 프로젝트: gomininggo/jTracker
<div id="addnewevent" style="display:<?php 
echo $vis1;
?>
;" align="center">
	<form method="post" action="dbhandle.php" id="event_data">
    <h4 style="margin:5px 5px 5px 5px;">Add/Edit Contact Event</h4>
    <table style="text-align: left;" border="0" cellpadding="2" cellspacing="2">
    <tbody>
        <tr>
            <td>Date:</td>
            <td><input name="input" id="datepicker" type="text"></td>
        </tr>
        <tr>
            <td>Action:</td>
            <td><?php 
write_events($actID);
?>
</td>
        </tr>
        <tr>
            <td>Notes:</td>
            <td><textarea cols="30" rows="5" name="notes" id="notes"></textarea></td>
        </tr>
        <tr>
            <td>
                <input name='act' value='add_evnt' type='hidden'>
        <?php 
echo "<input name='contIndex' value='" . $_GET['ja'] . "' type='hidden'>";
?>
		<input name="profIndex" value="" type="hidden">
            </td>