initial commit

This commit is contained in:
Ben Ramey
2017-03-02 21:57:21 -06:00
commit fd8ad64063
22097 changed files with 1960930 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 54
/svn/!svn/ver/52/pae.co.at/trunk/proactiveenglish/apps
END

View File

@@ -0,0 +1,34 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps
http://barnabas/svn
2010-05-21T03:59:05.104047Z
52
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
frontend
dir
admin
dir

View File

@@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 60
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin
END

View File

@@ -0,0 +1,43 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
i18n
dir
config
dir
lib
dir
modules
dir
templates
dir

View File

@@ -0,0 +1,71 @@
K 25
svn:wc:ra_dav:version-url
V 67
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config
END
factories.yml
K 25
svn:wc:ra_dav:version-url
V 81
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/factories.yml
END
i18n.yml
K 25
svn:wc:ra_dav:version-url
V 76
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/i18n.yml
END
app.yml
K 25
svn:wc:ra_dav:version-url
V 75
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/app.yml
END
settings.yml
K 25
svn:wc:ra_dav:version-url
V 80
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/settings.yml
END
cache.yml
K 25
svn:wc:ra_dav:version-url
V 77
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/cache.yml
END
logging.yml
K 25
svn:wc:ra_dav:version-url
V 79
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/logging.yml
END
routing.yml
K 25
svn:wc:ra_dav:version-url
V 79
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/routing.yml
END
security.yml
K 25
svn:wc:ra_dav:version-url
V 80
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/security.yml
END
filters.yml
K 25
svn:wc:ra_dav:version-url
V 79
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/filters.yml
END
view.yml
K 25
svn:wc:ra_dav:version-url
V 76
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/view.yml
END
config.php
K 25
svn:wc:ra_dav:version-url
V 78
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/config/config.php
END

View File

@@ -0,0 +1,226 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/config
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
factories.yml
file
2010-07-31T05:37:20.000000Z
37faa303588adf8d5c9994e566a68b32
2009-05-28T02:14:48.119086Z
25
ben
572
i18n.yml
file
2009-05-28T02:26:42.000000Z
9f47dba6d4421c5488edf4ab9f3d43b4
2009-05-28T02:14:48.119086Z
25
ben
app.yml
file
2009-05-28T02:26:42.000000Z
664ff901092a718deab9361d52dd2813
2009-05-28T02:14:48.119086Z
25
ben
settings.yml
file
2010-07-31T05:37:20.000000Z
077d8f9412f41da8376a5550fe7f3e2e
2009-05-28T02:14:48.119086Z
25
ben
5802
cache.yml
file
2009-05-28T02:26:42.000000Z
8ce43d600d377a18e8d2e7d66e9beac4
2009-05-28T02:14:48.119086Z
25
ben
logging.yml
file
2010-07-31T05:09:38.000000Z
ee3d1755e24f2e7ebdb38b85ee4eec21
2009-05-28T02:14:48.119086Z
25
ben
routing.yml
file
2009-05-28T02:26:42.000000Z
797b3c445d790684651e05ab15d2de02
2009-05-28T02:14:48.119086Z
25
ben
security.yml
file
2009-05-28T02:26:42.000000Z
39ae8ed7945479d7ed54b2a37c656971
2009-05-28T02:14:48.119086Z
25
ben
filters.yml
file
2010-07-31T05:37:20.000000Z
ec708e647052a461df44f2d35867cea2
2009-05-28T02:14:48.119086Z
25
ben
152
view.yml
file
2009-05-28T02:26:42.000000Z
0730bf8d3d8c463ae85a72a69ca8f9ab
2009-05-28T02:14:48.119086Z
25
ben
config.php
file
2009-05-28T02:26:42.000000Z
7e8e0aac0dc259af29d7dedc17641fa8
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,2 @@
# default values
#all:

View File

@@ -0,0 +1,4 @@
default:
enabled: off
with_layout: false
lifetime: 86400

View File

@@ -0,0 +1,8 @@
<?php
// include project configuration
include(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
// symfony bootstraping
require_once($sf_symfony_lib_dir.'/util/sfCore.class.php');
sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir);

View File

@@ -0,0 +1,35 @@
cli:
controller:
class: sfConsoleController
request:
class: sfConsoleRequest
response:
class: sfConsoleResponse
test:
storage:
class: sfSessionTestStorage
#all:
# controller:
# class: sfFrontWebController
#
# request:
# class: sfWebRequest
#
# response:
# class: sfWebResponse
#
# user:
# class: myUser
#
# storage:
# class: sfSessionStorage
# param:
# session_name: symfony
#
# view_cache:
# class: sfFileCache
# param:
# automaticCleaningFactor: 0
# cacheDir: %SF_TEMPLATE_CACHE_DIR%

View File

@@ -0,0 +1,10 @@
rendering: ~
web_debug: ~
security: ~
# generally, you will want to insert your own filters here
cache: ~
common: ~
flash: ~
execution: ~

View File

@@ -0,0 +1,7 @@
#all:
# default_culture: en
# source: XLIFF
# debug: off
# cache: on
# untranslated_prefix: "[T]"
# untranslated_suffix: "[/T]"

View File

@@ -0,0 +1,22 @@
prod:
enabled: off
level: err
rotate: on
purge: off
#all:
# enabled: on
# level: debug
# rotate: off
# period: 7
# history: 10
# purge: on
# loggers:
# sf_web_debug:
# class: sfWebDebugLogger
# param:
# condition: %SF_WEB_DEBUG%
# sf_file_debug:
# class: sfFileLogger
# param:
# file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log

View File

