Ejemplo n.º 1
0
     break;
 case 'cancel_event':
     cancelNote();
     break;
 case 'apply_event':
 case 'save_event':
     saveNote();
     break;
 case 'edit_event':
     editNote();
     break;
 case 'event':
     showNote(JRequest::getVar('calendar', 0, '', 'int'));
     break;
 case 'event_save_show':
     showNote(save_before_show());
     break;
 case 'module_event':
     module_event();
     break;
     // This will work when you set task to 'remove
 // This will work when you set task to 'remove
 case 'remove_event':
     removeNote();
     break;
 case 'publish_event':
     changeNote(1);
     break;
 case 'unpublish_event':
     changeNote(0);
     break;
Ejemplo n.º 2
0
// call the function
/*
 * PHP Function Arguments
 *
 * Information can be passed to functions through arguments. An argument is just like a variable.
 * Arguments are specified after the function name, inside the parentheses.
 * You can add as many arguments as you want, just seperate them with a comma.
 *
 * */
function showNote($note)
{
    echo $note;
}
showNote("<h2>Note: A function name can start with a letter or underscore (not a number)</h2>");
showNote("<h3>Tip: Give the function a name that reflects what the function does.</h3>");
showNote("<h3>Info: Function names are NOT case-sensitive.</h3>");
function famousPainters($fname, $dateOfBirth)
{
    echo "{$fname} ({$dateOfBirth})<br>";
}
// source http://www.biographyonline.net/artists/top-10-painters.html
famousPainters("Leonardo Da Vinci", "1452 – 1519");
famousPainters("Vincent Van Gogh", "1853 – 1890");
famousPainters("Rembrandt", "1606 – 1669");
famousPainters("Michelangelo", "1475 – 1564");
famousPainters("Claude Monet", "1840 – 1926");
famousPainters("Pablo Picasso", "1881 – 1973");
famousPainters("Raphael", "1483 – 1520");
famousPainters("August Renoir ", "1841–1919");
famousPainters("Jan Vermeer", "1632 – 1675");
famousPainters("Paul Cezanne", "1839-1906");
Ejemplo n.º 3
0
$dest_dir = 'uploads';
$sql = "SELECT * FROM file";
$result = $db->query($sql);
if ($result) {
    $row = $result->fetch_assoc();
    $path = $dest_dir . '/' . $row['filename'];
    $fp = fopen($path, 'rb');
    if (!$fp) {
        echo "open file error";
        exit;
    }
    clearNote();
    extractSave($fp);
    echo "<span class='label label-success'><a href='topdf.php'>导出为PDF</a></span>";
    //  从数据库中读取数据并显示
    showNote();
} else {
    echo "select query error.";
}
?>

	</div><!-- container-->

	<div class="footer">
      <div class="container">
        <p class="text-center">Copyright © 2015 Zchan</p>
      </div>
    </div>

    <!-- Bootstrap core JavaScript
    ================================================== -->