Esempio n. 1
0
function photo_POST($id)
{
    $teacher = new Teacher($id);
    $src = make_image('photo');
    $teacher->update('photo', $src);
    redirect("teacher/{$id}");
}
Esempio n. 2
0
            $head = array("<a href=\"#\" onclick=\"toggleSelectAll(this)\">&#x2713;</a>", "Name", "Handle", "Account Purpose", "Status", "&nbsp;");
            $table->addRow($head, null, 'th');
            foreach ($requests as $handle => $data) {
                list($name, $note, $userinfo) = $data;
                // Grab userinfo/request purpose
                if (@unserialize($userinfo)) {
                    $userinfo = @unserialize($userinfo);
                    $account_purpose = $userinfo[0];
                } else {
                    $account_purpose = $userinfo;
                }
                $rejected = preg_match("/^Account rejected:/", $note);
                if ($rejected) {
                    continue;
                }
                $table->addRow(array('<input type="checkbox" value="' . $handle . '" name="uid[]" onclick="return highlightAccountRow(this)"/>', sprintf('<span style="cursor: hand" onclick="return highlightAccountRow(this)">%s</span>', $name), sprintf('<span style="cursor: hand" onclick="return highlightAccountRow(this)">%s</span>', $handle), sprintf('<span style="cursor: hand" onclick="return highlightAccountRow(this)">%s</span>', $account_purpose), sprintf('<span style="cursor: hand" onclick="return highlightAccountRow(this)">%s</span>', $rejected ? "rejected" : "<font color=\"#c00000\"><strong>Outstanding</strong></font>"), sprintf('<span style="cursor: hand" onclick="return highlightAccountRow(this)">%s</span>', "<a onclick=\"event.cancelBubble = true\" href=\"{$self}?acreq={$handle}\">" . make_image("edit.gif") . "</a>")));
            }
        } else {
            print "No account requests.";
        }
        $table->setAllAttributes('style="vertical-align: top;"');
        echo $table->toHTML();
        ?>
		<br />
		<table align="center">
		<tr>
			<td>
				<select name="reason">
					<option value="">Select rejection reason...</option>
					<option value="Account not needed">Account not needed</option>
				</select>
Esempio n. 3
0
<?php

!defined('IN_PTF') && exit('ILLEGAL EXECUTION');
/**
 * @author  ryan <*****@*****.**>
 */
$materials = $config['product_material_map'];
$material = _post('material');
$stone = _post('stone');
$size = _post('size');
$carve_text = _post('carve_text');
$remark = _post('remark');
$images = _post('image_input');
if (empty($images)) {
    $images = array();
}
$images = $images ? $images : array();
if ($by_post) {
    if ($_FILES['image']['name']) {
        $image = make_image($_FILES['image']);
        $images[] = $image;
    } elseif ($action === 'del_img') {
        $images = array_values($images);
    } else {
        $info = compact('material', 'stone', 'size', 'carve_text', 'remark', 'images');
        $customer->customizeOrder($info);
        redirect('order/all');
    }
}
$page['scripts'][] = 'jquery.validate.min';
$view = "{$view}?master";
Esempio n. 4
0
                 echo "Successfully <b>added</b> karma &quot;" . htmlspecialchars($_POST['level']) . "&quot;<br /><br />";
                 note::add($handle, 'added ' . $_POST['level'] . ' karma', $auth_user->handle);
             }
             break;
     }
 }
 $user_karma = $karma->get($handle);
 if (count($user_karma) == 0) {
     echo 'No karma yet';
 } else {
     $table = new HTML_Table('style="width: 90%"');
     $table->setCaption('Karma levels for ' . htmlspecialchars($handle), 'style="background-color: #CCCCCC;"');
     $table->addRow(array("Level", "Added by", "Added at", "Remove"), null, 'th');
     foreach ($user_karma as $item) {
         $remove = sprintf("karma.php?action=remove&amp;handle=%s&amp;level=%s", htmlspecialchars($handle), htmlspecialchars($item['level']));
         $table->addRow(array(htmlspecialchars($item['level']), htmlspecialchars($item['granted_by']), htmlspecialchars($item['granted_at']), make_link($remove, make_image("delete.gif"), false, 'onclick="javascript:return confirm(\'Do you really want to remove the karma level ' . htmlspecialchars($item['level']) . '?\');"')));
     }
     echo $table->toHTML();
 }
 echo "<br /><br />";
 $table = new HTML_Table('style="width: 100%"');
 $table->setCaption("Grant karma to " . htmlspecialchars($handle), 'style="background-color: #CCCCCC;"');
 $form = new HTML_QuickForm2('karma_grant', 'post', array('action' => 'karma.php?action=grant'));
 $form->removeAttribute('name');
 $form->addElement('text', 'level')->setLabel('Level:&nbsp;');
 $form->addElement('hidden', 'handle')->setValue(htmlspecialchars($handle));
 $form->addElement('submit', 'submit')->setLabel('Submit Changes');
 $csrf_token_value = create_csrf_token($csrf_token_name);
 $form->addElement('hidden', $csrf_token_name)->setValue($csrf_token_value);
 $table->addRow(array((string) $form));
 echo $table->toHTML();
Esempio n. 5
0
$form->addElement('submit', 'submit')->setLabel('Save Changes');
$csrf_token_value = create_csrf_token($csrf_token_name);
$form->addElement('hidden', $csrf_token_name)->setValue($csrf_token_value);
print $form->render($renderer);
?>

<table class="form-holder" cellspacing="1">
<caption class="form-caption">Manage Releases</caption>

<tr>
 <th class="form-label_top">Version</th>
 <th class="form-label_top">Release Date</th>
 <th class="form-label_top">Actions</th>
</tr>

<?php 
foreach ($row['releases'] as $version => $release) {
    echo "<tr>\n";
    echo '  <td class="form-input">' . htmlspecialchars($version) . "</td>\n";
    echo '  <td class="form-input">';
    echo format_date(strtotime($release['releasedate']));
    echo "</td>\n";
    echo '  <td class="form-input">' . "\n";
    $url = 'package-edit.php?id=' . $_GET['id'] . '&amp;release=' . htmlspecialchars($release['id']) . '&amp;action=release_remove';
    $msg = 'Are you sure that you want to delete the release?';
    echo "<a href=\"javascript:confirmed_goto('{$url}', '{$msg}')\">" . make_image('delete.gif') . "</a>\n";
    echo "</td>\n";
    echo "</tr>\n";
}
echo "</table>\n";
response_footer();
}
$nfiles = 0;
$dir = null;
$ellipse_frac = 0.5;
for ($i = 1; $i < $argc; $i++) {
    if ($argv[$i] == '--nfiles') {
        $nfiles = $argv[++$i];
    } elseif ($argv[$i] == '--dir') {
        $dir = $argv[++$i];
    } elseif ($argv[$i] == '--ellipse_frac') {
        $ellipse_frac = $argv[++$i];
    } else {
        usage();
    }
}
if (!$nfiles || !$dir) {
    usage();
}
$dir = "../user/{$dir}";
if (!is_dir($dir)) {
    exit("{$dir} is not a directory\n");
}
for ($i = 0; $i < $nfiles; $i++) {
    $path = "{$dir}/{$i}.png";
    $anspath = "{$dir}/{$i}.ans";
    $case = make_test_case($ellipse_frac);
    $f = fopen($anspath, 'w');
    fwrite($f, serialize($case));
    fclose($f);
    imagepng(make_image($case), $path);
}
Esempio n. 7
0
function commonFooter($padding = true)
{
    global $RIGHT_SIDEBAR_DATA;
    if ($padding) {
        print "<br />";
    }
    ?>
      </td>
     </tr>
    </table>
   </td>
   <?php 
    if (isset($RIGHT_SIDEBAR_DATA)) {
        ?>
   <td bgcolor="#CCCCCC" style="background-image: url(/gifs/checkerboard.gif)"><?php 
        spacer(1, 1);
        ?>
<br /></td>
   <td width="170" bgcolor="#F0F0F0">
    <table width="100%" cellpadding="4" cellspacing="0">
     <tr valign="top">
      <td class="sidebar">
       <?php 
        echo $RIGHT_SIDEBAR_DATA;
        ?>
      </td>
     </tr>
    </table>
   </td>
   <?php 
    }
    ?>
  </tr>
 </table>

 <table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr bgcolor="#000033"><td><?php 
    spacer(1, 1);
    ?>
<br /></td></tr>
  <tr bgcolor="#006699">
   <td align="right" valign="bottom">
    <?php 
    //print_link('/source.php?url='.$_SERVER['SCRIPT_NAME'], 'show source', false, 'class="menuWhite"');
    //echo delim();
    print_link('/credits.php', 'credits', false, 'class="menuWhite"');
    ?>
&nbsp;<br />
   </td>
  </tr>
  <tr bgcolor="#000033"><td><?php 
    spacer(1, 1);
    ?>
<br /></td></tr>
 </table>

 <table border="0" cellspacing="0" cellpadding="6" width="100%">
  <tr valign="top" bgcolor="#CCCCCC">
   <td>
    <small>
     <?php 
    print_link('http://www.php.net/', make_image('php-logo.gif', 'PHP', 'left'));
    ?>
     &nbsp;<?php 
    print_link('/copyright.php', 'Copyright &copy; 2001-' . date('Y') . ' The PHP Group');
    ?>
<br />
     &nbsp;All rights reserved.<br />
    </small>
   </td>
   <td align="right">
    <small>
     Last updated: <?php 
    echo strftime("%c %Z", getlastmod());
    ?>
<br />
    </small>
    <br />
   </td>
  </tr>
 </table>
</body>
</html>
<?php 
}
Esempio n. 8
0
<h3>Syndication</h3>
<p>
 You can grab our news as an <a href="/feed.atom">Atom feed</a>.