@@ -0,0 +1,15 @@
# default rules
homepage:
url: /
param: { module: default, action: index }
default_symfony:
url: /symfony/:action/*
param: { module: default }
default_index:
url: /:module
param: { action: index }
default:
url: /:module/:action/*

View File

@@ -0,0 +1,8 @@
all:
is_secure: on
credentials: admin
.actions:
login_module: default
login_action: login
secure_module: default
secure_action: secure

View File

@@ -0,0 +1,106 @@
all:
.settings:
rich_text_js_dir: js/tiny_mce
prod:
.settings:
no_script_name: off
dev:
.settings:
error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?>
web_debug: on
cache: off
no_script_name: off
etag: off
test:
.settings:
error_reporting: <?php echo (E_ALL | E_STRICT & ~E_NOTICE)."\n" ?>
cache: off
web_debug: off
no_script_name: off
etag: off
#all:
# .actions:
# default_module: default # Default module and action to be called when
# default_action: index # A routing rule doesn't set it
#
# error_404_module: default # To be called when a 404 error is raised
# error_404_action: error404 # Or when the requested URL doesn't match any route
#
# login_module: default # To be called when a non-authenticated user
# login_action: login # Tries to access a secure page
#
# secure_module: default # To be called when a user doesn't have
# secure_action: secure # The credentials required for an action
#
# module_disabled_module: default # To be called when a user requests
# module_disabled_action: disabled # A module disabled in the module.yml
#
# unavailable_module: default # To be called when a user requests a page
# unavailable_action: unavailable # From an application disabled via the available setting below
#
# .settings:
# available: on # Enable the whole application. Switch to off to redirect all requests to the unavailable module and action.
#
# # Optional features. Deactivating unused features boots performance a bit.
# use_database: on # Enable database manager. Set to off if you don't use a database.
# use_security: on # Enable security features (login and credentials). Set to off for public applications.
# use_flash: on # Enable flash parameter feature. Set to off if you never use the set_flash() method in actions.
# i18n: off # Enable interface translation. Set to off if your application should not be translated.
# check_symfony_version: off # Enable check of symfony version for every request. Set to on to have symfony clear the cache automatically when the framework is upgraded. Set to off if you always clear the cache after an upgrade.
# use_process_cache: on # Enable symfony optimizations based on PHP accelerators. Set to off for tests or when you have enabled a PHP accelerator in your server but don't want symfony to use it internally.
# compressed: off # Enable PHP response compression. Set to on to compress the outgoing HTML via the PHP handler.
# check_lock: off # Enable the application lock system triggered by the clear-cache task. Set to on to have all requests redirected to the $sf_symfony_data_dir/web/arrors/unavailable.php page during the clear-cache process.
#
# # Output escaping settings
# escaping_strategy: bc # Determines how variables are made available to templates. Accepted values: bc, both, on, off. The value off deactivates escaping completely and gives a slight boost.
# escaping_method: ESC_ENTITIES # Function or helper used for escaping. Accepted values: ESC_RAW, ESC_ENTITIES, ESC_JS, ESC_JS_NO_ENTITIES.
#
# # Routing settings
# relative_url_root: # Default URL prefix. Use this when your symfony project is installed in a sub directory of the apache document root.
# suffix: . # Default suffix for generated URLs. If set to a single dot (.), no suffix is added. Possible values: .html, .php, and so on.
# no_script_name: off # Enable the front controller name in generated URLs
#
# # Validation settings, used for error generation by the Validation helper
# validation_error_prefix: ' &darr;&nbsp;'
# validation_error_suffix: ' &nbsp;&darr;'
# validation_error_class: form_error
# validation_error_id_prefix: error_for_
#
# # Cache settings
# cache: off # Enable the template cache
# etag: on # Enable etag handling
#
# # Logging and debugging settings
# web_debug: off # Enable the web debug toolbar
# error_reporting: <?php echo (E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR)."\n" ?> # Determines which events are logged. The default value is E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR = 341
#
# # Assets paths
# rich_text_js_dir: js/tiny_mce
# prototype_web_dir: /sf/prototype
# admin_web_dir: /sf/sf_admin
# web_debug_web_dir: /sf/sf_web_debug
#
# # Helpers included in all templates by default
# standard_helpers: [Partial, Cache, Form]
#
# # Activated modules from plugins or from the symfony core
# enabled_modules: [default]
#
# # Charset used for the response
# charset: utf-8
#
# # Miscellaneous
# strip_comments: on # Remove comments in core framework classes as defined in the core_compile.yml
# autoloading_functions: ~ # Functions called when a class is requested and this it is not already loaded. Expects an array of callables. Used by the framework bridges.
# timeout: 1800 # Session timeout, in seconds
# max_forwards: 5
# path_info_array: SERVER
# path_info_key: PATH_INFO
# url_format: PATH
#
# # ORM
# orm: propel

View File

@@ -0,0 +1,17 @@
default:
http_metas:
content-type: text/html
metas:
title: 'Pro Active English: Site Administration'
robots: index, follow
description: Administration site for Pro Active English website
keywords: pro active english, administration
language: en
stylesheets: [main, admin, form]
javascripts: []
has_layout: on
layout: layout

View File

@@ -0,0 +1,8 @@
<?php
class adminConfiguration extends sfApplicationConfiguration
{
public function configure()
{
}
}

View File

@@ -0,0 +1,2 @@
# default values
#all:

View File

@@ -0,0 +1,4 @@
default:
enabled: off
with_layout: false
lifetime: 86400

View File

@@ -0,0 +1,8 @@
<?php
// include project configuration
include(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
// symfony bootstraping
require_once($sf_symfony_lib_dir.'/util/sfCore.class.php');
sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir);

View File

@@ -0,0 +1,35 @@
cli:
controller:
class: sfConsoleController
request:
class: sfConsoleRequest
response:
class: sfConsoleResponse
test:
storage:
class: sfSessionTestStorage
#all:
# controller:
# class: sfFrontWebController
#
# request:
# class: sfWebRequest
#
# response:
# class: sfWebResponse
#
# user:
# class: myUser
#
# storage:
# class: sfSessionStorage
# param:
# session_name: symfony
#
# view_cache:
# class: sfFileCache
# param:
# automaticCleaningFactor: 0
# cacheDir: %SF_TEMPLATE_CACHE_DIR%

View File

@@ -0,0 +1,10 @@
rendering: ~
web_debug: ~
security: ~
# generally, you will want to insert your own filters here
cache: ~
common: ~
flash: ~
execution: ~

View File

@@ -0,0 +1,7 @@
#all:
# default_culture: en
# source: XLIFF
# debug: off
# cache: on
# untranslated_prefix: "[T]"
# untranslated_suffix: "[/T]"

View File

@@ -0,0 +1,22 @@
prod:
enabled: off
level: err
rotate: on
purge: off
#all:
# enabled: on
# level: debug
# rotate: off
# period: 7
# history: 10
# purge: on
# loggers:
# sf_web_debug:
# class: sfWebDebugLogger
# param:
# condition: %SF_WEB_DEBUG%
# sf_file_debug:
# class: sfFileLogger
# param:
# file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log

View File

@@ -0,0 +1,15 @@
# default rules
homepage:
url: /
param: { module: default, action: index }
default_symfony:
url: /symfony/:action/*
param: { module: default }
default_index:
url: /:module
param: { action: index }
default:
url: /:module/:action/*

View File

@@ -0,0 +1,8 @@
all:
is_secure: on
credentials: admin
.actions:
login_module: default
login_action: login
secure_module: default
secure_action: secure

View File

@@ -0,0 +1,106 @@
all:
.settings:
rich_text_js_dir: js/tiny_mce
prod:
.settings:
no_script_name: off
dev:
.settings:
error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?>
web_debug: on
cache: off
no_script_name: off
etag: off
test:
.settings:
error_reporting: <?php echo (E_ALL | E_STRICT & ~E_NOTICE)."\n" ?>
cache: off
web_debug: off
no_script_name: off
etag: off
#all:
# .actions:
# default_module: default # Default module and action to be called when
# default_action: index # A routing rule doesn't set it
#
# error_404_module: default # To be called when a 404 error is raised
# error_404_action: error404 # Or when the requested URL doesn't match any route
#
# login_module: default # To be called when a non-authenticated user
# login_action: login # Tries to access a secure page
#
# secure_module: default # To be called when a user doesn't have
# secure_action: secure # The credentials required for an action
#
# module_disabled_module: default # To be called when a user requests
# module_disabled_action: disabled # A module disabled in the module.yml
#
# unavailable_module: default # To be called when a user requests a page
# unavailable_action: unavailable # From an application disabled via the available setting below
#
# .settings:
# available: on # Enable the whole application. Switch to off to redirect all requests to the unavailable module and action.
#
# # Optional features. Deactivating unused features boots performance a bit.
# use_database: on # Enable database manager. Set to off if you don't use a database.
# use_security: on # Enable security features (login and credentials). Set to off for public applications.
# use_flash: on # Enable flash parameter feature. Set to off if you never use the set_flash() method in actions.
# i18n: off # Enable interface translation. Set to off if your application should not be translated.
# check_symfony_version: off # Enable check of symfony version for every request. Set to on to have symfony clear the cache automatically when the framework is upgraded. Set to off if you always clear the cache after an upgrade.
# use_process_cache: on # Enable symfony optimizations based on PHP accelerators. Set to off for tests or when you have enabled a PHP accelerator in your server but don't want symfony to use it internally.
# compressed: off # Enable PHP response compression. Set to on to compress the outgoing HTML via the PHP handler.
# check_lock: off # Enable the application lock system triggered by the clear-cache task. Set to on to have all requests redirected to the $sf_symfony_data_dir/web/arrors/unavailable.php page during the clear-cache process.
#
# # Output escaping settings
# escaping_strategy: bc # Determines how variables are made available to templates. Accepted values: bc, both, on, off. The value off deactivates escaping completely and gives a slight boost.
# escaping_method: ESC_ENTITIES # Function or helper used for escaping. Accepted values: ESC_RAW, ESC_ENTITIES, ESC_JS, ESC_JS_NO_ENTITIES.
#
# # Routing settings
# relative_url_root: # Default URL prefix. Use this when your symfony project is installed in a sub directory of the apache document root.
# suffix: . # Default suffix for generated URLs. If set to a single dot (.), no suffix is added. Possible values: .html, .php, and so on.
# no_script_name: off # Enable the front controller name in generated URLs
#
# # Validation settings, used for error generation by the Validation helper
# validation_error_prefix: ' &darr;&nbsp;'
# validation_error_suffix: ' &nbsp;&darr;'
# validation_error_class: form_error
# validation_error_id_prefix: error_for_
#
# # Cache settings
# cache: off # Enable the template cache
# etag: on # Enable etag handling
#
# # Logging and debugging settings
# web_debug: off # Enable the web debug toolbar
# error_reporting: <?php echo (E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR)."\n" ?> # Determines which events are logged. The default value is E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR = 341
#
# # Assets paths
# rich_text_js_dir: js/tiny_mce
# prototype_web_dir: /sf/prototype
# admin_web_dir: /sf/sf_admin
# web_debug_web_dir: /sf/sf_web_debug
#
# # Helpers included in all templates by default
# standard_helpers: [Partial, Cache, Form]
#
# # Activated modules from plugins or from the symfony core
# enabled_modules: [default]
#
# # Charset used for the response
# charset: utf-8
#
# # Miscellaneous
# strip_comments: on # Remove comments in core framework classes as defined in the core_compile.yml
# autoloading_functions: ~ # Functions called when a class is requested and this it is not already loaded. Expects an array of callables. Used by the framework bridges.
# timeout: 1800 # Session timeout, in seconds
# max_forwards: 5
# path_info_array: SERVER
# path_info_key: PATH_INFO
# url_format: PATH
#
# # ORM
# orm: propel

View File

@@ -0,0 +1,17 @@
default:
http_metas:
content-type: text/html
metas:
title: 'Pro Active English: Site Administration'
robots: index, follow
description: Administration site for Pro Active English website
keywords: pro active english, administration
language: en
stylesheets: [main, admin, form]
javascripts: []
has_layout: on
layout: layout

View File

@@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 65
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/i18n
END

View File

@@ -0,0 +1,28 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/i18n
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea

View File

@@ -0,0 +1,17 @@
K 25
svn:wc:ra_dav:version-url
V 64
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/lib
END
phMagick.php
K 25
svn:wc:ra_dav:version-url
V 77
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/lib/phMagick.php
END
myUser.class.php
K 25
svn:wc:ra_dav:version-url
V 81
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/lib/myUser.class.php
END

View File

@@ -0,0 +1,53 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/lib
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
phMagick.php
file
2009-05-28T02:26:42.000000Z
a49117248178af102c231984e22e8b2a
2009-05-28T02:14:48.119086Z
25
ben
has-props
myUser.class.php
file
2009-05-28T02:26:42.000000Z
215548048bbbdd100411afc00252a797
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,5 @@
K 14
svn:executable
V 0
END

View File

@@ -0,0 +1,5 @@
<?php
class myUser extends sfBasicSecurityUser
{
}

View File

@@ -0,0 +1,868 @@
<?php
/*
+--------------------------------------------------------------------------------------------+
| |
| HAVING PROBLEMS? NEED HELP? DOESN'T WORK? WANT TO SAY HELLO? |
| |
| WRITE ME, I'M GLAD TO HELP |
| |
| SVEN@FRANCODACOSTA.COM |
| |
+--------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------+
| PROJECT LINKS |
+--------------------------------------------------------------------------------------------+
| |
| USAGE EXAMPLES: |
| http://www.francodacosta.com/phmagick/usage-examples |
| |
| PROJECT HOME: |
| http://www.francodacosta.com/phmagick/ |
| |
| ANNOUNCEMENTS FEED: |
| http://www.francodacosta.com/category/announcements/feed |
| |
+--------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------+
| DISCLAIMER - LEGAL NOTICE - LICENCING (GPL V3) |
+--------------------------------------------------------------------------------------------+
| |
| This program is free software; you can redistribute it and/or modify it under the terms |
| of the GNU General Public License version 3 as published by the Free Software Foundation |
| |
| This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU General Public License for more details. |
| |
| You should have received a copy of the GNU General Public License along with this |
| program, if not you can obtain it at http://www.gnu.org/licenses/gpl-3.0.html |
| |
+--------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------+
| CHANGE LOG |
+--------------------------------------------------------------------------------------------+
| |
| 20081210 - added support for non transparent images like jpg to polaroid and |
| fakepolaroid (you can set the image background color) |
| - Added border color and shade color to polaroid |
| - set class vars to protrcted so phMagick can be sub-classed |
| |
| 20081124 - added ability to change system wide default text formats |
| - rotate() can now handle transparent backgrounds |
| |
| 20081122 - added -strip to resize (smaller file size) |
| - added default value for resize() $height |
| - added dropShadow() |
| - added roundCorner() |
| - added fakePolaroid() |
| - added polaroid() |
| |
| 20081121 - due to users requests invert() was renamed to inverColors(), |
| it makes more sence |
| |
| 20081020 - added function acquire() to get x frames/pages from video or pdf |
| |
| - updated class url to the correct one |
| |
| - bug:: added return this to setSource() |
| |
| - bug:: added return this to setWebserverPath() |
| |
| 20081010 - ontheFly() :: removed dependency of CONFIG class |
| (http://www.francodacosta.com/php/you-are-here-how-hard-can-it-be) |
| by adding setPhysicalPath() and setWebserverPath() |
| |
| - bug:: fixed setImageQuality() not returning $this |
| |
| - bug:: removed getHistory() extra return| |
| |
+--------------------------------------------------------------------------------------------+
*/
/**
* phMagick - Image manipulation with Image Magick
*
* @version 0.3.2
* @author Nuno Costa - sven@francodacosta.com
* @copyright Copyright (c) 2007
* @license GPL v3 - http://www.gnu.org/licenses/gpl-3.0.html
* @link http://www.francodacosta.com/phmagick
* @since 2008-03-13
*/
class phMagick{
protected $imageMagickPath = '';
protected $imageQuality = 80 ;
protected $originalFile = '';
protected $sourceFile = '';
protected $destinationFile = '';
protected $lastOutput = array();
protected $history = array();
protected $physicalPath = '';
protected $webPath = '';
public $debug = false ;
/*-------------- Private stuff -----------------*/
private function getBinary($binName){
return $this->getImageMagickPath() . $binName ;
}
private function execute($cmd){
$ret = 100 ;
$out = array();
exec($cmd,$out,$ret);
$this->setOutput( $out );
if ($this->debug) echo "<p> $cmd (rc: $ret)</p>";
return $ret ;
}
public function setHistory($path){
$this->history[] = $path ;
return $this;
}
private function clearHistory(){
unset ($this->history);
$this->history = array();
}
/*-------------- GETTERS & SETTERS -----------------*/
function setImageQuality($value){
$this->imageQuality = intval($value);
return $this;
}
function getImageQuality(){
return $this->imageQuality;
}
//-----------------
function setImageMagickPath ($path){
if($path != '')
if ( strpos($path, '/') < strlen($path))
$path .= '/';
$this->imageMagickPath = str_replace(' ','\ ',$path) ;
}
function getImageMagickPath (){
return $this->imageMagickPath;
}
//-----------------
function setSource ($path){
$this->sourceFile = str_replace(' ','\ ',$path) ;
return $this ;
}
function getSource (){
return $this->sourceFile ;
}
//-----------------
function setDestination ($path){
$path = str_replace(' ','\ ',$path) ;
$this->destinationFile = $path ;
return $this;
}
function getDestination (){
if( ($this->destinationFile == '')){
$source = $this->getSource() ;
$ext = end (explode('.', $source)) ;
$this->destinationFile = dirname($source) . '/' . md5(microtime()) . '.' . $ext;
}
return $this->destinationFile ;
}
//-----------------
/**
* Set the site root's physical bath ex: /home/francodacosta/phMagick
* @param $path
*/
function setPhysicalPath($path){
$this->physicalPath = $path ;
return $this ;
}
/**
* Set the site root's url ex: http://francodacosta.com/phMagick
* @param $path
*/
function setWebserverPath($url){
$this->webPath = $url ;
return $this ;
}
//-----------------
private function setOutput($out){
$this->lastOutput = $out ;
}
function getOutput(){
return $this->lastOutput;
}
/*-------------- THE GOODIES -----------------*/
/**
* @param String: The full path for the image
* @param String: The full path for the newlly created image
*/
function __construct($sourceFile='', $destinationFile=''){
$this->originalFile = $sourceFile;
$this->sourceFile = $sourceFile ;
$this->destinationFile = $destinationFile;
}
/**
* Resizes an image
*
* @param Mixed: The width of the image or '' to rezise porporcionallly to the height
* @param Mixed: The height of the image or '' to rezise porporcionallly to the width
* @param boolean: False: resizes the image to the exact porportions (aspect ration not preserved). True: preserves aspect ratio, only resises if image is bigger than specified measures
*/
function resize( $width, $height = 0, $exactDimentions = false){
$modifier = $exactDimentions ? '!' : '>';
//if $width or $height == 0 then we want to resize to fit one measure
//if any of them is sent as 0 resize will fail because we are trying to resize to 0 px
$width = $width == 0 ? '' : $width ;
$height = $height == 0 ? '' : $height ;
$cmd = $this->getBinary('convert');
$cmd .= ' -scale "'. $width .'x'. $height . $modifier ;
//$cmd .= ' -resize "'. $width .'x'. $height . $modifier ;
$cmd .= '" -quality '. $this->getImageQuality() ;
$cmd .= ' -strip ';
$cmd .= ' ' . $this->getSource() .' '. $this->getDestination();
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Creates a thumbnail of an image, if it doesn't exits
*
* Requires Config.php to convert path/url see http://www.francodacosta.com/php/you-are-here-how-hard-can-it-be
*
* @param String $imageUrl - The image Url
* @param Mixed $width - String / Integer
* @param Mixed $height - String / Integer
* @param boolean: False: resizes the image to the exact porportions (aspect ration not preserved). True: preserves aspect ratio, only resises if image is bigger than specified measures
*
* @return String - the thumbnail URL
*/
function onTheFly($imageUrl, $width, $height, $exactDimentions = false){
//convert web path to physical
$basePath = str_replace($this->webPath,$this->physicalPath, dirname($imageUrl) );
$sourceFile = $basePath .'/'. basename($imageUrl); ;
//naming the new thumbnail
$thumbnailFile = $basePath . '/'.$width . '_' . $height . '_' . basename($imageUrl) ;
$this->setSource($sourceFile);
$this->setDestination($thumbnailFile);
if (! file_exists($thumbnailFile)){
$this->resize($width, $height, $exactDimentions);
}
if (! file_exists($thumbnailFile)){
//if there was an error, just use original file
$thumbnailFile = $sourceFile;
}
//returning the thumbnail url
return str_replace($this->physicalPath, $this->webPath, $thumbnailFile );
}
function getDimentions(){
$cmd = $this->getBinary('identify');
$cmd .= ' -format "%w,%h" ' . $this->getSource();
$ret = $this->execute($cmd);
if($ret == 0){
$out = $this->getOutput();
return explode(',', $out[0]);
}
return false ;
}
/**
*
* Darkens an image, defualt: 50%
*
* @param $imageFile String - Physical path of the umage file
* @param $newFile String - Physical path of the generated image
* @param $alphaValue Integer - 100: back , 0: original color (no change)
* @return boolean - True: success
*/
function darken($alphaValue = 50){
$percent = 100 - (int) $alphaValue;
//get original file dimentions
list ($width, $height) = $this->getDimentions();
$cmd = $this->getBinary('composite');
$cmd .= ' -blend ' . $percent . ' ';
$cmd .= $this->getSource();
$cmd .= ' -size '. $width .'x'. $height.' xc:black ';
$cmd .= '-matte ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
*
* Brightens an image, defualt: 50%
*
* @param $imageFile String - Physical path of the umage file
* @param $newFile String - Physical path of the generated image
* @param $alphaValue Integer - 100: white , 0: original color (no change)
* @return boolean - True: success
*/
function brighten($alphaValue = 50){
$percent = 100 - (int) $alphaValue;
//get original file dimentions
list ($width, $height) = $this->getDimentions();
$cmd = $this->getBinary('composite');
$cmd .= ' -blend ' . $percent . ' ';
$cmd .= $this->getSource();
$cmd .= ' -size '. $width .'x'. $height.' xc:white ';
$cmd .= '-matte ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
*
* Joins severall imagens in one tab strip
*
* @param $paths Array of Strings - the paths of the images to join
*/
function tabStrip( Array $paths = null){
if( is_null($paths) ) {
$paths = $this->getHistory(phMagickHistory::returnArray);
}
$cmd = $this->getBinary('montage');
$cmd .= ' -geometry x+0+0 -tile x1 ';
$cmd .= implode(' ', $paths);
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Draws an image with the submited string, usefull for water marks
*
* @param $text String - the text to draw an image from
* @param $format phMagickTextObject - the text configuration
*/
function fromString($text = '', phMagickTextObject $format = null){
if(is_null($format)) $format = &new phMagickTextObject();
$cmd = $this->getBinary('convert');
if ($format->background !== false)
$cmd .= ' -background "' . $format->background . '"';
if ($format->color !== false)
$cmd .= ' -fill "' . $format->color . '"' ;
if ($format->font !== false)
$cmd .= ' -font ' . $format->font ;
if ($format->fontSize !== false)
$cmd .= ' -pointsize ' . $format->fontSize ;
if (($format->pText != '') && ($text = '') )
$text = $format->pText ;
$cmd .= ' label:"'. $text .'"';
$cmd .= ' ' . $this->getDestination();
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Add's an watermark to an image
*
* @param $watermarkImage String - Image path
* @param $gravity phMagickGravity - The placement of the watermark
* @param $transparency Integer - 1 to 100 the tranparency of the watermark (100 = opaque)
*/
function watermark($watermarkImage, $gravity, $transparency = 50){
//composite -gravity SouthEast watermark.png original-image.png output-image.png
$cmd = $this->getBinary('composite');
$cmd .= ' -dissolve ' . $transparency ;
$cmd .= ' -gravity ' . $gravity ;
$cmd .= ' ' . $watermarkImage ;
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Rotates an image X degrees
*
* @param $degrees Integer
*/
function rotate ($degrees){
$cmd = $this->getBinary('convert');
$cmd .= ' -rotate ' . $degrees ;
$cmd .= ' -background "none" ' . $this->getSource() ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Flips the image vericaly
* @return unknown_type
*/
function flipVertical(){
$cmd = $this->getBinary('convert');
$cmd .= ' -flip ' ;
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Flips the image horizonaly
* @return unknown_type
*/
function flipHorizontal(){
$cmd = $this->getBinary('convert');
$cmd .= ' -flop ' ;
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
*
* @param $width Integer
* @param $height Integer
* @param $top Integer - The Y coordinate for the left corner of the crop rectangule
* @param $left Integer - The X coordinate for the left corner of the crop rectangule
* @param $gravity phMagickGravity - The initial placement of the crop rectangule
* @return unknown_type
*/
function crop($width, $height, $top = 0, $left = 0, $gravity = 'center'){
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
if (($gravity != '')|| ($gravity != phMagickGravity::None) ) $cmd .= ' -gravity ' . $gravity ;
$cmd .= ' -crop ' . (int)$width . 'x'.(int)$height ;
$cmd .= '+' . $left.'+'.$top;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Convert's the image to grayscale
*/
function toGrayScale(){
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' -colorspace Gray ';
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Inverts the image colors
*/
function invertColors(){
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' -negate ';
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
function getHistory( $type = Null ){
switch ($type){
case phMagickHistory::returnCsv:
return explode(',', array_unique($this->history));
break;
default:
case phMagickHistory::returnArray :
return array_unique($this->history) ;
break;
}
}
function clear($clearTempFiles = 2){
//clears history and destnation
//removes any files used in history ;
if($clearTempFiles > 0){
if ($clearTempFiles == phMagickClear::keepLastFile) {
// the last file in history will be kept
// usually the last file is the result
array_pop($this->history);
}
foreach($this->getHistory(phMagickHistory::returnArray) as $file){
@unlink($file);
}
}
$this->setDestination('');
$this->clearHistory();
return $this ;
}
function copy($newFileName = ''){
//emulates copy of destination file, so we can performs actions on a new file without changing the current one
//sets orig = destination and set dest to $newFileName
$this->setSource($this->getDestination());
$this->setDestination($newFileName);
return $this;
}
function restart($newFileName = ''){
//emulates copy of source file, so we can performs actions on a new file without changing the current one
// sets orig to the orig file set at startup and set dest to $newFileName
$this->setSource($this->originalFile);
$this->setDestination($newFileName);
return $this;
}
/**
* Attempts to create an image(s) from a File (PDF & Avi are supported on most systems)
* it grabs the first frame / page from the source file
* @param $file String - the path to the file
* @param $ext String - the extention of the generated image
*/
function acquireFrame($file){
$cmd = 'echo "" | '; //just a workarround for videos,
// imagemagick first converts all frames then deletes all but the first
$cmd .= $this->getBinary('convert');
$cmd .= ' ' . $file .'[0]' ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
function roundCorners($i = 15){
//original idea from Leif <20><>strand <leif@sitelogic.fi>
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' \( +clone -threshold -1 ' ;
$cmd .= "-draw 'fill black polygon 0,0 0,$i $i,0 fill white circle $i,$i $i,0' ";
$cmd .= '\( +clone -flip \) -compose Multiply -composite ';
$cmd .= '\( +clone -flop \) -compose Multiply -composite ';
$cmd .= '\) +matte -compose CopyOpacity -composite ' ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
function dropShaddow($color = '#000', $offset = 4, $transparency = 60){
$cmd = $this->getBinary('convert');
$cmd .= ' -page +4+4 ' . $this->getSource() ;
$cmd .= ' -matte \( +clone -background "'. $color .'" -shadow '. $transparency.'x4+'.$offset.'+'.$offset.' \) +swap ';
$cmd .= ' -background none -mosaic ';
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Fake polaroid effect (white border and rotation)
*
* @param $rotation Int - The imahe will be rotatex x degrees
* @param $borderColor - Polaroid border (ussuay white)
* @param $shaddowColor - drop shaddow color
* @param $background - Image background color (use for jpegs or images that do not support transparency or you will end up with a black background)
*/
function fakePolaroid($rotate = 6 , $borderColor = "#fff", $background ="none"){
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' -bordercolor "'. $borderColor.'" -border 6 -bordercolor grey60 -border 1 -background "none" -rotate '. $rotate .' -background black \( +clone -shadow 60x4+4+4 \) +swap -background "'. $background.'" -flatten';
$cmd .= ' ' . $this->getDestination() ;
//echo $cmd .'<br>';;
$ret = $this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Real polaroid efect, supports text
*
* @param $format phMagickTextObject - text format for image label
* @param $rotation Int - The imahe will be rotatex x degrees
* @param $borderColor - Polaroid border (ussuay white)
* @param $shaddowColor - drop shaddow color
* @param $background - Image background color (use for jpegs or images that do not support transparency or you will end up with a black background)
*/
function polaroid( $format = null, $rotation= 6, $borderColor="snow", $shaddowColor = "black", $background="none"){
if (get_class($format) == 'phMagickTextObject' ){
//
}else{
$tmp = new phMagickTextObject();
$tmp->text($format);
$format = $tmp ;
}
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
if ($format->background !== false)
$cmd .= ' -background "' . $format->background . '"';
if ($format->color !== false)
$cmd .= ' -fill "' . $format->color . '"' ;
if ($format->font !== false)
$cmd .= ' -font ' . $format->font ;
if ($format->fontSize !== false)
$cmd .= ' -pointsize ' . $format->fontSize ;
if ($format->pGravity !== false)
$cmd .= ' -gravity ' . $format->pGravity ;
if ($format->pText != '')
$cmd .= ' -set caption "' . $format->pText .'"';
$cmd .= ' -bordercolor "'. $borderColor.'" -background "'.$background.'" -polaroid ' . $rotation .' -background "'. $background.'" -flatten ';
$cmd .= ' ' . $this->getDestination() ;
//echo $cmd .'<br>';;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
}
/*********************************************
* Auxiliar classes / objects / values
**********************************************/
class phMagickTextObjectDefaults{
public static $fontSize ='12';
public static $font = false;
public static $color = '#000';
public static $background = false;
public static $gravity = phMagickGravity::Center; //ignored in fromString()
public $Text = '';
private function __construct(){}
}
class phMagickTextObject {
private $fontSize;
private $font;
private $color;
private $background;
private $pGravity; //ignored in fromString()
private $pText = '';
public function __construct(){
$this->fontSize = phMagickTextObjectDefaults::$fontSize;
$this->font = phMagickTextObjectDefaults::$font;
$this->color = phMagickTextObjectDefaults::$color ;
$this->background = phMagickTextObjectDefaults::$background;
$this->pGravity = phMagickTextObjectDefaults::$gravity;
}
function defaultFontSize($value){
phMagickTextObjectDefaults::$fontSize = $value;
}
function defaultFont($value){
phMagickTextObjectDefaults::$font = $value;
}
function defaultColor($value){
phMagickTextObjectDefaults::$color = $value;
}
function defaultBackground($value){
phMagickTextObjectDefaults::$background = $value;
}
function defaultGravity($value){
phMagickTextObjectDefaults::$gravity = $value;
}
function fontSize($i){
$this->fontSize = $i ;
return $this;
}
function font($i){
$this->font = $i ;
return $this;
}
function color($i){
$this->color = $i ;
return $this;
}
function background($i){
$this->background = $i ;
return $this;
}
function __get($var){
return $this->$var ;
}
function gravity( $gravity){
$this->pGravity = $gravity;
return $this ;
}
function text( $text){
$this->pText = $text;
return $this ;
}
}
class phMagickGravity{
const None = 'None' ;
const Center = 'Center' ;
const East = 'East' ;
const Forget = 'Forget' ;
const NorthEast = 'NorthEast' ;
const North = 'North' ;
const NorthWest = 'NorthWest' ;
const SouthEast = 'SouthEast' ;
const South = 'South' ;
const SouthWest = 'SouthWest' ;
const West = 'West' ;
private function __construct(){}
}
class phMagickHistory{
const returnArray = 0 ;
const returnCsv = 1 ;
private function __construct(){}
}
class phMagickClear {
const keepAllFiles = 0;
const deletAllFiles = 1;
const keepLastFile = 2;
private function __construct(){}
}
?>

View File

@@ -0,0 +1,5 @@
<?php
class myUser extends sfBasicSecurityUser
{
}

View File

@@ -0,0 +1,868 @@
<?php
/*
+--------------------------------------------------------------------------------------------+
| |
| HAVING PROBLEMS? NEED HELP? DOESN'T WORK? WANT TO SAY HELLO? |
| |
| WRITE ME, I'M GLAD TO HELP |
| |
| SVEN@FRANCODACOSTA.COM |
| |
+--------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------+
| PROJECT LINKS |
+--------------------------------------------------------------------------------------------+
| |
| USAGE EXAMPLES: |
| http://www.francodacosta.com/phmagick/usage-examples |
| |
| PROJECT HOME: |
| http://www.francodacosta.com/phmagick/ |
| |
| ANNOUNCEMENTS FEED: |
| http://www.francodacosta.com/category/announcements/feed |
| |
+--------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------+
| DISCLAIMER - LEGAL NOTICE - LICENCING (GPL V3) |
+--------------------------------------------------------------------------------------------+
| |
| This program is free software; you can redistribute it and/or modify it under the terms |
| of the GNU General Public License version 3 as published by the Free Software Foundation |
| |
| This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU General Public License for more details. |
| |
| You should have received a copy of the GNU General Public License along with this |
| program, if not you can obtain it at http://www.gnu.org/licenses/gpl-3.0.html |
| |
+--------------------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------------------+
| CHANGE LOG |
+--------------------------------------------------------------------------------------------+
| |
| 20081210 - added support for non transparent images like jpg to polaroid and |
| fakepolaroid (you can set the image background color) |
| - Added border color and shade color to polaroid |
| - set class vars to protrcted so phMagick can be sub-classed |
| |
| 20081124 - added ability to change system wide default text formats |
| - rotate() can now handle transparent backgrounds |
| |
| 20081122 - added -strip to resize (smaller file size) |
| - added default value for resize() $height |
| - added dropShadow() |
| - added roundCorner() |
| - added fakePolaroid() |
| - added polaroid() |
| |
| 20081121 - due to users requests invert() was renamed to inverColors(), |
| it makes more sence |
| |
| 20081020 - added function acquire() to get x frames/pages from video or pdf |
| |
| - updated class url to the correct one |
| |
| - bug:: added return this to setSource() |
| |
| - bug:: added return this to setWebserverPath() |
| |
| 20081010 - ontheFly() :: removed dependency of CONFIG class |
| (http://www.francodacosta.com/php/you-are-here-how-hard-can-it-be) |
| by adding setPhysicalPath() and setWebserverPath() |
| |
| - bug:: fixed setImageQuality() not returning $this |
| |
| - bug:: removed getHistory() extra return| |
| |
+--------------------------------------------------------------------------------------------+
*/
/**
* phMagick - Image manipulation with Image Magick
*
* @version 0.3.2
* @author Nuno Costa - sven@francodacosta.com
* @copyright Copyright (c) 2007
* @license GPL v3 - http://www.gnu.org/licenses/gpl-3.0.html
* @link http://www.francodacosta.com/phmagick
* @since 2008-03-13
*/
class phMagick{
protected $imageMagickPath = '';
protected $imageQuality = 80 ;
protected $originalFile = '';
protected $sourceFile = '';
protected $destinationFile = '';
protected $lastOutput = array();
protected $history = array();
protected $physicalPath = '';
protected $webPath = '';
public $debug = false ;
/*-------------- Private stuff -----------------*/
private function getBinary($binName){
return $this->getImageMagickPath() . $binName ;
}
private function execute($cmd){
$ret = 100 ;
$out = array();
exec($cmd,$out,$ret);
$this->setOutput( $out );
if ($this->debug) echo "<p> $cmd (rc: $ret)</p>";
return $ret ;
}
public function setHistory($path){
$this->history[] = $path ;
return $this;
}
private function clearHistory(){
unset ($this->history);
$this->history = array();
}
/*-------------- GETTERS & SETTERS -----------------*/
function setImageQuality($value){
$this->imageQuality = intval($value);
return $this;
}
function getImageQuality(){
return $this->imageQuality;
}
//-----------------
function setImageMagickPath ($path){
if($path != '')
if ( strpos($path, '/') < strlen($path))
$path .= '/';
$this->imageMagickPath = str_replace(' ','\ ',$path) ;
}
function getImageMagickPath (){
return $this->imageMagickPath;
}
//-----------------
function setSource ($path){
$this->sourceFile = str_replace(' ','\ ',$path) ;
return $this ;
}
function getSource (){
return $this->sourceFile ;
}
//-----------------
function setDestination ($path){
$path = str_replace(' ','\ ',$path) ;
$this->destinationFile = $path ;
return $this;
}
function getDestination (){
if( ($this->destinationFile == '')){
$source = $this->getSource() ;
$ext = end (explode('.', $source)) ;
$this->destinationFile = dirname($source) . '/' . md5(microtime()) . '.' . $ext;
}
return $this->destinationFile ;
}
//-----------------
/**
* Set the site root's physical bath ex: /home/francodacosta/phMagick
* @param $path
*/
function setPhysicalPath($path){
$this->physicalPath = $path ;
return $this ;
}
/**
* Set the site root's url ex: http://francodacosta.com/phMagick
* @param $path
*/
function setWebserverPath($url){
$this->webPath = $url ;
return $this ;
}
//-----------------
private function setOutput($out){
$this->lastOutput = $out ;
}
function getOutput(){
return $this->lastOutput;
}
/*-------------- THE GOODIES -----------------*/
/**
* @param String: The full path for the image
* @param String: The full path for the newlly created image
*/
function __construct($sourceFile='', $destinationFile=''){
$this->originalFile = $sourceFile;
$this->sourceFile = $sourceFile ;
$this->destinationFile = $destinationFile;
}
/**
* Resizes an image
*
* @param Mixed: The width of the image or '' to rezise porporcionallly to the height
* @param Mixed: The height of the image or '' to rezise porporcionallly to the width
* @param boolean: False: resizes the image to the exact porportions (aspect ration not preserved). True: preserves aspect ratio, only resises if image is bigger than specified measures
*/
function resize( $width, $height = 0, $exactDimentions = false){
$modifier = $exactDimentions ? '!' : '>';
//if $width or $height == 0 then we want to resize to fit one measure
//if any of them is sent as 0 resize will fail because we are trying to resize to 0 px
$width = $width == 0 ? '' : $width ;
$height = $height == 0 ? '' : $height ;
$cmd = $this->getBinary('convert');
$cmd .= ' -scale "'. $width .'x'. $height . $modifier ;
//$cmd .= ' -resize "'. $width .'x'. $height . $modifier ;
$cmd .= '" -quality '. $this->getImageQuality() ;
$cmd .= ' -strip ';
$cmd .= ' ' . $this->getSource() .' '. $this->getDestination();
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Creates a thumbnail of an image, if it doesn't exits
*
* Requires Config.php to convert path/url see http://www.francodacosta.com/php/you-are-here-how-hard-can-it-be
*
* @param String $imageUrl - The image Url
* @param Mixed $width - String / Integer
* @param Mixed $height - String / Integer
* @param boolean: False: resizes the image to the exact porportions (aspect ration not preserved). True: preserves aspect ratio, only resises if image is bigger than specified measures
*
* @return String - the thumbnail URL
*/
function onTheFly($imageUrl, $width, $height, $exactDimentions = false){
//convert web path to physical
$basePath = str_replace($this->webPath,$this->physicalPath, dirname($imageUrl) );
$sourceFile = $basePath .'/'. basename($imageUrl); ;
//naming the new thumbnail
$thumbnailFile = $basePath . '/'.$width . '_' . $height . '_' . basename($imageUrl) ;
$this->setSource($sourceFile);
$this->setDestination($thumbnailFile);
if (! file_exists($thumbnailFile)){
$this->resize($width, $height, $exactDimentions);
}
if (! file_exists($thumbnailFile)){
//if there was an error, just use original file
$thumbnailFile = $sourceFile;
}
//returning the thumbnail url
return str_replace($this->physicalPath, $this->webPath, $thumbnailFile );
}
function getDimentions(){
$cmd = $this->getBinary('identify');
$cmd .= ' -format "%w,%h" ' . $this->getSource();
$ret = $this->execute($cmd);
if($ret == 0){
$out = $this->getOutput();
return explode(',', $out[0]);
}
return false ;
}
/**
*
* Darkens an image, defualt: 50%
*
* @param $imageFile String - Physical path of the umage file
* @param $newFile String - Physical path of the generated image
* @param $alphaValue Integer - 100: back , 0: original color (no change)
* @return boolean - True: success
*/
function darken($alphaValue = 50){
$percent = 100 - (int) $alphaValue;
//get original file dimentions
list ($width, $height) = $this->getDimentions();
$cmd = $this->getBinary('composite');
$cmd .= ' -blend ' . $percent . ' ';
$cmd .= $this->getSource();
$cmd .= ' -size '. $width .'x'. $height.' xc:black ';
$cmd .= '-matte ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
*
* Brightens an image, defualt: 50%
*
* @param $imageFile String - Physical path of the umage file
* @param $newFile String - Physical path of the generated image
* @param $alphaValue Integer - 100: white , 0: original color (no change)
* @return boolean - True: success
*/
function brighten($alphaValue = 50){
$percent = 100 - (int) $alphaValue;
//get original file dimentions
list ($width, $height) = $this->getDimentions();
$cmd = $this->getBinary('composite');
$cmd .= ' -blend ' . $percent . ' ';
$cmd .= $this->getSource();
$cmd .= ' -size '. $width .'x'. $height.' xc:white ';
$cmd .= '-matte ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
*
* Joins severall imagens in one tab strip
*
* @param $paths Array of Strings - the paths of the images to join
*/
function tabStrip( Array $paths = null){
if( is_null($paths) ) {
$paths = $this->getHistory(phMagickHistory::returnArray);
}
$cmd = $this->getBinary('montage');
$cmd .= ' -geometry x+0+0 -tile x1 ';
$cmd .= implode(' ', $paths);
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Draws an image with the submited string, usefull for water marks
*
* @param $text String - the text to draw an image from
* @param $format phMagickTextObject - the text configuration
*/
function fromString($text = '', phMagickTextObject $format = null){
if(is_null($format)) $format = &new phMagickTextObject();
$cmd = $this->getBinary('convert');
if ($format->background !== false)
$cmd .= ' -background "' . $format->background . '"';
if ($format->color !== false)
$cmd .= ' -fill "' . $format->color . '"' ;
if ($format->font !== false)
$cmd .= ' -font ' . $format->font ;
if ($format->fontSize !== false)
$cmd .= ' -pointsize ' . $format->fontSize ;
if (($format->pText != '') && ($text = '') )
$text = $format->pText ;
$cmd .= ' label:"'. $text .'"';
$cmd .= ' ' . $this->getDestination();
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Add's an watermark to an image
*
* @param $watermarkImage String - Image path
* @param $gravity phMagickGravity - The placement of the watermark
* @param $transparency Integer - 1 to 100 the tranparency of the watermark (100 = opaque)
*/
function watermark($watermarkImage, $gravity, $transparency = 50){
//composite -gravity SouthEast watermark.png original-image.png output-image.png
$cmd = $this->getBinary('composite');
$cmd .= ' -dissolve ' . $transparency ;
$cmd .= ' -gravity ' . $gravity ;
$cmd .= ' ' . $watermarkImage ;
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Rotates an image X degrees
*
* @param $degrees Integer
*/
function rotate ($degrees){
$cmd = $this->getBinary('convert');
$cmd .= ' -rotate ' . $degrees ;
$cmd .= ' -background "none" ' . $this->getSource() ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Flips the image vericaly
* @return unknown_type
*/
function flipVertical(){
$cmd = $this->getBinary('convert');
$cmd .= ' -flip ' ;
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Flips the image horizonaly
* @return unknown_type
*/
function flipHorizontal(){
$cmd = $this->getBinary('convert');
$cmd .= ' -flop ' ;
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
*
* @param $width Integer
* @param $height Integer
* @param $top Integer - The Y coordinate for the left corner of the crop rectangule
* @param $left Integer - The X coordinate for the left corner of the crop rectangule
* @param $gravity phMagickGravity - The initial placement of the crop rectangule
* @return unknown_type
*/
function crop($width, $height, $top = 0, $left = 0, $gravity = 'center'){
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
if (($gravity != '')|| ($gravity != phMagickGravity::None) ) $cmd .= ' -gravity ' . $gravity ;
$cmd .= ' -crop ' . (int)$width . 'x'.(int)$height ;
$cmd .= '+' . $left.'+'.$top;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Convert's the image to grayscale
*/
function toGrayScale(){
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' -colorspace Gray ';
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Inverts the image colors
*/
function invertColors(){
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' -negate ';
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
function getHistory( $type = Null ){
switch ($type){
case phMagickHistory::returnCsv:
return explode(',', array_unique($this->history));
break;
default:
case phMagickHistory::returnArray :
return array_unique($this->history) ;
break;
}
}
function clear($clearTempFiles = 2){
//clears history and destnation
//removes any files used in history ;
if($clearTempFiles > 0){
if ($clearTempFiles == phMagickClear::keepLastFile) {
// the last file in history will be kept
// usually the last file is the result
array_pop($this->history);
}
foreach($this->getHistory(phMagickHistory::returnArray) as $file){
@unlink($file);
}
}
$this->setDestination('');
$this->clearHistory();
return $this ;
}
function copy($newFileName = ''){
//emulates copy of destination file, so we can performs actions on a new file without changing the current one
//sets orig = destination and set dest to $newFileName
$this->setSource($this->getDestination());
$this->setDestination($newFileName);
return $this;
}
function restart($newFileName = ''){
//emulates copy of source file, so we can performs actions on a new file without changing the current one
// sets orig to the orig file set at startup and set dest to $newFileName
$this->setSource($this->originalFile);
$this->setDestination($newFileName);
return $this;
}
/**
* Attempts to create an image(s) from a File (PDF & Avi are supported on most systems)
* it grabs the first frame / page from the source file
* @param $file String - the path to the file
* @param $ext String - the extention of the generated image
*/
function acquireFrame($file){
$cmd = 'echo "" | '; //just a workarround for videos,
// imagemagick first converts all frames then deletes all but the first
$cmd .= $this->getBinary('convert');
$cmd .= ' ' . $file .'[0]' ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
function roundCorners($i = 15){
//original idea from Leif <20><>strand <leif@sitelogic.fi>
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' \( +clone -threshold -1 ' ;
$cmd .= "-draw 'fill black polygon 0,0 0,$i $i,0 fill white circle $i,$i $i,0' ";
$cmd .= '\( +clone -flip \) -compose Multiply -composite ';
$cmd .= '\( +clone -flop \) -compose Multiply -composite ';
$cmd .= '\) +matte -compose CopyOpacity -composite ' ;
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
function dropShaddow($color = '#000', $offset = 4, $transparency = 60){
$cmd = $this->getBinary('convert');
$cmd .= ' -page +4+4 ' . $this->getSource() ;
$cmd .= ' -matte \( +clone -background "'. $color .'" -shadow '. $transparency.'x4+'.$offset.'+'.$offset.' \) +swap ';
$cmd .= ' -background none -mosaic ';
$cmd .= ' ' . $this->getDestination() ;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Fake polaroid effect (white border and rotation)
*
* @param $rotation Int - The imahe will be rotatex x degrees
* @param $borderColor - Polaroid border (ussuay white)
* @param $shaddowColor - drop shaddow color
* @param $background - Image background color (use for jpegs or images that do not support transparency or you will end up with a black background)
*/
function fakePolaroid($rotate = 6 , $borderColor = "#fff", $background ="none"){
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
$cmd .= ' -bordercolor "'. $borderColor.'" -border 6 -bordercolor grey60 -border 1 -background "none" -rotate '. $rotate .' -background black \( +clone -shadow 60x4+4+4 \) +swap -background "'. $background.'" -flatten';
$cmd .= ' ' . $this->getDestination() ;
//echo $cmd .'<br>';;
$ret = $this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
/**
* Real polaroid efect, supports text
*
* @param $format phMagickTextObject - text format for image label
* @param $rotation Int - The imahe will be rotatex x degrees
* @param $borderColor - Polaroid border (ussuay white)
* @param $shaddowColor - drop shaddow color
* @param $background - Image background color (use for jpegs or images that do not support transparency or you will end up with a black background)
*/
function polaroid( $format = null, $rotation= 6, $borderColor="snow", $shaddowColor = "black", $background="none"){
if (get_class($format) == 'phMagickTextObject' ){
//
}else{
$tmp = new phMagickTextObject();
$tmp->text($format);
$format = $tmp ;
}
$cmd = $this->getBinary('convert');
$cmd .= ' ' . $this->getSource() ;
if ($format->background !== false)
$cmd .= ' -background "' . $format->background . '"';
if ($format->color !== false)
$cmd .= ' -fill "' . $format->color . '"' ;
if ($format->font !== false)
$cmd .= ' -font ' . $format->font ;
if ($format->fontSize !== false)
$cmd .= ' -pointsize ' . $format->fontSize ;
if ($format->pGravity !== false)
$cmd .= ' -gravity ' . $format->pGravity ;
if ($format->pText != '')
$cmd .= ' -set caption "' . $format->pText .'"';
$cmd .= ' -bordercolor "'. $borderColor.'" -background "'.$background.'" -polaroid ' . $rotation .' -background "'. $background.'" -flatten ';
$cmd .= ' ' . $this->getDestination() ;
//echo $cmd .'<br>';;
$this->execute($cmd);
$this->setSource($this->getDestination());
$this->setHistory($this->getDestination());
return $this ;
}
}
/*********************************************
* Auxiliar classes / objects / values
**********************************************/
class phMagickTextObjectDefaults{
public static $fontSize ='12';
public static $font = false;
public static $color = '#000';
public static $background = false;
public static $gravity = phMagickGravity::Center; //ignored in fromString()
public $Text = '';
private function __construct(){}
}
class phMagickTextObject {
private $fontSize;
private $font;
private $color;
private $background;
private $pGravity; //ignored in fromString()
private $pText = '';
public function __construct(){
$this->fontSize = phMagickTextObjectDefaults::$fontSize;
$this->font = phMagickTextObjectDefaults::$font;
$this->color = phMagickTextObjectDefaults::$color ;
$this->background = phMagickTextObjectDefaults::$background;
$this->pGravity = phMagickTextObjectDefaults::$gravity;
}
function defaultFontSize($value){
phMagickTextObjectDefaults::$fontSize = $value;
}
function defaultFont($value){
phMagickTextObjectDefaults::$font = $value;
}
function defaultColor($value){
phMagickTextObjectDefaults::$color = $value;
}
function defaultBackground($value){
phMagickTextObjectDefaults::$background = $value;
}
function defaultGravity($value){
phMagickTextObjectDefaults::$gravity = $value;
}
function fontSize($i){
$this->fontSize = $i ;
return $this;
}
function font($i){
$this->font = $i ;
return $this;
}
function color($i){
$this->color = $i ;
return $this;
}
function background($i){
$this->background = $i ;
return $this;
}
function __get($var){
return $this->$var ;
}
function gravity( $gravity){
$this->pGravity = $gravity;
return $this ;
}
function text( $text){
$this->pText = $text;
return $this ;
}
}
class phMagickGravity{
const None = 'None' ;
const Center = 'Center' ;
const East = 'East' ;
const Forget = 'Forget' ;
const NorthEast = 'NorthEast' ;
const North = 'North' ;
const NorthWest = 'NorthWest' ;
const SouthEast = 'SouthEast' ;
const South = 'South' ;
const SouthWest = 'SouthWest' ;
const West = 'West' ;
private function __construct(){}
}
class phMagickHistory{
const returnArray = 0 ;
const returnCsv = 1 ;
private function __construct(){}
}
class phMagickClear {
const keepAllFiles = 0;
const deletAllFiles = 1;
const keepLastFile = 2;
private function __construct(){}
}
?>

View File

@@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 68
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
employee
dir
course
dir
event
dir
default
dir

View File

@@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 75
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course
END

View File

@@ -0,0 +1,37 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions
dir
config
dir
templates
dir

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 83
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/actions
END
actions.class.php
K 25
svn:wc:ra_dav:version-url
V 101
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/actions/actions.class.php
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/actions
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions.class.php
file
2009-05-28T02:26:42.000000Z
61fdd700fcf34c8a5c6170d39081b653
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,44 @@
<?php
/**
* course actions.
*
* @package pae
* @subpackage course
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class courseActions extends autocourseActions
{
/**
* Custom course saving functionality
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateCourseFromRequest()
{
parent::updateCourseFromRequest();
$request = $this->getRequest();
// save the titles
foreach($request->getParameter('title') as $culture => $value)
{
$this->course->setCulture($culture);
$this->course->setTitle($value);
}
// save the descriptions
foreach($request->getParameter('description') as $culture => $value)
{
$this->course->setCulture($culture);
$this->course->setDescription($value);
}
// create/save slug
$titles = $request->getParameter('title');
$slug = preg_replace("/\W+/", "", $titles['en']);
$this->course->setSlug($slug);
}
}

View File

@@ -0,0 +1,44 @@
<?php
/**
* course actions.
*
* @package pae
* @subpackage course
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class courseActions extends autocourseActions
{
/**
* Custom course saving functionality
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateCourseFromRequest()
{
parent::updateCourseFromRequest();
$request = $this->getRequest();
// save the titles
foreach($request->getParameter('title') as $culture => $value)
{
$this->course->setCulture($culture);
$this->course->setTitle($value);
}
// save the descriptions
foreach($request->getParameter('description') as $culture => $value)
{
$this->course->setCulture($culture);
$this->course->setDescription($value);
}
// create/save slug
$titles = $request->getParameter('title');
$slug = preg_replace("/\W+/", "", $titles['en']);
$this->course->setSlug($slug);
}
}

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 82
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/config
END
generator.yml
K 25
svn:wc:ra_dav:version-url
V 96
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/config/generator.yml
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/config
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
generator.yml
file
2009-05-28T02:26:43.000000Z
fc58038d54ccc8acfc45dc1dd77b09f6
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,25 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Course
theme: default
list:
max_per_page: 100
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [_listTitle]
fields:
list_title:
name: "Title"
edit:
fields:
edit_title:
name: "Titles"
edit_description:
name: "Descriptions"
display: [_editTitle, _editDescription]

View File

@@ -0,0 +1,25 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Course
theme: default
list:
max_per_page: 100
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [_listTitle]
fields:
list_title:
name: "Title"
edit:
fields:
edit_title:
name: "Titles"
edit_description:
name: "Descriptions"
display: [_editTitle, _editDescription]

View File

@@ -0,0 +1,23 @@
K 25
svn:wc:ra_dav:version-url
V 85
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates
END
_list_title.php
K 25
svn:wc:ra_dav:version-url
V 101
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates/_list_title.php
END
_edit_title.php
K 25
svn:wc:ra_dav:version-url
V 101
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates/_edit_title.php
END
_edit_description.php
K 25
svn:wc:ra_dav:version-url
V 107
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates/_edit_description.php
END

View File

@@ -0,0 +1,64 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/course/templates
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
_list_title.php
file
2009-05-28T02:26:43.000000Z
58d004a7c894adf24fbaee75fcfd0843
2009-05-28T02:14:48.119086Z
25
ben
_edit_title.php
file
2009-05-28T02:26:43.000000Z
c38aa1b69467b2eeebd72037cff81a74
2009-05-28T02:14:48.119086Z
25
ben
_edit_description.php
file
2009-05-28T02:26:43.000000Z
d855c9d9b576750c203b89a3a1a68a2f
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $course->setCulture('en'); echo textarea_tag('description[en]', $course->getDescription(), 'rich=true size=100x12') ?>
</p>
<p>
<label>German</label>
<?php $course->setCulture('de'); echo textarea_tag('description[de]', $course->getDescription(), 'rich=true size=100x12') ?>
</p>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $course->setCulture('en'); echo input_tag('title[en]', $course->getTitle(), 'size=60') ?>
</p>
<p>
<label>German</label>
<?php $course->setCulture('de'); echo input_tag('title[de]', $course->getTitle(), 'size=60') ?>
</p>

View File

@@ -0,0 +1 @@
<?php $course->setCulture('en'); echo $course->getTitle() ?>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $course->setCulture('en'); echo textarea_tag('description[en]', $course->getDescription(), 'rich=true size=100x12') ?>
</p>
<p>
<label>German</label>
<?php $course->setCulture('de'); echo textarea_tag('description[de]', $course->getDescription(), 'rich=true size=100x12') ?>
</p>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $course->setCulture('en'); echo input_tag('title[en]', $course->getTitle(), 'size=60') ?>
</p>
<p>
<label>German</label>
<?php $course->setCulture('de'); echo input_tag('title[de]', $course->getTitle(), 'size=60') ?>
</p>

View File

@@ -0,0 +1 @@
<?php $course->setCulture('en'); echo $course->getTitle() ?>

View File

@@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 76
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default
END

View File

@@ -0,0 +1,43 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions
dir
config
dir
lib
dir
validate
dir
templates
dir

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 84
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/actions
END
actions.class.php
K 25
svn:wc:ra_dav:version-url
V 102
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/actions/actions.class.php
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/actions
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions.class.php
file
2009-05-28T02:26:43.000000Z
c90760bc850ef949c089ea983e33eb8a
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,79 @@
<?php
/**
* default actions.
*
* @package pae
* @subpackage default
* @author Your name here
* @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
*/
class defaultActions extends sfActions
{
/**
* Executes index action
*
*/
public function executeIndex()
{
}
/**
* Login action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeLogin()
{
$request = $this->getRequest();
if($request->getMethod() != sfRequest::POST)
{
if($this->getUser()->isAuthenticated())
{
$this->redirect('default/index');
}
return sfView::SUCCESS;
}
else
{
$u = $this->getUser();
if($this->getRequestParameter('username') == 'admin'
&& $this->getRequestParameter('password') == 'gerard.1995')
{
$u->setAuthenticated(true);
$u->addCredential('admin');
$this->redirect('default/index');
}
else
{
$request->setError('Login failed', 'Username and/or password was not correct. Please try again.');
return sfView::SUCCESS;
}
}
}
/**
* Logout action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeLogout()
{
$this->getUser()->setAuthenticated(false);
$this->redirect('default/login');
}
/**
* Secure action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeSecure()
{
}
}

View File

@@ -0,0 +1,79 @@
<?php
/**
* default actions.
*
* @package pae
* @subpackage default
* @author Your name here
* @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
*/
class defaultActions extends sfActions
{
/**
* Executes index action
*
*/
public function executeIndex()
{
}
/**
* Login action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeLogin()
{
$request = $this->getRequest();
if($request->getMethod() != sfRequest::POST)
{
if($this->getUser()->isAuthenticated())
{
$this->redirect('default/index');
}
return sfView::SUCCESS;
}
else
{
$u = $this->getUser();
if($this->getRequestParameter('username') == 'admin'
&& $this->getRequestParameter('password') == 'gerard.1995')
{
$u->setAuthenticated(true);
$u->addCredential('admin');
$this->redirect('default/index');
}
else
{
$request->setError('Login failed', 'Username and/or password was not correct. Please try again.');
return sfView::SUCCESS;
}
}
}
/**
* Logout action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeLogout()
{
$this->getUser()->setAuthenticated(false);
$this->redirect('default/login');
}
/**
* Secure action
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function executeSecure()
{
}
}

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 83
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/config
END
security.yml
K 25
svn:wc:ra_dav:version-url
V 96
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/config/security.yml
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/config
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
security.yml
file
2009-05-28T02:26:43.000000Z
f73debeb69beec726489f372d4d8bc5d
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,5 @@
login:
is_secure: off
logout:
is_secure: off

View File

@@ -0,0 +1,5 @@
login:
is_secure: off
logout:
is_secure: off

View File

@@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 80
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/lib
END

View File

@@ -0,0 +1,28 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/lib
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea

View File

@@ -0,0 +1,23 @@
K 25
svn:wc:ra_dav:version-url
V 86
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates
END
secureSuccess.php
K 25
svn:wc:ra_dav:version-url
V 104
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates/secureSuccess.php
END
indexSuccess.php
K 25
svn:wc:ra_dav:version-url
V 103
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates/indexSuccess.php
END
loginSuccess.php
K 25
svn:wc:ra_dav:version-url
V 103
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates/loginSuccess.php
END

View File

@@ -0,0 +1,64 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/templates
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
secureSuccess.php
file
2009-05-28T02:26:43.000000Z
a3bb2d45ee548fe6234c42a58e0f47e3
2009-05-28T02:14:48.119086Z
25
ben
indexSuccess.php
file
2009-05-28T02:26:43.000000Z
d541fb2e9d80de632b49ee371f4a5db1
2009-05-28T02:14:48.119086Z
25
ben
loginSuccess.php
file
2009-05-28T02:26:43.000000Z
62daab3fe84cd59b4cd5d2e6796181ec
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,12 @@
<h2>Pro Active English Site Administration</h2>
<p>
Welcome to the administration section of Pro Active English.
</p>
<p>
Here, by clicking the links above, you can edit various sections of
the site.
</p>
<p>
If you need any help, don't hesitate to contact me at
<?php echo mail_to("ben.ramey@gmail.com", "ben.ramey@gmail.com") ?>.
</p>

View File

@@ -0,0 +1,21 @@
<h2>Welcome!</h2>
<p>
Please login below.
</p>
<?php echo form_tag('default/login', 'method=post') ?>
<fieldset class='login'>
<legend>Login</legend>
<div class='field'>
<label>Username</label>
<?php echo input_tag('username') ?>
</div>
<div class='field'>
<label>Password</label>
<?php echo input_password_tag('password') ?>
</div>
<div class='field field-submit'>
<label>&nbsp;</label>
<?php echo submit_tag('Login') ?>
</div>
</fieldset>
</form>

View File

@@ -0,0 +1,4 @@
<p>I'm sorry, you do not have the right credentials to access this page.</p>
<p>
<?php echo link_to('Logout', 'default/logout') ?>
</p>

View File

@@ -0,0 +1,12 @@
<h2>Pro Active English Site Administration</h2>
<p>
Welcome to the administration section of Pro Active English.
</p>
<p>
Here, by clicking the links above, you can edit various sections of
the site.
</p>
<p>
If you need any help, don't hesitate to contact me at
<?php echo mail_to("ben.ramey@gmail.com", "ben.ramey@gmail.com") ?>.
</p>

View File

@@ -0,0 +1,21 @@
<h2>Welcome!</h2>
<p>
Please login below.
</p>
<?php echo form_tag('default/login', 'method=post') ?>
<fieldset class='login'>
<legend>Login</legend>
<div class='field'>
<label>Username</label>
<?php echo input_tag('username') ?>
</div>
<div class='field'>
<label>Password</label>
<?php echo input_password_tag('password') ?>
</div>
<div class='field field-submit'>
<label>&nbsp;</label>
<?php echo submit_tag('Login') ?>
</div>
</fieldset>
</form>

View File

@@ -0,0 +1,4 @@
<p>I'm sorry, you do not have the right credentials to access this page.</p>
<p>
<?php echo link_to('Logout', 'default/logout') ?>
</p>

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 85
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/validate
END
login.yml
K 25
svn:wc:ra_dav:version-url
V 95
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/validate/login.yml
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/default/validate
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
login.yml
file
2009-05-28T02:26:43.000000Z
7287ce25163287baf28308764003d8a7
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,2 @@
fillin:
enabled: true

View File

@@ -0,0 +1,2 @@
fillin:
enabled: true

View File

@@ -0,0 +1,5 @@
K 25
svn:wc:ra_dav:version-url
V 77
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee
END

View File

@@ -0,0 +1,37 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions
dir
config
dir
templates
dir

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 85
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/actions
END
actions.class.php
K 25
svn:wc:ra_dav:version-url
V 103
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/actions/actions.class.php
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/actions
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
actions.class.php
file
2009-05-28T02:26:42.000000Z
d984a26589f4fd8d16b931057f6abbc7
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,71 @@
<?php
/**
* employee actions.
*
* @package pae
* @subpackage employee
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class employeeActions extends autoemployeeActions
{
/**
* Override of base-class method to handle saving
* the partial that does the picture edit field.
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateEmployeeFromRequest()
{
parent::updateEmployeeFromRequest();
$request = $this->getRequest();
// create the slug
$slug = strtolower(preg_replace("/\W+/", "", $this->employee->getName()));
$this->employee->setSlug($slug);
// save the titles which are also internationalized
foreach($request->getParameter('title') as $culture => $value)
{
$this->employee->setCulture($culture);
$this->employee->setTitle($value);
}
// save the biographies as we also use a custom template for them
foreach($request->getParameter('biography') as $culture => $value)
{
$this->employee->setCulture($culture);
$this->employee->setBiography($value);
}
// save the picture as we use a custom template for it
if($request->hasFiles())
{
foreach($request->getFileNames() as $fileName)
{
if($request->getFileSize($fileName) <= 0)
continue;
$employeeImagePath = sfConfig::get('sf_web_dir').'/images/whoarewe/employees';
$pictureName = str_replace(" ", "", $this->employee->getName()) . $request->getFileExtension($fileName);
$request->moveFile($fileName, $employeeImagePath.'/'.$pictureName);
// resize the image to the standard size
$image = new phMagick($employeeImagePath.'/'.$pictureName);
$image->setDestination($employeeImagePath.'/'.$pictureName);
$image->resize(200, 0);
// create the thumbnail image
$thumbnail = $image;
$thumbnail->setDestination($employeeImagePath.'/thumb_'.$pictureName);
$thumbnail->resize(70,0);
// save the image name in the employee
$this->employee->setPicture($pictureName);
}
}
}
}

View File

@@ -0,0 +1,71 @@
<?php
/**
* employee actions.
*
* @package pae
* @subpackage employee
* @author Your name here
* @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
*/
class employeeActions extends autoemployeeActions
{
/**
* Override of base-class method to handle saving
* the partial that does the picture edit field.
*
* @return void
* @author Benjamin Ramey <ben.ramey@gmail.com>
**/
public function updateEmployeeFromRequest()
{
parent::updateEmployeeFromRequest();
$request = $this->getRequest();
// create the slug
$slug = strtolower(preg_replace("/\W+/", "", $this->employee->getName()));
$this->employee->setSlug($slug);
// save the titles which are also internationalized
foreach($request->getParameter('title') as $culture => $value)
{
$this->employee->setCulture($culture);
$this->employee->setTitle($value);
}
// save the biographies as we also use a custom template for them
foreach($request->getParameter('biography') as $culture => $value)
{
$this->employee->setCulture($culture);
$this->employee->setBiography($value);
}
// save the picture as we use a custom template for it
if($request->hasFiles())
{
foreach($request->getFileNames() as $fileName)
{
if($request->getFileSize($fileName) <= 0)
continue;
$employeeImagePath = sfConfig::get('sf_web_dir').'/images/whoarewe/employees';
$pictureName = str_replace(" ", "", $this->employee->getName()) . $request->getFileExtension($fileName);
$request->moveFile($fileName, $employeeImagePath.'/'.$pictureName);
// resize the image to the standard size
$image = new phMagick($employeeImagePath.'/'.$pictureName);
$image->setDestination($employeeImagePath.'/'.$pictureName);
$image->resize(200, 0);
// create the thumbnail image
$thumbnail = $image;
$thumbnail->setDestination($employeeImagePath.'/thumb_'.$pictureName);
$thumbnail->resize(70,0);
// save the image name in the employee
$this->employee->setPicture($pictureName);
}
}
}
}

View File

@@ -0,0 +1,11 @@
K 25
svn:wc:ra_dav:version-url
V 84
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/config
END
generator.yml
K 25
svn:wc:ra_dav:version-url
V 98
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/config/generator.yml
END

View File

@@ -0,0 +1,40 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/config
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
generator.yml
file
2009-05-28T02:26:42.000000Z
9ae294c6d4751f1c8c9199305ce9219b
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,30 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Employee
theme: default
list:
max_per_page: 10
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [active, _listPicture, name, email, degrees, position_text]
edit:
fields:
position:
params: text_method=getPosition
edit_biography:
name: "Biographies"
edit_title:
name: "Titles"
edit_picture:
name: "Picture"
display:
Personal Information: [name, _editTitle, degrees, position, _editPicture]
Contact Information: [phone, cellphone, email]
Biography: [_editBiography]
Display Information: [active, sort_order]

View File

@@ -0,0 +1,30 @@
generator:
class: sfPropelAdminGenerator
param:
model_class: Employee
theme: default
list:
max_per_page: 10
object_actions:
_edit: ~
_delete: ~
actions:
_create: ~
display: [active, _listPicture, name, email, degrees, position_text]
edit:
fields:
position:
params: text_method=getPosition
edit_biography:
name: "Biographies"
edit_title:
name: "Titles"
edit_picture:
name: "Picture"
display:
Personal Information: [name, _editTitle, degrees, position, _editPicture]
Contact Information: [phone, cellphone, email]
Biography: [_editBiography]
Display Information: [active, sort_order]

View File

@@ -0,0 +1,29 @@
K 25
svn:wc:ra_dav:version-url
V 87
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates
END
_edit_picture.php
K 25
svn:wc:ra_dav:version-url
V 105
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates/_edit_picture.php
END
_edit_title.php
K 25
svn:wc:ra_dav:version-url
V 103
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates/_edit_title.php
END
_list_picture.php
K 25
svn:wc:ra_dav:version-url
V 105
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates/_list_picture.php
END
_edit_biography.php
K 25
svn:wc:ra_dav:version-url
V 107
/svn/!svn/ver/25/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates/_edit_biography.php
END

View File

@@ -0,0 +1,76 @@
10
dir
55
http://barnabas/svn/pae.co.at/trunk/proactiveenglish/apps/admin/modules/employee/templates
http://barnabas/svn
2009-05-28T02:14:48.119086Z
25
ben
5f44b648-3ce2-dc11-a6be-00b0d029fcea
_edit_picture.php
file
2009-05-28T02:26:42.000000Z
a8f295de43c803c2c18b0be7d1f8f165
2009-05-28T02:14:48.119086Z
25
ben
_edit_title.php
file
2009-05-28T02:26:42.000000Z
0723d06c7e5ba940c04e2dc6e34ab2cb
2009-05-28T02:14:48.119086Z
25
ben
_list_picture.php
file
2009-05-28T02:26:42.000000Z
0b482d529712a47f75d2065ce0128da2
2009-05-28T02:14:48.119086Z
25
ben
_edit_biography.php
file
2009-05-28T02:26:42.000000Z
97095eb018d6438ffff2925ccafcda1e
2009-05-28T02:14:48.119086Z
25
ben

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $employee->setCulture('en'); echo textarea_tag('biography[en]', $employee->getBiography(), 'size=100x8') ?>
</p>
<p>
<label>German</label>
<?php $employee->setCulture('de'); echo textarea_tag('biography[de]', $employee->getBiography(), 'size=100x8') ?>
</p>

View File

@@ -0,0 +1,2 @@
<?php echo image_tag("whoarewe/employees/thumb_".$employee->getPicture(), array("class" => "employee-thumb")) ?>
<?php echo input_file_tag("picture") ?>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $employee->setCulture('en'); echo input_tag('title[en]', $employee->getTitle(), 'size=40') ?>
</p>
<p>
<label>German</label>
<?php $employee->setCulture('de'); echo input_tag('title[de]', $employee->getTitle(), 'size=40') ?>
</p>

View File

@@ -0,0 +1 @@
<?php echo image_tag("whoarewe/employees/thumb_".$employee->getPicture()) ?>

View File

@@ -0,0 +1,8 @@
<p>
<label>English</label>
<?php $employee->setCulture('en'); echo textarea_tag('biography[en]', $employee->getBiography(), 'size=100x8') ?>
</p>
<p>
<label>German</label>
<?php $employee->setCulture('de'); echo textarea_tag('biography[de]', $employee->getBiography(), 'size=100x8') ?>
</p>

View File

@@ -0,0 +1,2 @@
<?php echo image_tag("whoarewe/employees/thumb_".$employee->getPicture(), array("class" => "employee-thumb")) ?>
<?php echo input_file_tag("picture") ?>

Some files were not shown because too many files have changed in this diff Show More