3 #################################################################################
7 #################################################################################
9 require("../../../../config.php");
11 $id = optional_param('id', SITEID
, PARAM_INT
);
13 require_course_login($id);
14 @header
('Content-Type: text/html; charset=utf-8');
16 $pixpath = "$CFG->pixpath/s";
18 $fullnames = get_list_of_pixnames();
20 $emoticons = array ( 'smiley' => ':-)',
24 'thoughtful' => 'V-.',
42 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
43 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
46 <meta http
-equiv
="content-type" content
="text/html; charset=utf-8" />
47 <title
><?php
print_string('insertsmile', 'editor'); ?
></title
>
48 <link rel
="stylesheet" href
="dialog.css" type
="text/css" />
49 <script type
="text/javascript" src
="popup.js"></script
>
50 <script type
="text/javascript">
55 function attr(name
, value
) {
56 if (!value || value
== "") return "";
57 return ' ' + name +
'="' + value +
'"';
59 function insert(img
,text
) {
63 var imgString
= "<img src=\"" + strImage +
"\" alt=\"" + strAlt +
"\" title=\"" + strAlt +
"\" />";
65 // pass data back to the calling window
66 __dlg_close(imgString
);
77 <body onload
="Init()">
78 <table
class="dlg" cellpadding
="0" cellspacing
="2" width
="100%">
79 <tr
><td
><table width
="100%"><tr
><td
class="title" nowrap
="nowrap"><?php
print_string('chooseicon', 'editor'); ?
></td
></tr
></table
></td
></tr
>
82 <table border
="0" align
="center" cellpadding
="5">
87 $list = array('smiley', 'biggrin', 'wink', 'mixed', 'thoughtful',
88 'tongueout', 'cool', 'approve', 'wideeyes', 'surprise');
89 foreach ($list as $image) {
90 $name = $fullnames[$image];
91 $icon = $emoticons[$image];
93 echo "<td><img alt=\"$name\" class=\"icon\" src=\"$pixpath/$image.gif\" ".
94 " onclick=\"insert('$pixpath/$image.gif','$name')\" /></td>";
95 echo "<td>$name</td>";
96 echo "<td class=\"smile\">$icon</td>";
103 <table border
="0" align
="center">
106 $list = array('sad', 'shy', 'blush', 'kiss', 'clown', 'blackeye',
107 'angry', 'dead', 'sleepy', 'evil');
108 foreach ($list as $image) {
109 $name = $fullnames[$image];
110 $icon = $emoticons[$image];
112 echo "<td><img alt=\"$name\" class=\"icon\" src=\"$pixpath/$image.gif\" ".
113 " onclick=\"insert('$pixpath/$image.gif','$name')\" /></td>";
114 echo "<td>$name</td>";
115 echo "<td class=\"smile\">$icon</td>";
126 <tr
><td
><table width
="100%"><tr
><td valign
="middle" width
="90%"><hr width
="100%" /></td
></tr
></table
></td
></tr
>
127 <tr
><td align
="right">
128 <button type
="button" onclick
="return cancel();"><?php
print_string('close', 'editor'); ?
></button
></td
></tr
>