</p>';
$MIRROR_IMAGE = '';
// Try to find a sponsor image in case this is an official mirror
if (is_official_mirror()) {
    // Iterate through possible mirror provider logo types in priority order
    $types = array("gif", "jpg", "png");
    while (list(, $ext) = each($types)) {
        // Check if file exists for this type
        if (file_exists("backend/mirror." . $ext)) {
            // Add text to rigth sidebar
            $MIRROR_IMAGE = "<div align=\"center\"><h3>This mirror sponsored by:</h3>\n";
            // Create image HTML code
            $img = make_image('mirror.' . $ext, htmlspecialchars(mirror_provider()), FALSE, FALSE, 'backend', 0);
            // Add size information depending on mirror type
            if (is_primary_site() || is_backup_primary()) {
                $img = resize_image($img, 125, 125);
            } else {
                $img = resize_image($img, 120, 60);
            }
            // End mirror specific part
            $MIRROR_IMAGE .= '<a href="' . mirror_provider_url() . '">' . $img . "</a></div><br /><hr />\n";
            // We have found an image
            break;
        }
    }
}
/* {{{ Generate latest release info */
/* NOTE: You are editing the wrong file, you should be in include/version.inc
/**
 * Function upload_img_external
 * PURPOSE: upload & resize images from external URL
 *
 * $external_url = Image URL
 * $save_as = save image as File Name
 * $img_width = width to resize to
 * $up_loc = upload location for the image. Like '../img/clients'
 * $img_title = Image Title (mainly used for errors)
 * $insert_name_part = Insert Part in File Name (use to create different size images like thunbnail)
 * $fix_height = fix height as well
*/
function upload_img_external($external_url, $save_as, $img_width, $up_loc, $img_title, $insert_name_part = '', $fix_height = '', $error_sess_name = 'CUSA_MSG_GLOBAL')
{
    global $_SESSION;
    $file_pth = $up_loc . $save_as . '.jpg';
    $file = @file_get_contents($external_url);
    $saved = @file_put_contents($file_pth, $file);
    //var_dump($saved, strlen($file)); die('x');
    $new_c_image = '';
    if ($saved == strlen($file)) {
        $t1 = $save_as;
        $tmx = time();
        $tmx = substr($tmx, 0, strlen($tmx) - 2);
        $new_c_image = strtolower($t1) . '_' . $tmx;
        list($g_width, $g_height) = @getimagesize($file_pth);
        if ($g_width > $img_width || $g_width < $img_width - 1) {
            $g_width = $img_width;
        }
        $pres_ratio = true;
        if (!empty($fix_height)) {
            $g_height = $fix_height;
            $pres_ratio = false;
        }
        $ret = false;
        $ret = make_image($file_pth, $up_loc, $g_width, $g_height, '', 'image/jpg', $new_c_image . $insert_name_part, $pres_ratio);
        if ($ret === false) {
            $new_c_image = '';
            $_SESSION[$error_sess_name] = array(false, "ERROR saving {$img_title}!");
        } else {
            $new_c_image .= '.jpg';
        }
    }
    return $new_c_image;
}
Esempio n. 10
0
                 $tmpid['ENTRY_UPDATE'] = "<a href=\"" . $sess->url('main.php?area=mod&action=lupdate&idmod=' . $mod['idmod'] . '&sourceid=' . $mod['source_id'] . '&idclient=' . $idclient) . "\"><img src=\"tpl/" . $cfg_cms['skin'] . "/img/but_modul_outofsync.gif\" width=\"16\" height=\"16\" alt=\"" . $cms_lang['mod_local_update'] . "\" title=\"" . $cms_lang['mod_local_update'] . "\" /></a>";
             } elseif ($cfg_rep['repository_show_up2date']) {
                 $tmpid['ENTRY_UPDATE'] = "<a name='norepository'><img src=\"tpl/" . $cfg_cms['skin'] . "/img/but_modul_insync.gif\" width=\"16\" height=\"16\" alt=\"" . $cms_lang['mod_repository_noupdate'] . "\" title=\"" . $cms_lang['mod_repository_noupdate'] . "\" /></a>";
             } else {
                 $tmpid['ENTRY_UPDATE'] = "\n<img src=\"tpl/" . $cfg_cms['skin'] . "/img/space.gif\" width=\"16\" height=\"16\" />";
             }
         }
         //DebugMe! echo "<br>$idmod:".$mod['deletable'].'|'.$perm->have_perm(5, 'mod', $mod['idmod']).'|'.$mod['count_delete'];
         // Modul löschen
         if ($mod['deletable'] == '1' && $perm->have_perm(5, 'mod', $mod['idmod']) && $mod['count_delete'] < 1) {
             $tmpid['ENTRY_DELBUT'] = "<a href=\"" . $sess->url('main.php?area=mod&action=delete&idmod=' . $mod['idmod'] . '&idclient=' . $idclient) . "\" onclick=\"return delete_confirm()\"><img src=\"tpl/" . $cfg_cms['skin'] . "/img/but_deleteside.gif\" width=\"16\" height=\"16\" alt=\"" . $cms_lang['mod_delete'] . "\" title=\"" . $cms_lang['mod_delete'] . "\" /></a>";
         } else {
             $tmpid['ENTRY_DELBUT'] = "\n<img src=\"tpl/" . $cfg_cms['skin'] . "/img/space.gif\" width=\"16\" height=\"16\" />";
         }
         $tmpid['ENTRY_NAME'] = $idclient >= 1 && $mod['verbose'] != '' ? htmlentities($mod['verbose'], ENT_COMPAT, 'UTF-8') : htmlentities($mod['name'], ENT_COMPAT, 'UTF-8');
         $tmpid['ENTRY_ICON'] = make_image('but_modul.gif', '', '16', '16', false, 'class="icon"');
         $tmpid['ENTRY_ANAME'] = "<a name=\"" . (htmlentities('mod' . $mod['idmod'], ENT_COMPAT, 'UTF-8') . "\"></a>");
         $tmpid['ENTRY_DESCRIPTION'] = htmlentities($mod['description'], ENT_COMPAT, 'UTF-8');
         $tmpid['ENTRY_VERSION'] = htmlentities($mod['version'], ENT_COMPAT, 'UTF-8');
         $tmpid['ENTRY_CAT'] = htmlentities($mod['cat'], ENT_COMPAT, 'UTF-8');
         $tpl->setVariable($tmpid);
         unset($tmpid);
         $tpl->parseCurrentBlock();
     }
 } else {
     $tmp['MOD_NOMODULES'] = !$rep->error() ? $cms_lang['mod_nomodules'] : $cms_lang['err_' . $rep->error(1)];
     $tpl->setCurrentBlock('NOENTRY');
     $tpl->setVariable($tmp);
     unset($tmp);
     $tpl->parseCurrentBlock();
 }
