Code Search for Developers
 
 
  

color_selector.php from Group-Office groupware at Krugle


Show color_selector.php syntax highlighted

<?php
/**
 * @copyright Intermesh 2003
 * @author Merijn Schering <mschering@intermesh.nl>
 * @version $Revision: 1.2 $ $Date: 2006/11/21 16:25:35 $
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version.
 */

require_once("../Group-Office.php");
$GO_SECURITY->authenticate();
$GO_HEADER['nomessages'] = true;
require_once($GO_THEME->theme_path."header.inc");

load_basic_controls();

$id = smart_stripslashes($_REQUEST['id']);
$name = smart_stripslashes($_REQUEST['name']);
$form_name = smart_stripslashes($_REQUEST['form_name']);
$max_cols=18;

$table = new table();
$table->set_attribute('style', 'border:1px solid black;background-color:#fff');
// $table->set_attribute('onblur', 'javascript:close_colors(\''.$attributes['id'] .'\');');

$row = new table_row();

$colors=array();
$colors[] = '000000';
$colors[] = '009900';
$colors[] = '00ff00';
$colors[] = '0000ff';
$colors[] = '00ffff';
$colors[] = '660033';
$colors[] = '660099';
$colors[] = '6666ff';
$colors[] = '66ff99';
$colors[] = 'cc0099';
$colors[] = 'cc99ff';
$colors[] = '996600';
$colors[] = '999900';
$colors[] = 'ff0000';
$colors[] = 'ff6600';
$colors[] = 'ffff00';
$colors[] = 'ff9966';
$colors[] = 'ff9900';
$colors[] = 'ffff99';
$colors[] = 'ffffff';
	


$cols=0;
$row = new table_row();  	

for($a=0;$a<count($colors);$a+=1)
{    	
	$cols++;
	$cell = new table_cell();

	$link = new hyperlink('javascript:select_color(\''.$id.'\', \''.$form_name.'\', \''.$name.'\', \''.$colors[$a].'\');', '&nbsp;');
	$link->set_attribute('style', 'display:block;border:1px solid;#ccccc;height:16px;width:16px;background-color:'.$colors[$a]);
	//$link->set_attribute('id', 'color_'.$attributes['id'].'_'.$colors[$a]);
	
	$cell->add_html_element($link);
	$row->add_cell($cell);	    		
	
	if($cols==$max_cols)
	{
		$table->add_row($row);
		$row = new table_row(); 
		$cols=0;
	}	    	
}

$row = new table_row();
$cell = new table_cell('&nbsp;');
$cell->set_attribute('colspan', '99');
$cell->set_attribute('style', 'height:10px;');
$row->add_cell($cell);
$table->add_row($row);


$row = new table_row();


$colors = array('00','33','66','99','cc','ff');   



$cols=0;
$row = new table_row();  	

for($a=0;$a<count($colors);$a+=1)
{
	for($b=0;$b<count($colors);$b+=1)
	{    		
		for($c=0;$c<count($colors);$c+=1)
		{
			$cols++;
			$color = ''.$colors[$a].$colors[$c].$colors[$b];
    		$cell = new table_cell();
    		
    		$link = new hyperlink('javascript:select_color(\''.$id.'\', \''.$form_name.'\', \''.$name.'\', \''.$color.'\');', '&nbsp;');
			$link->set_attribute('style', 'display:block;border:1px solid;#ccccc;height:16px;width:16px;background-color:#'.$color);
			
			$cell->add_html_element($link);
			$row->add_cell($cell);	    		
			
			if($cols==$max_cols)
			{
				$table->add_row($row);
				$row = new table_row(); 
				$cols=0;
			}
    	}
    }	    
}


echo $table->get_html();
?>
<script type="text/javascript">
function select_color(id, form_name, element_name, color)
{
	var link = opener.document.getElementById('color_link_'+id);
	opener.document.forms[form_name].elements[element_name].value=color;
	link.style.backgroundColor='#'+color;
	window.close();
}
</script>
<?php
require_once($GO_THEME->theme_path."footer.inc");




See more files for this project here

Group-Office groupware

Group-Office is a powerfull modular Internet/Intranet application framework. It features calendaring, project management, e-mail, tasks, addressbook, file management.

Project homepage: http://sourceforge.net/projects/group-office
Programming language(s): JavaScript,Pascal,PHP
License: other

  FCKeditor/
    editor/
      _source/
        classes/
          fckcontextmenu.js
          fckdocumentfragment_gecko.js
          fckdocumentfragment_ie.js
          fckdomrange.js
          fckdomrange_gecko.js
          fckdomrange_ie.js
          fckeditingarea.js
          fckelementpath.js
          fckenterkey.js
          fckevents.js
          fckicon.js
          fckiecleanup.js
          fckimagepreloader.js
          fckkeystrokehandler.js
          fckmenublock.js
          fckmenublockpanel.js
          fckmenuitem.js
          fckpanel.js
          fckplugin.js
          fckspecialcombo.js
          fckstyledef.js
          fckstyledef_gecko.js
          fckstyledef_ie.js
          fckstylesloader.js
          fcktoolbar.js
          fcktoolbarbreak_gecko.js
          fcktoolbarbreak_ie.js
          fcktoolbarbutton.js
          fcktoolbarbuttonui.js
          fcktoolbarfontformatcombo.js
          fcktoolbarfontscombo.js
          fcktoolbarfontsizecombo.js
          fcktoolbarpanelbutton.js
          fcktoolbarspecialcombo.js
          fcktoolbarstylecombo.js
          fckw3crange.js
          fckxml_gecko.js
          fckxml_ie.js
        commandclasses/
          fck_othercommands.js
          fckfitwindow.js
          fcknamedcommand.js
          fckpasteplaintextcommand.js
          fckpastewordcommand.js
          fckspellcheckcommand_gecko.js
          fckspellcheckcommand_ie.js
          fckstylecommand.js
        internals/
        fckconstants.js
        fckeditorapi.js
        fckjscoreextensions.js
        fckscriptloader.js
      css/
      dialog/
      filemanager/
      images/
      js/
      lang/
      plugins/
      skins/
      _packager.xml
      fckblank.html
      fckdebug.html
      fckdialog.html
      fckdocument.html
      fckeditor.html
      fckeditor.original.html
    _documentation.html
    _upgrade.html
    _whatsnew.html
    fckconfig.js
    fckeditor.afp
    fckeditor.asp
    fckeditor.cfc
    fckeditor.cfm
    fckeditor.js
    fckeditor.lasso
    fckeditor.php
    fckeditor.pl
    fckeditor.py
    fckeditor_php4.php
    fckeditor_php5.php
    fckstyles.xml
    fcktemplates.xml
    go_fckconfig.js
    htaccess.txt
    license.txt
  JUpload/
  htmlarea/
  jscalendar/
  overlib/
  overlibmws/
  phpthumb/
  select/
  acl.php
  backend_treeview.php
  color_selector.php
  fixpng.inc
  global_search_xml.php
  group.php
  reminder.php
  table_config.php
  user.php
  userlog.php