Esempio n. 1
0
		<td class="bg-clearBlue text-right span2"><label>Answer</label></td>
		<td class=""><?php 
echo HTMLLib::CreateTextArea('answer', $answer, 'span12');
?>
</td>
	</tr>
	<tr>
		<td class="bg-clearBlue text-right span2"><label>Reference</label></td>
		<td class=""><?php 
echo HTMLLib::CreateInputText('reference', $reference);
?>
</td>
	</tr>
	<tr>
		<td class="bg-clearBlue text-right span2"><label>Illustration</label></td>
		<td class=""><?php 
//echo HTMLLib::CreateInputText('illustration', $illustration)
?>
</td>
	</tr>
	<tr>
		<td class="bg-clearBlue text-right span2"><label></label></td>
		<td class=""><?php 
echo HTMLLib::CreateSubmitButton('save', 'Save Question');
?>
</td>
	</tr>
	<tr>
		<td></td>
	</tr>	
</table>
Esempio n. 2
0
				</tr>
				</table>
				<?php 
} else {
    ?>
							
            	<table class="table bordered condensed ">
				<tr class="bg-clearOrange">
					<td class=" text-right span1" colspan="2">
						<H4>STUDY NOTES</H4>
					</td>
				</tr>
				<tr>
					<td class="">
						<?php 
    echo HTMLLib::CreateTextArea('reference', HTMLLib::wysiwygTextArea($reference), 'span6', '', 'rows="15"');
    ?>
					</td>
					
				<tr>
				<tr>
					<td class="">
						<a href="http://wiki.en.it-processmaps.com/index.php/ITIL_Glossary#ITIL%20Glossary%20A-Z"
							target="_BLANK">Glossary of Terms</a>
						<div id="referenceStatus"></div>
					</td>
				<tr>
					<td>
						<button id="saveReference" class="command-button primary span3">
						    <i class="icon-database on-right"></i>
						    Save This Reference
Esempio n. 3
0
        } else {
            $filename = $img['tmp_name'];
            $client_id = "541eeff0627f891";
            $handle = fopen($filename, "r");
            $data = fread($handle, filesize($filename));
            $pvars = array('image' => base64_encode($data));
            $timeout = 30;
            $curl = curl_init();
            curl_setopt($curl, CURLOPT_URL, 'https://api.imgur.com/3/image.json');
            curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
            curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Client-ID ' . $client_id));
            curl_setopt($curl, CURLOPT_POST, 1);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($curl, CURLOPT_POSTFIELDS, $pvars);
            $out = curl_exec($curl);
            curl_close($curl);
            $pms = json_decode($out, true);
            $url = $pms['data']['link'];
            if ($url != "") {
                echo "<h2>Uploaded Without Any Problem</h2>";
                echo "<img src='{$url}'/>";
            } else {
                echo "<h2>There's a Problem</h2>";
                HTMLLib::vardump($pms['data']['error']);
            }
        }
    }
}
?>