Esempio n. 11
0
function set_filedata($db, $imorexport, $idclient)
{
    global $tmp, $tpl, $action, $idjsfile, $cms_lang, $cfg_cms, $perm, $sess;
    // variablen belegen
    $idjs = $db->f("idjs");
    // get perms for testing
    if (!empty($idclient)) {
        $test_type = 'js_file';
        $test_id = $idjs;
        if (!$perm->have_perm(2, "js_file", $idjs)) {
            return 0;
        }
    } else {
        $test_type = 'area_js';
        $test_id = '0';
    }
    // Hintergrundfarbe wählen
    $tmp['ENTRY_BGCOLOR'] = '#FFFFFF';
    $tmp['ENTRY_BGCOLOROVER'] = '#fff7ce';
    // filename und description
    $tmp['ENTRY_ICON'] = make_image('ressource_browser/icons/rb_typ_js.gif', '', '16', '16', false, 'class="icon"');
    $tmp['ENTRY_NAME'] = htmlentities($db->f('filename'), ENT_COMPAT, 'UTF-8');
    // handle delete css-file
    if ($action == 30 && $idjs == $idjsfile && $perm->have_perm(5, $test_type, $test_id)) {
        $tmp['ENTRY_NAME'] = $tmp['ENTRY_NAME'] . '&nbsp;&nbsp;' . make_image_link3("main.php?area=js&action=deletefile&idjsfile=" . $idjs . "&idupl=" . $db->f('idupl') . "&idclient={$idclient}", 'but_confirm.gif', 'but_cancel_delete.gif', $cms_lang['js_file_delete_confirm'], $cms_lang['js_file_delete_cancel'], 'action', 'deletethis');
    }
    $tmp['ENTRY_DESCRIPTION'] = htmlentities($db->f('description'), ENT_COMPAT, 'UTF-8');
    // buttons vorbesetzen
    $tmp['ENTRY_DOWNLOAD'] = make_image_link2($url = '#', $image = 'space.gif', '', '16', '16', '', '', '', 'action', '', '', '', 'action');
    $tmp['ENTRY_DUPLICATE'] = make_image_link2($url = '#', $image = 'space.gif', '', '16', '16', '', '', '', 'action', '', '', '', 'action');
    $tmp['ENTRY_EDIT'] = make_image_link2($url = '#', $image = 'space.gif', '', '16', '16', '', '', '', 'action', '', '', '', 'action');
    $tmp['ENTRY_DELBUT'] = make_image_link2($url = '#', $image = 'space.gif', '', '16', '16', '', '', '', 'action', '', '', '', 'action');
    $tmp['ENTRY_IMEXPORT'] = make_image_link2($url = '#', $image = 'space.gif', '', '16', '16', '', '', '', 'action', '', '', '', 'action');
    // button: download js-file - wenn nicht im import
    if (!empty($idclient) && $perm->have_perm(8, $test_type, $test_id)) {
        $tmp['ENTRY_DOWNLOAD'] = make_image_link2("main.php?area=js&action=downloadfile&idjsfile=" . $db->f('idupl') . "&idclient={$idclient}", 'but_download.gif', $cms_lang['js_file_download'], '16', '16', '', '', '', 'action', '', '', '', 'action');
    }
    // buttons: edit, copy,
    if (!empty($idjs) && $perm->have_perm(3, $test_type, $test_id) || empty($idclient) && $perm->have_perm(3, $test_type, $test_id)) {
        // button: edit js-file
        $tmp['ENTRY_EDIT'] = make_image_link2("main.php?area=js_edit_file&idjsfile=" . $idjs . "&idclient={$idclient}", 'but_edit.gif', $cms_lang['js_file_edit'], '16', '16', '', '', '', 'action', '', '', '', 'action');
        // button: duplicate js-file -- benötigt auch Neu-Anlegen-Rechte
        if ($perm->have_perm(2, 'area_js')) {
            $tmp['ENTRY_DUPLICATE'] = make_image_link2("main.php?area=js_edit_file&action=10&idjsfile=" . $idjs . "&idclient={$idclient}", 'but_duplicate.gif', $cms_lang['js_file_duplicate'], '16', '16', '', '', '', 'action', '', '', '', 'action');
        }
    }
    // button: delete js-file
    if ($perm->have_perm(5, $test_type, $test_id)) {
        $tmp['ENTRY_DELBUT'] = make_image_link2("main.php?area=js&action=30&idjsfile=" . $idjs . "&idclient={$idclient}", 'but_deleteside.gif', $cms_lang['js_file_delete'], '16', '16', '', '', '', 'action', 'deletethis', '', '', 'action');
    }
    // button: export js-file
    $rights_okay = $imorexport == 'import' ? $perm->have_perm(13, $test_type, $test_id) : $perm->have_perm(14, $test_type, $test_id);
    if ($rights_okay && !empty($idjs)) {
        $upl = $imorexport == 'import' ? '&idupl=' . $db->f('idupl') : '';
        $tmp['ENTRY_IMEXPORT'] = make_image_link2("main.php?area=js&action=" . $imorexport . "&idjsfile=" . $idjs . $upl . "&idclient={$idclient}", $imorexport . '.gif', $cms_lang['js_' . $imorexport], '16', '16', '', '', '', 'action', '', '', '', 'action');
    }
    $tpl->setVariable($tmp);
    $tpl->parseCurrentBlock();
    unset($tmp);
    return 1;
}
Esempio n. 12
0
         $tpl_side_values['BUTTON_DELETE'] = make_image('space.gif', '', '16', '16');
     }
     // Seite: schützen
     if ($perm->have_perm(24, 'side', $tmp_side['idcatside'], $tmp_side['idcat'])) {
         if ($tmp_side['offline']) {
             $lock_val = 0;
             $lock_icon = 'but_lock.gif';
             $lock_text = $cms_lang['con_unlock_side'];
         } else {
             $lock_val = 1;
             $lock_icon = 'but_unlock.gif';
             $lock_text = $cms_lang['con_lock_side'];
         }
         $tpl_side_values['BUTTON_LOCK'] = make_image_link('main.php?action=side_lock&idcatside=' . $tmp_side['idcatside'] . '&idside=' . $tmp_side['idside'] . '&lock=' . $lock_val, $lock_icon, $lock_text, '16', '16', '', '', '#sideanchor');
     } else {
         $tpl_side_values['BUTTON_LOCK'] = make_image('space.gif', '', '16', '16');
     }
     // Seite: Vorschau
     $tpl_side_values['BUTTON_PREVIEW'] = make_image_link($tmp_side['link'], 'but_preview.gif', $cms_lang['con_preview'], '16', '16', '_blank');
     $tpl_side_values['SIDE_ACTIONS'] = '';
     unset($side_actions);
 }
 // Tabellenfarbwerte
 if ($con_tree[$a]['offline'] || $tmp_side['offline']) {
     $tpl_side_values['TABLE_COLOR'] = '#FFEEDF';
     $tpl_side_values['TABLE_OVERCOLOR'] = '#FFF5CE';
 } else {
     $tpl_side_values['TABLE_COLOR'] = '#FFFFFF';
     $tpl_side_values['TABLE_OVERCOLOR'] = '#FFF5CE';
 }
 // Seitentemplate parsen
Esempio n. 13
0
        } else {
            $material = array();
        }
        $material = json_encode($material);
        if ($by_post) {
            $img_names = array('image1', 'image2', 'image3');
            foreach ($img_names as $img_name) {
                if ($_FILES[$img_name]['name']) {
                    $uploading = 1;
                    // upload
                    ${$img_name} = make_image($_FILES[$img_name]);
                    // orgin
                    // big
                    ${$img_name . '_400'} = make_image($_FILES[$img_name], array('crop' => 1, 'resize' => 1, 'width' => 400, 'height' => 400));
                    // thumb
                    ${$img_name . '_thumb'} = make_image($_FILES[$img_name], array('crop' => 1, 'resize' => 1, 'width' => 80, 'height' => 80));
                }
            }
            if (!isset($uploading)) {
                $admin->postProduct(compact('name', 'no', 'type', 'material', 'weight', 'rabbet_start', 'rabbet_end', 'small_stone', 'st_weight', 'remark', 'image1', 'image1_400', 'image1_thumb', 'image2', 'image2_400', 'image2_thumb', 'image3', 'image3_400', 'image3_thumb'));
                redirect('product');
            }
        }
        break;
    case 'batch':
        break;
    default:
        throw new Exception("unkown: {$target}");
        break;
}
$matter = $view . ($target ? '.' . $target : '');
/**
 * function that links to netvibes
 * @param string $jurl url to link to
 * @param array  $jurlParams parms to give to the links
 * @param string $title title of the link
 */
function social_netvibes($jurl, $jurlParams, $title)
{
    $params = array('width' => 16, 'height' => 16, 'alt' => 'netvibes');
    $netvibesUrl = 'http://www.netvibes.com/share?';
    $netvibesUrl .= 'url=http://' . $_SERVER['SERVER_NAME'] . urlencode(jUrl::get($jurl, $jurlParams));
    $netvibesUrl .= '&amp;title=' . urlencode($title);
    echo '<a href="' . $netvibesUrl . '" title="netvibes" >' . make_image('themes/' . jApp::config()->theme . '/' . jApp::config()->social_networks['images_path'] . '/Netvibes.png', $params) . '</a> ';
}
Esempio n. 15
0
        unset($tmp);
    }
} else {
    // Repository
    $tpl->setCurrentBlock('ENTRY');
    $pluglist = $rep->plug_list($idclient);
    if (is_array($pluglist)) {
        foreach ($pluglist as $plug) {
            if (!$perm->have_perm(15, 'plug', 0) && (strpos($plug['version'], 'dev') != false && $plug['version'] != '')) {
                continue;
            }
            $plug['count'] = (int) $rep->plug_count('0', $plug['repository_id'], true);
            // Hintergrundfarbe wählen
            $tmp['ENTRY_BGCOLOR'] = '#ffffff';
            $tmp['OVERENTRY_BGCOLOR'] = '#fff7ce';
            $tmp['ENTRY_ICON'] = make_image('but_plugin.gif', '', '16', '16');
            // Plugin importieren, todo:validate developer module
            if ($perm->have_perm(14, 'area_plug', 0) && $plug['count'] < 1) {
                $tmp['ENTRY_IMPORT'] = "<a class=\"action\" href=\"" . $sess->url("main.php?area=plug&action=import&repid=" . $plug['repository_id'] . "&idclient={$client}") . "\"><img src=\"tpl/" . $cfg_cms['skin'] . "/img/import.gif\" alt=\"" . $cms_lang['plug_repository_import'] . "\" title=\"" . $cms_lang['plug_repository_import'] . "\" width=\"16\" height=\"16\" /></a>";
            }
            // Plugin downloaden, todo:validate developer module
            if ($perm->have_perm(13, 'area_plug', 0)) {
                $tmp['ENTRY_DOWNLOAD'] = "<a class=\"action\" href=\"" . $sess->url("main.php?area=plug&repid=" . $plug['repository_id'] . "&idclient=-1&action=download") . "\"><img src=\"tpl/" . $cfg_cms['skin'] . "/img/but_download.gif\" alt=\"" . $cms_lang['plug_repository_download'] . "\" title=\"" . $cms_lang['plug_repository_download'] . "\" width=\"16\" height=\"16\"></a>";
            }
            /* // Plugin updaten
             * todo:validate list of local plugins
             * todo:oldperms!
             *if ( $perm->have_perm('area_plug_repository_update')  && $rep->enabled() ) {
             *   if ( $plug['repository_id'] > 0 && !$rep->online() ) $tmp['ENTRY_UPDATE'] = "<a name='norepository' onmouseover=\"on('".$cms_lang['plug_repository_notonline']."');return true;\" onmouseout=\"off();return true;\"><img src=\"tpl/".$cfg_cms['skin']."/img/but_offline.gif\" width=\"13\" height=\"13\" border=\"0\" alt=\"".$cms_lang['plug_repository_notonline']."\" title=\"".$cms_lang['plug_repository_notonline']."\"></a>";
             *   elseif ( $rep->plug_updates($plug['repository_id']) && $plug['repository_id'] > 0 ) $tmp['ENTRY_UPDATE'] = "<a href=\"".$sess->url('main.php?area=plug&action=update&idplug='.$plug['idplug'].'&repid='.$db->f('repository_id').'&idclient='.$idclient)."\" onmouseover=\"on('".$cms_lang['plug_repository_update']."');return true;\" onmouseout=\"off();return true;\"><img src=\"tpl/".$cfg_cms['skin']."/img/but_onpublish.gif\" width=\"13\" height=\"13\" border=\"0\" alt=\"".$cms_lang['plug_repository_update']."\" title=\"".$cms_lang['plug_repository_update']."\"></a>";
             *   elseif ( $plug['repository_id'] > 0 ) $tmp['ENTRY_UPDATE'] = "<a name='norepository' onmouseover=\"on('".$cms_lang['plug_repository_noupdate']."');return true;\" onmouseout=\"off();return true;\"><img src=\"tpl/".$cfg_cms['skin']."/img/but_online.gif\" width=\"13\" height=\"13\" border=\"0\" alt=\"".$cms_lang['plug_repository_noupdate']."\" title=\"".$cms_lang['plug_repository_noupdate']."\"></a>";
Esempio n. 16
0
function manualHeader($title, $id = "")
{
    global $HTDIG, $LANGUAGES, $LANG, $SIDEBAR_DATA, $dbh;
    makeBorderTOC($title);
    /**
     * Show link to the package info file?
     */
    if (strstr(basename($_SERVER['PHP_SELF']), "packages.") && substr_count($_SERVER['PHP_SELF'], ".") > 2) {
        $package = substr(basename($_SERVER['PHP_SELF']), 0, strlen(basename($_SERVER['PHP_SELF'])) - 4);
        $package = preg_replace("/(.*)\\./", "", $package);
        $query = "SELECT id FROM packages WHERE LCASE(name) = LCASE('" . $package . "')";
        $sth = $dbh->query($query);
        $row = $sth->fetchRow();
        if (is_array($row)) {
            ob_start();
            echo "<div align=\"center\"><br /><br />\n";
            $bb = new Borderbox("Download");
            echo "<div align=\"left\">\n";
            print_link("/package-info.php?pacid=" . $row[0], make_image("box-0.gif") . " Package info");
            echo "</div>\n";
            $bb->end();
            echo "</div>\n";
            $SIDEBAR_DATA .= ob_get_contents();
            ob_end_clean();
        }
    }
    response_header('Manual: ' . $title);
    # create links to plain html and other languages
    if (!$HTDIG) {
        navigationBar($title, $id, "top");
    }
}
Esempio n. 17
0
    $tpl->setCurrentBlock('EMPTY');
    $tmp['LANG_NOGROUPS'] = $cms_lang['group_nogroups'];
    $tpl->setVariable($tmp);
    $tpl->parse('EMPTY');
    unset($tmp);
}
// Sprachen zuordnen
if ($idgroup) {
    $sim_perm = new cms_perms($client_id, $idlang, true, $idgroup);
    $tpl->setCurrentBlock('CONFIG');
    $db2 =& new DB_cms();
    $sql = "SELECT A.idclient, A.name, B.idlang, B.name AS lang FROM " . $cms_db['clients'] . " A, " . $cms_db['lang'] . " B LEFT JOIN " . $cms_db['clients_lang'] . " C USING(idlang) WHERE A.idclient = C.idclient ORDER BY A.idclient, lang";
    $db2->query($sql);
    while ($db2->next_record()) {
        $tmp['BGCOLOR'] = $row_bgcolor['project_lang'];
        $tmp['ENTRY_ICON'] = make_image('but_permission.gif', '', '16', '16');
        $tmp['NAME'] = htmlentities($db2->f('name'), ENT_COMPAT, 'UTF-8');
        $tmp['DESCRIPTION'] = htmlentities($db2->f('lang'), ENT_COMPAT, 'UTF-8');
        if ($sim_perm->have_perm('1', 'lang', $db2->f('idlang'))) {
            $tmp['BUTTON_CONFIG'] = '<a href="' . sprintf($base_url, 'group_config', $order, $ascdesc) . '&idgroup=' . $idgroup . '&idlang=' . $db2->f('idlang') . '&idclient=' . $db2->f('idclient') . '" onmouseover="on(\'' . $cms_lang['group_langconfig'] . '\');return true;" onmouseout="off()" ;return true;"><img src="tpl/' . $cfg_cms['skin'] . '/img/but_config.gif" border="0" alt="' . $cms_lang['group_langconfig'] . '" title="' . $cms_lang['group_langconfig'] . '" width="16" height="16" /></a>';
            $tmp['BUTTON_AKTIVE'] = '<a href="' . sprintf($base_url, 'group', $order, $ascdesc) . '&action=activate_lang&idgroup=' . $idgroup . '&idlang=' . $db2->f('idlang') . '" onmouseover="on(\'' . $cms_lang['group_langoff'] . '\');return true;" onmouseout="off()" ;return true;"><img src="tpl/' . $cfg_cms['skin'] . '/img/but_online.gif" border="0" alt="' . $cms_lang['group_langoff'] . '" title="' . $cms_lang['group_langoff'] . '" width="16" height="16" /></a>';
        } else {
            $tmp['BUTTON_AKTIVE'] = '<a href="' . sprintf($base_url, 'group', $order, $ascdesc) . '&action=activate_lang&idgroup=' . $idgroup . '&idlang=' . $db2->f('idlang') . '" onmouseover="on(\'' . $cms_lang['group_langon'] . '\');return true;" onmouseout="off()" ;return true;"><img src="tpl/' . $cfg_cms['skin'] . '/img/but_offline.gif" border="0" alt="' . $cms_lang['group_langon'] . '" title="' . $cms_lang['group_langon'] . '" width="16" height="16" /></a>';
        }
        $tmp['SPACE'] = '<img src="tpl/' . $cfg_cms['skin'] . '/img/space.gif" width="16" height="16" />';
        $tpl->setVariable($tmp);
        $tpl->parseCurrentBlock();
        unset($tmp);
    }
}
include 'inc/inc.footer.php';
Esempio n. 18
0
/**
 * Prints out the XHTML headers and top of the page.
 *
 * @param string $title        A string to go into the header's <title>
 * @param string $style        -Unused- Sets global $_style variable
 * @param string $extraHeaders Additional HTML head tags
 * @param string $head         <head> tag attributes
 *
 * @return void
 */
function response_header($title = 'The PHP Extension and Application Repository', $style = false, $extraHeaders = '', $head = '')
{
    global $_style, $_header_done, $self, $auth_user, $RSIDEBAR_DATA, $in_manual;
    $extra_styles = extra_styles();
    if ($_header_done) {
        return;
    }
    $_header_done = true;
    $_style = $style;
    $rts = rtrim($RSIDEBAR_DATA);
    if (substr($rts, -1) == '-') {
        $RSIDEBAR_DATA = substr($rts, 0, -1);
    } else {
        $menu = draw_navigation();
    }
    if ($in_manual === false) {
        // The manual-related code takes care of sending the right headers.
        header('Content-Type: text/html; charset=UTF-8');
    }
    ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head <?php 
    echo $head;
    ?>
>
<?php 
    echo $extraHeaders;
    ?>
 <title><?php 
    echo $title;
    ?>
</title>
 <link rel="shortcut icon" href="/gifs/favicon.ico" />
 <link rel="stylesheet" type="text/css" href="/css/reset-fonts.css" />
 <link rel="stylesheet" type="text/css" href="/css/style.css" />
<?php 
    foreach ($extra_styles as $style_file) {
        echo ' <link rel="stylesheet" type="text/css" href="' . $style_file . "\" />\n";
    }
    ?>
 <!--[if IE 7]><link rel="stylesheet" type="text/css" href="/css/IE7styles.css" /><![endif]-->
 <!--[if IE 6]><link rel="stylesheet" type="text/css" href="/css/IE6styles.css" /><![endif]-->
 <link rel="stylesheet" type="text/css" href="/css/print.css" media="print" />
 <link rel="alternate" type="application/rss+xml" title="RSS feed" href="http://<?php 
    echo PEAR_CHANNELNAME;
    ?>
/feeds/latest.rss" />
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
 <script type="text/javascript" src="/javascript/jquery-dtpicker/jquery.dtpicker.min.js"></script>
 <link rel="stylesheet" type="text/css" href="/javascript/jquery-dtpicker/jquery.dtpicker.css" />
 <!-- compliance patch for microsoft browsers -->
<!--[if lt IE 8]>
 <script type="text/javascript" src="/javascript/IE8.js"></script>
<![endif]-->
 <link rel="search" type="application/opensearchdescription+xml" title="PEAR Search Plugin" href="http://pear.php.net/osd.xml" />
</head>

<body>
<div>
<a id="TOP"></a>
</div>

<div id="doc3">
<!-- START HEADER -->
 <div id="user">
  <ul>
<?php 
    if (!$auth_user) {
        echo '   <li>' . make_link('/account-request.php', 'Register') . '</li>' . "\n";
        echo '   <li class="last">';
        if (@$_SERVER['QUERY_STRING'] && @$_SERVER['QUERY_STRING'] != 'logout=1') {
            $qs = @$_SERVER['QUERY_STRING'];
            echo make_link('/login.php?redirect=' . urlencode("{$self}?{$qs}"), 'Login');
        } else {
            echo make_link('/login.php?redirect=' . $self, 'Login');
        }
        echo '</li>' . "\n";
    } else {
        echo '   <li>logged in as <a href="/user/' . $auth_user->handle . '">' . $auth_user->handle . '</a></li>' . "\n";
        echo '   <li><a href="/account-edit.php?handle=' . $auth_user->handle . '">Profile</a></li>' . "\n";
        echo '   <li><a href="/bugs/search.php?handle=' . $auth_user->handle . '&amp;cmd=display&amp;status=OpenFeedback&amp;showmenu=1">Bugs</a></li>' . "\n";
        echo '   <li><a href="/bugs/search.php?cmd=display' . '&amp;status=All&amp;bug_type=All&amp;author_email=' . $auth_user->handle . '&amp;direction=DESC&amp;order_by=ts1&amp;showmenu=1">My Bugs</a></li> ' . "\n" . '   <li class="last signout">';
        $query_string = empty($_SERVER['QUERY_STRING']) ? '' : '&amp;' . htmlspecialchars($_SERVER['QUERY_STRING']);
        echo make_link('?logout=1' . $query_string, 'Sign Out');
        echo "</li>\n";
    }
    ?>
  </ul>
 </div>

 <div id="search">
  <form method="get" action="/search.php">
   <p style="margin: 0px;">
    <span class="accesskey">S</span>earch for
    <input type="text" name="q" value="" size="20" accesskey="s" />
    in the
    <select name="in">
        <option value="packages">Packages</option>
        <option value="site">This site (using Yahoo!)</option>
        <option value="users">Developers</option>
        <option value="pear-dev">Developer mailing list</option>
        <option value="pear-general">General mailing list</option>
        <option value="pear-cvs">SVN commits mailing list</option>
    </select>
    <input type="image" src="/gifs/small_submit_white.gif" alt="search" style="vertical-align: middle;" />
   </p>
  </form>
 </div>

  <div id="header">
   <?php 
    echo make_link('/', make_image('pearsmall.gif', 'PEAR'));
    ?>
<br />
  </div>

<div id="menubar">
<?php 
    echo $menu['main'];
    ?>
</div>

<?php 
    echo $menu['sub'];
    ?>
<!-- END HEADER -->
<!-- START MIDDLE -->
<?php 
    $style = '';
    if (isset($RSIDEBAR_DATA)) {
        $style = ' style="margin-right: 230px;"';
        ?>

<!-- START RIGHT SIDEBAR -->
  <div class="sidebar_right">
   <?php 
        echo $RSIDEBAR_DATA;
        ?>
  </div>
<!-- END RIGHT SIDEBAR -->

<?php 
    }
    ?>

<!-- START MAIN CONTENT -->

  <div id="body"<?php 
    echo $style;
    ?>
>

<?php 
}
Esempio n. 19
0
function clients_get_projectrow($idclient, $client_array, $collapse, $c_conf)
{
    global $cms_lang, $perm;
    //make collapse/ expand
    if ($client_array[$idclient]['have_childs']) {
        if ($collapse == $idclient) {
            $lin = clients_get_collapselink('but_minus.gif', $cms_lang['clients_collapse'], 0);
        } else {
            $lin = clients_get_collapselink('but_plus.gif', $cms_lang['clients_expand'], $idclient);
        }
    } else {
        $lin = sprintf($c_conf['html_image'], 'space.gif', '', '', 16, 16, '');
    }
    $tpl_data['PR_ENTRY_EXPANDER'] = $lin;
    $tpl_data['PR_ENTRY_NAME'] = htmlentities($client_array[$idclient]['name'], ENT_COMPAT, 'UTF-8');
    $tpl_data['PR_ENTRY_ICON'] = make_image('but_project.gif', '', '16', '16', false, ' class="icon" ');
    $tpl_data['PR_ENTRY_DESCRIPTION'] = htmlentities($client_array[$idclient]['desc'], ENT_COMPAT, 'UTF-8');
    $tpl_data['PR_ENTRY_BGCOLOR'] = $c_conf['style_project'];
    $tpl_data['PR_OVERENTRY_BGCOLOR'] = $c_conf['style_project_over'];
    if ($perm->have_perm(18, 'clients', $idclient)) {
        $tpl_data['PR_LANG_NEW'] = clients_get_imagelink('but_newlang.gif', 'action=newlang&cid=' . $idclient, $cms_lang['clients_make_new_lang'], 16, 16);
    }
    if ($perm->have_perm(3, 'clients', $idclient)) {
        $tpl_data['PR_ENTRY_EDIT'] = clients_get_imagelink('but_edit.gif', 'action=editclient&cid=' . $idclient, $cms_lang['clients_modify'], 16, 16);
    }
    if ($perm->have_perm(4, 'clients', $idclient)) {
        $tpl_data['PR_ENTRY_CONF'] = clients_get_imagelinkextern('but_config.gif', 'area=clients_config&cid=' . $idclient, $cms_lang['clients_config'], 16, 16);
    }
    if ($client_array['num_clients'] > 1) {
        if ($perm->have_perm(5, 'clients', $idclient)) {
            $tpl_data['PR_ENTRY_DELETE'] = clients_get_imagedeletelink('but_delete.gif', 'action=delete_client&cid=' . $idclient, $cms_lang['clients_delete'], 16, 16);
        }
    } else {
        $tpl_data['PR_ENTRY_DELETE'] = '';
    }
    return $tpl_data;
}
Esempio n. 20
0
         $sub_links[] = '<b><a href="' . $script_name . '?catpid=' . $subcat['id'] . '&amp;catname=' . urlencode($subcat['name']) . '" title="' . htmlspecialchars($subcat['summary'], ENT_QUOTES) . '">' . $subcat['name'] . '</a></b>';
         if (sizeof($sub_links) >= $max_sub_links) {
             break;
         }
     }
 }
 if (isset($subpkgs[$id])) {
     foreach ($subpkgs[$id] as $subpkg) {
         $sub_links[] = '<a href="/package/' . $subpkg['name'] . '" title="' . htmlspecialchars($subpkg['summary'], ENT_QUOTES) . '">' . $subpkg['name'] . '</a>';
         if (sizeof($sub_links) >= $max_sub_links) {
             break;
         }
     }
 }
 if (sizeof($sub_links) >= $max_sub_links) {
     $sub_links = implode(', ', $sub_links) . ' ' . make_image("caret-r.gif", "[more]");
 } else {
     $sub_links = implode(', ', $sub_links);
 }
 settype($npackages, 'string');
 settype($ncategories, 'string');
 $data = '<font size="+1"><b><a href="' . $script_name . '?catpid=' . $id . '&amp;catname=' . urlencode($name) . '">' . $name . '</a></b></font> (' . $npackages . ')<br />';
 //$name; //array($name, $npackages, $ncategories, $summary);
 $data .= $sub_links . '<br />';
 $catdata[] = $data;
 $totalpackages += $npackages;
 if ($nrow++ % 2 == 1) {
     $table->addRow(array($catdata[0], $catdata[1]));
     $table->setCellAttributes($table->getRowCount() - 1, 0, 'width="50%"');
     $table->setCellAttributes($table->getRowCount() - 1, 1, 'width="50%"');
     $catdata = array();
Esempio n. 21
0
$bb->horizHeadRow("Description", nl2br($description));
if (!empty($homepage)) {
    $bb->horizHeadRow("Homepage", make_link($homepage));
}
if ($relid) {
    // Find correct version for given release id
    foreach ($pkg['releases'] as $r_version => $release) {
        if ($release['id'] != $relid) {
            continue;
        }
        $bb->horizHeadRow("Release notes<br />Version " . $version . "<br />(" . $release['state'] . ")", nl2br($release['releasenotes']));
        break;
    }
}
if (!empty($auth_user)) {
    $bb->fullRow("<div align=\"right\">" . make_link("/package-edit.php?id={$pacid}", make_image("edit.gif", "Edit package information")) . (user::isAdmin($auth_user->handle) ? "&nbsp;" . make_link("/package-delete.php?id={$pacid}", make_image("delete.gif", "Delete package")) : "") . "&nbsp;[" . make_link("/admin/package-maintainers.php?pid={$pacid}", "Edit maintainers") . "]</div>");
}
$bb->end();
// }}}
// {{{ latest/cvs/changelog links
?>

<br />
<table border="0" cellspacing="3" cellpadding="3" height="48" width="90%" align="center">
<tr>
<?php 
$get_link = make_link("/get/{$name}", 'Latest Tarball');
if ($version) {
    $changelog_link = make_link("/package-changelog.php?package=" . $pkg['name'] . '&amp;release=' . $version, 'Changelog');
} else {
    $changelog_link = make_link("/package-changelog.php?package=" . $pkg['name'], 'Changelog');
Esempio n. 22
0
function set_rule_data($db, $imorexport)
{
    global $tmp, $tpl, $ruleserror, $action, $idcss, $idcssfile, $idexpand, $idclient, $cms_lang, $cfg_cms, $perm, $sess;
    if ($perm->have_perm('17', 'css_file', $idexpand)) {
        // Zeige alle CSS-regeln, wenn der User die Berechtigung zum Anzeigen von CSS-Regeln hat
        // background-color of css-rules
        $tmp['DETAIL_BGCOLOR'] = $db->f("status") == 1 ? '#FFFFFF' : '#FFEFDE';
        $tmp['DETAIL_BGCOLOROVER'] = $db->f("status") == 1 ? '#FFF7CE' : '#FFF7CE';
        if (!$db->f('status')) {
            $ruleserror = '1';
        }
        // buttons
        $tmp['DETAIL_EDIT'] = make_image_link2('#', 'space.gif', '', 16, 16, '', '', '', 'action', '', '', '', 'action');
        $tmp['DETAIL_DELBUT'] = make_image_link2('#', 'space.gif', '', 16, 16, '', '', '', 'action', '', '', '', 'action');
        $tmp['DETAIL_DUPLICATE'] = make_image_link2('#', 'space.gif', '', 16, 16, '', '', '', 'action', '', '', '', 'action');
        $tmp['DETAIL_EXIMPORT'] = make_image_link2('#', 'space.gif', '', 16, 16, '', '', '', 'action', '', '', '', 'action');
        // css-rule name and description
        // jb - 29.08.2004 - added details as tooltip for comfort
        // jb - 04.09.2004 - added debug info: idcss of rule
        $tmp['DETAIL_ICON'] = make_image('but_style.gif', '', '16', '16');
        $tmp['DETAIL_NAME'] = '<a class="action" href="javascript:void(0)" title="' . htmlspecialchars($db->f('styles'), ENT_QUOTES, 'UTF-8') . '">' . htmlentities($db->f('type')) . htmlentities($db->f('name')) . ($cfg_cms['debug_active'] ? ' (' . $db->f('idcss') . ')' : '') . '</a>';
        // handle delete css-rule
        if ($action == 30 && $db->f('idcss') == $idcss && $perm->have_perm('21', 'css_file', $idexpand)) {
            $tmp['DETAIL_NAME'] = $tmp['DETAIL_NAME'] . '&nbsp;&nbsp;' . make_image_link3("main.php?area=css&action=deleterule&idcssfile={$idcssfile}&idexpand={$idexpand}&idcss=" . $db->f('idcss') . "&idclient={$idclient}", 'but_confirm.gif', 'but_cancel_delete.gif', $cms_lang['css_delete_confirm'], $cms_lang['css_delete_cancel'], 'action', 'deletethis');
        }
        $tmp['DETAIL_DESCRIPTION'] = htmlentities($db->f('description'), ENT_COMPAT, 'UTF-8');
        // buttons
        if ($perm->have_perm('19', 'css_file', $idexpand)) {
            $url = $imorexport == 'export' ? "&idexpand={$idexpand}&idcssfile={$idexpand}" : "&idcssfile={$idcssfile}";
            // button: edit css-rule
            $tmp['DETAIL_EDIT'] = make_image_link2("main.php?area=css_edit" . $url . "&idcss=" . $db->f('idcss') . "&idclient={$idclient}", 'but_edit.gif', $cms_lang['css_edit'], '16', '16', '', '', '', 'action', '', '', '', 'action');
            // button: duplicate css-rule, benötigt zusätzlich create rechte
            if ($perm->have_perm('18', 'area_css')) {
                $tmp['DETAIL_DUPLICATE'] = make_image_link2("main.php?area=css_edit&action=10" . $url . "&idcss=" . $db->f('idcss') . "&idclient={$idclient}", 'but_duplicate.gif', $cms_lang['css_duplicate'], '16', '16', '', '', '', 'action', '', '', '', 'action');
            }
        }
        if ($perm->have_perm('21', 'css_file', $idexpand)) {
            // button: delete css-rule
            $tmp['DETAIL_DELBUT'] = make_image_link2("main.php?area=css&action=30" . $url . "&idcss=" . $db->f("idcss") . "&idclient={$idclient}", 'but_deleteside.gif', $cms_lang['css_delete'], '16', '16', '', '', '', 'action', 'deletethis', '', '', 'action');
        }
        // button: export or import css-rule
        if ($perm->have_perm('29', 'css_file', $idcssfile) && $imorexport == 'import' && $idclient == 0 || $perm->have_perm('30', 'css_file', $idexpand) && $imorexport == 'export' && $idclient != 0) {
            $url = "&idexpand={$idcssfile}&idcssfile={$idcssfile}";
            $tmp['DETAIL_EXIMPORT'] = make_image_link2("main.php?area=css&action={$imorexport}" . $url . "&idcss=" . $db->f('idcss') . "&idclient={$idclient}", "{$imorexport}.gif", $cms_lang['css_' . $imorexport], '16', '16', '', '', '', 'action', '', '', '', 'action');
        }
    }
}
Esempio n. 23
0
</div>

<a name="icons"></a><h3>Powered By PECL</h3>

<p>
    What programming tool would be complete without a set of
    icons to put on your webpage, telling the world what makes
    your site tick?
</p>

<?php 
$icons = array('pecl-power.gif' => 'Powered by PECL, GIF format', 'pecl-power.png' => 'Powered by PECL, PNG format', 'pecl-icon.gif' => '32x32 PECL icon, GIF format', 'pecl-icon.png' => '32x32 PECL icon, PNG format');
echo '<table cellpadding="5" cellspacing="1">';
foreach ($icons as $file => $desc) {
    echo '<tr bgcolor="e0e0e0">';
    echo '<td>' . make_image($file, $desc) . '<br></td>';
    echo '<td>' . $desc . '<br><small>';
    $size = @getimagesize($_SERVER['DOCUMENT_ROOT'] . '/gifs/' . $file);
    if ($size) {
        echo $size[0] . ' x ' . $size[1] . ' pixels<br>';
    }
    $size = @filesize($_SERVER['DOCUMENT_ROOT'] . '/gifs/' . $file);
    if ($size) {
        echo $size . ' bytes<br>';
    }
    echo '</small>';
    echo '</td></tr>';
}
echo '</table>';
echo '<p><b>Note:</b> Please do not just include these icons directly but
        download them and save them locally in order to keep HTTP traffic
Esempio n. 24
0
function menu_link($text, $url)
{
    echo "<p>\n";
    print_link($url, make_image('pecl_item.gif', $text));
    echo '&nbsp;';
    print_link($url, '<b>' . $text . '</b>');
    echo "</p>\n";
}
Esempio n. 25
0
 function _make_row_body()
 {
     global $cms_lang, $db, $tpl, $vid;
     //Werte auslesen
     $db_val['id'] = $db->f('idvalues');
     $db_val['key1'] = $db->f('key1');
     $db_val['key2'] = $db->f('key2');
     $db_val['key3'] = $db->f('key3');
     $db_val['key4'] = $db->f('key4');
     $db_val['value'] = $db->f('value');
     $db_val['conf_sortindex'] = $db->f('conf_sortindex');
     $db_val['conf_desc_langstring'] = $db->f('conf_desc_langstring');
     $db_val['conf_input_type'] = $db->f('conf_input_type');
     $row['ENTRY_DESC'] = $this->_format_value_desc($db_val);
     $row['ENTRY_ICON'] = make_image('but_parameter.gif', '', '16', '16', false, 'class="icon"');
     $row['ENTRY_BGCOLOR'] = '#ffffff';
     $row['OVERENTRY_BGCOLOR'] = '#fff7ce';
     // Ein Wert wird bearbeitet
     if ($this->action == 'edit' && $this->vid == $db_val['id']) {
         $row['ENTRY_VALUE'] = $this->_format_edit_field($db_val);
         $row['ENTRY_ACTIONS'] = $this->_format_submit_buttons($db_val);
         $row['FORM_START'] = '<form action="main.php#val' . $db_val['id'] . '" method="post">';
         $row['FORM_END'] = '</form>';
     } else {
         $row['ENTRY_VALUE'] = $this->_format_value($db_val);
         $row['ENTRY_ACTIONS'] = $this->_format_actions($db_val);
     }
     $tpl->setVariable($row);
     $tpl->parse('ENTRY');
 }
Esempio n. 26
0
        }
        // Template dublizieren
        if ($perm->have_perm(2, 'area_tpl', 0) && $perm->have_perm(3, 'tpl', $idtpl)) {
            $tmp['ENTRY_DUPLICATE'] = "\n<a href=\"" . $sess->url("main.php?area=tpl_edit&action=duplicate&idtpl=" . $db->f('idtpl')) . "\">\n<img src=\"tpl/" . $cfg_cms['skin'] . "/img/but_duplicate.gif\" alt=\"" . $cms_lang['tpl_duplicate'] . "\" title=\"" . $cms_lang['tpl_duplicate'] . "\" width=\"16\" height=\"16\" /></a>";
        }
        // Template bearbeiten
        if ($perm->have_perm(3, 'tpl', $idtpl)) {
            $tmp['ENTRY_EDIT'] = "\n<a href=\"" . $sess->url("main.php?area=tpl_edit&idtpl=" . $db->f('idtpl')) . "\">\n<img src=\"tpl/" . $cfg_cms['skin'] . "/img/but_edit.gif\" alt=\"" . $cms_lang['tpl_edit'] . "\" title=\"" . $cms_lang['tpl_edit'] . "\" width=\"16\" height=\"16\" /></a>";
        }
        // Template l�schen
        if ($db->f('deletable') == '1' && $perm->have_perm(5, 'tpl', $idtpl)) {
            $tmp['ENTRY_DELBUT'] = "\n<a href=\"" . $sess->url('main.php?area=tpl&action=delete&idtpl=' . $db->f('idtpl')) . "\" onclick=\"return delete_confirm()\">\n<img src=\"tpl/" . $cfg_cms['skin'] . "/img/but_deleteside.gif\" width=\"16\" height=\"16\" alt=\"" . $cms_lang['tpl_delete'] . "\" title=\"" . $cms_lang['tpl_delete'] . "\" /></a>";
        } else {
            $tmp['ENTRY_DELBUT'] = "\n<img src=\"tpl/" . $cfg_cms['skin'] . "/img/space.gif\" width=\"16\" height=\"16\" />";
        }
        $tmp['ENTRY_ICON'] = make_image('but_template.gif', '', '16', '16', false, 'class="icon"');
        $tmp['ENTRY_NAME'] = htmlentities($db->f('name'), ENT_COMPAT, 'UTF-8');
        $tmp['ENTRY_DESCRIPTION'] = htmlentities($db->f('description'), ENT_COMPAT, 'UTF-8');
        $tpl->setVariable($tmp);
        $tpl->parseCurrentBlock();
        unset($tmp);
    }
}
$tpl->setCurrentBlock('NOENTRY');
if ($int_max < 1) {
    $tmp['TPL_NOTEMPLATES'] = $cms_lang['tpl_notemplates'];
    $tpl->setVariable($tmp);
    $tpl->parseCurrentBlock();
    unset($tmp);
}
include 'inc/inc.footer.php';
Esempio n. 27
0
/**
 * Prints an IMG tag for a given file
 */
function print_image($file, $alt = '', $align = '', $extras = '', $dir = '', $border = 0)
{
    print make_image($file, $alt, $align, $extras, $dir);
}
Esempio n. 28
0
        $row['homepage'] = 'http://' . $row['homepage'];
    }
    $bb->horizHeadRow("Homepage:", "<a href=\"{$row['homepage']}\" target=\"_blank\">" . "{$row['homepage']}</a></td>\n");
}
//XXX: Remove entirely?
//$bb->horizHeadRow("Registered since:", $row['created']);
$bb->horizHeadRow("Additional information:", empty($row['userinfo']) ? "&nbsp;" : $row['userinfo']);
$bb->horizHeadRow("VCS Access:", implode("<br />", $access));
if ($row['wishlist'] != "") {
    $bb->horizHeadRow("Wishlist:", make_link("/wishlist.php/" . $row['handle'], "Click here to be redirected."));
}
if ($row['admin'] == 1) {
    $bb->fullRow("{$row['name']} is a PECL administrator.");
}
$query = "SELECT p.id, p.name, m.role\n          FROM packages p, maintains m\n          WHERE m.handle = '{$handle}'\n          AND p.id = m.package\n          AND p.package_type = 'pecl'\n          ORDER BY p.name";
$sth = $dbh->query($query);
$bb->end();
print "</td><td valign=\"top\">\n";
$bb = new BorderBox("Maintaining These Packages:", "100%", "", 2, true);
if ($sth->numRows() > 0) {
    $bb->headRow("Package Name", "Role");
    while (is_array($row = $sth->fetchRow())) {
        $bb->plainRow("<a href=\"/package/" . $row['name'] . "\">" . $row['name'] . "</a>", $row['role']);
    }
}
$bb->end();
print "<br />\n";
display_user_notes($handle, "100%");
print "<br /><a href=\"/account-edit.php?handle={$handle}\">" . make_image("edit.gif", "Edit") . "</a>";
print "</td></tr></table>\n";
response_footer();
Esempio n. 29
0
 This page contains a list of sites where you can find software distributed
 under the <a href="/license/3_01.txt">PHP license</a>.  
</p>

<p>
 <?php 
echo make_image("logos/php-icon-white.gif", $alt = "www.php.net", "left");
?>
&nbsp;
 <a href="http://www.php.net/">www.php.net</a><br />
 &nbsp;Main site for the PHP project.<br clear="left" />
</p>
<p>
 <?php 
echo make_image("pear-icon.png", $alt = "pear.php.net", "left");
?>
&nbsp;
 <a href="http://pear.php.net/">pear.php.net</a><br />
 &nbsp;The PEAR project where you can find reusable components for PHP .<br clear="left" />
</p>
<p>
 <?php 
echo make_image("pecl-icon.png", $alt = "pecl.php.net", "left");
?>
&nbsp;
 <a href="http://pecl.php.net/">pecl.php.net</a><br />
 &nbsp;The PECL project where you can find PHP extensions.<br clear="left" />
</p>

<?php 
site_footer();
Esempio n. 30
0
        if (is_array($requests) && sizeof($requests) > 0) {
            $bb->headRow("<font face=\"Marlett\"><a href=\"#\" onclick=\"toggleSelectAll(this)\">6</a></font>", "Name", "Handle", "Account Purpose", "Status", "Created at", "&nbsp;");
            foreach ($requests as $handle => $data) {
                list($name, $note, $userinfo, $created_at) = $data;
                // Grab userinfo/request purpose
                if (@unserialize($userinfo)) {
                    $userinfo = @unserialize($userinfo);
                    $account_purpose = $userinfo[0];
                } else {
                    $account_purpose = $userinfo;
                }
                $rejected = preg_match("/^Account rejected:/", $note);
                if ($rejected) {
                    continue;
                }
                $bb->plainRow('<input type="checkbox" value="' . $handle . '" name="uid[]" onmousedown="highlightAccountRow(this)"/>', sprintf('<span style="cursor: hand" onmousedown="highlightAccountRow(this)">%s</span>', $name), sprintf('<span style="cursor: hand" onmousedown="highlightAccountRow(this)">%s</span>', $handle), sprintf('<span style="cursor: hand" onmousedown="highlightAccountRow(this)">%s</span>', nl2br($account_purpose)), sprintf('<span style="cursor: hand" onmousedown="highlightAccountRow(this)">%s</span>', $rejected ? "rejected" : "<font color=\"#c00000\"><strong>Outstanding</strong></font>"), sprintf('<span style="cursor: hand" onmousedown="highlightAccountRow(this)">%s</span>', $created_at), sprintf('<span style="cursor: hand" onmousedown="highlightAccountRow(this)">%s</span>', "<a onmousedown=\"event.cancelBubble = true\" href=\"" . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES) . "?acreq={$handle}\">" . make_image("edit.gif") . "</a>"));
            }
        } else {
            print "No account requests.";
        }
        $bb->end();
        ?>
		<br />
		<table align="center">
		<tr>
			<td>
				<select name="reason">
					<option value="">Select rejection reason...</option>
					<option value="Account not needed">Account not needed</option>
				</select>
			</td>