├── .gitignore ├── appinc ├── librarie │ ├── Smarty-3.0.6 │ │ ├── demo │ │ │ ├── templates │ │ │ │ ├── footer.tpl │ │ │ │ ├── header.tpl │ │ │ │ ├── index_view.php │ │ │ │ └── index.tpl │ │ │ ├── configs │ │ │ │ └── test.conf │ │ │ ├── index.php │ │ │ └── index_php_template.php │ │ └── libs │ │ │ ├── plugins │ │ │ ├── variablefilter.htmlspecialchars.php │ │ │ ├── modifiercompiler.noprint.php │ │ │ ├── block.php.php │ │ │ ├── modifiercompiler.string_format.php │ │ │ ├── modifiercompiler.cat.php │ │ │ ├── modifiercompiler.count_paragraphs.php │ │ │ ├── modifiercompiler.count_sentences.php │ │ │ ├── shared.escape_special_chars.php │ │ │ ├── modifiercompiler.indent.php │ │ │ ├── modifiercompiler.strip_tags.php │ │ │ ├── modifiercompiler.upper.php │ │ │ ├── modifiercompiler.default.php │ │ │ ├── modifiercompiler.strip.php │ │ │ ├── modifiercompiler.wordwrap.php │ │ │ ├── modifiercompiler.lower.php │ │ │ ├── modifiercompiler.count_words.php │ │ │ ├── modifier.capitalize.php │ │ │ ├── modifier.spacify.php │ │ │ ├── function.popup_init.php │ │ │ ├── shared.make_timestamp.php │ │ │ ├── modifier.regex_replace.php │ │ │ ├── modifiercompiler.count_characters.php │ │ │ ├── modifier.replace.php │ │ │ ├── function.counter.php │ │ │ ├── modifier.date_format.php │ │ │ ├── modifier.truncate.php │ │ │ ├── function.math.php │ │ │ ├── outputfilter.trimwhitespace.php │ │ │ ├── modifier.debug_print_var.php │ │ │ └── block.textformat.php │ │ │ ├── sysplugins │ │ │ ├── smarty_internal_compile_debug.php │ │ │ ├── smarty_internal_compile_rdelim.php │ │ │ ├── smarty_internal_compile_ldelim.php │ │ │ ├── smarty_internal_compile_append.php │ │ │ ├── smarty_internal_write_file.php │ │ │ ├── smarty_internal_compile_eval.php │ │ │ ├── smarty_internal_nocache_insert.php │ │ │ ├── smarty_internal_compile_private_function_plugin.php │ │ │ ├── smarty_internal_function_call_handler.php │ │ │ ├── smarty_internal_compile_nocache.php │ │ │ ├── smarty_internal_compile_config_load.php │ │ │ ├── smarty_internal_compile_break.php │ │ │ ├── smarty_internal_compile_continue.php │ │ │ ├── smarty_internal_filter.php │ │ │ ├── smarty_internal_compile_assign.php │ │ │ ├── smarty_internal_compile_private_registered_function.php │ │ │ ├── smarty_internal_compile_private_object_function.php │ │ │ ├── smarty_internal_resource_eval.php │ │ │ ├── smarty_internal_smartytemplatecompiler.php │ │ │ ├── smarty_internal_compile_capture.php │ │ │ ├── smarty_internal_filter_handler.php │ │ │ ├── smarty_internal_resource_stream.php │ │ │ ├── smarty_internal_compile_private_modifier.php │ │ │ ├── smarty_internal_compile_include_php.php │ │ │ ├── smarty_internal_compile_private_print_expression.php │ │ │ ├── smarty_internal_compile_private_block_plugin.php │ │ │ └── smarty_internal_compile_while.php │ │ │ └── debug.tpl │ ├── Rmail │ │ ├── .DS_Store │ │ ├── Rmail.php │ │ ├── smtp.php │ │ ├── RFC822.php │ │ ├── mimePart.php │ │ └── LICENSE.txt │ ├── functions.page.php │ └── functions.language.php ├── images │ ├── and.png │ ├── hpi.png │ ├── obs.png │ ├── cancel.png │ ├── close.gif │ ├── close.png │ ├── corner.png │ ├── embed.png │ ├── header.png │ ├── line.png │ ├── link.png │ ├── logo.png │ ├── mask.png │ ├── owni.png │ ├── share.png │ ├── tipsy.gif │ ├── zeit.png │ ├── btn-add.png │ ├── citizens.png │ ├── favicon.ico │ ├── infnets.png │ ├── like_FB.jpg │ ├── logo-bg.png │ ├── logo-sk.gif │ ├── share-bg.png │ ├── zoom-in.png │ ├── zoom-out.png │ ├── ajax-loader.gif │ ├── arrow-ltr.png │ ├── btn-review.png │ ├── btn-search.png │ ├── developers.png │ ├── journalists.png │ ├── leftright.png │ ├── logo-blue.png │ ├── mini-email.png │ ├── quot-left.png │ ├── quot-right.png │ ├── show-footer.png │ ├── tipsy-sky.gif │ ├── tipsy-white.gif │ ├── topbottom-b.png │ ├── user-status.png │ ├── close_violet.png │ ├── slider_bullet.png │ ├── transparency.png │ ├── input-x-shadow-r.png │ ├── input-x-shadow.png │ ├── input-y-shadow-r.png │ ├── input-y-shadow.png │ ├── logo-blue-small.png │ ├── share-bg-after.png │ ├── share-bg-before.png │ ├── fb-topic-information.png │ ├── input-corner-shadow-r.png │ └── input-corner-shadow.png ├── javascript │ ├── SVGWEB │ │ ├── svg-htc.php │ │ └── svg.swf │ ├── logo2.jpg │ ├── html5.js │ ├── functions.utils.js │ ├── jquery │ │ ├── jquery-extend-center.js │ │ └── jquery.rotate.js │ └── protovis.tipsy.js ├── template │ ├── _compiled │ │ └── .DS_Store │ ├── tmpl │ │ ├── error-tooltip.tmpl │ │ ├── node-property.tmpl │ │ └── li-relation.tmpl │ ├── screen │ │ ├── page.tpl │ │ ├── homepage.tpl │ │ └── relation-review.tpl │ ├── index.tpl │ ├── email-user-confirmation.tpl │ ├── footer.tpl │ ├── menu.tpl │ └── footer.share.tpl ├── stylesheet │ ├── ui-eggplant │ │ └── images │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_734d99_256x240.png │ │ │ ├── ui-icons_8d78a5_256x240.png │ │ │ ├── ui-icons_a8a3ae_256x240.png │ │ │ ├── ui-icons_ebccce_256x240.png │ │ │ ├── ui-icons_ffffff_256x240.png │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_flat_0_eeeeee_40x100.png │ │ │ ├── ui-bg_flat_55_994d53_40x100.png │ │ │ ├── ui-bg_flat_55_fafafa_40x100.png │ │ │ ├── ui-bg_gloss-wave_30_3d3644_500x100.png │ │ │ ├── ui-bg_highlight-soft_100_dcd9de_1x100.png │ │ │ ├── ui-bg_highlight-soft_100_eae6ea_1x100.png │ │ │ ├── ui-bg_highlight-soft_25_30273a_1x100.png │ │ │ └── ui-bg_highlight-soft_45_5f5964_1x100.png │ ├── reset.css │ ├── tipsy.css │ └── jquery.website-tour.css ├── class │ ├── model │ │ ├── Relation_trust_level.class.php │ │ ├── Relation_type_property.class.php │ │ ├── Relation_type.class.php │ │ ├── User.class.php │ │ ├── Relation_value.class.php │ │ └── Node.class.php │ └── manager │ │ ├── Manager.class.php │ │ ├── RelationTypeManager.class.php │ │ └── RelationValueManager.class.php └── screen │ ├── inc.homepage.php │ ├── inc.relation-add.php │ ├── inc.page.php │ ├── inc.relation-visualize.php │ ├── inc.relation-visualize-embed.php │ └── inc.relation-review.php ├── config ├── .DS_Store ├── locale │ ├── en_US │ │ └── LC_MESSAGES │ │ │ └── traductions.mo │ ├── fr_FR │ │ └── LC_MESSAGES │ │ │ └── traductions.mo │ └── make_mo_files.sh ├── config.global.php └── config.init.php ├── .htaccess ├── MIT-LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/demo/templates/footer.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /config/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/config/.DS_Store -------------------------------------------------------------------------------- /appinc/images/and.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/and.png -------------------------------------------------------------------------------- /appinc/images/hpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/hpi.png -------------------------------------------------------------------------------- /appinc/images/obs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/obs.png -------------------------------------------------------------------------------- /appinc/images/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/cancel.png -------------------------------------------------------------------------------- /appinc/images/close.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/close.gif -------------------------------------------------------------------------------- /appinc/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/close.png -------------------------------------------------------------------------------- /appinc/images/corner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/corner.png -------------------------------------------------------------------------------- /appinc/images/embed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/embed.png -------------------------------------------------------------------------------- /appinc/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/header.png -------------------------------------------------------------------------------- /appinc/images/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/line.png -------------------------------------------------------------------------------- /appinc/images/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/link.png -------------------------------------------------------------------------------- /appinc/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/logo.png -------------------------------------------------------------------------------- /appinc/images/mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/mask.png -------------------------------------------------------------------------------- /appinc/images/owni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/owni.png -------------------------------------------------------------------------------- /appinc/images/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/share.png -------------------------------------------------------------------------------- /appinc/images/tipsy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/tipsy.gif -------------------------------------------------------------------------------- /appinc/images/zeit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/zeit.png -------------------------------------------------------------------------------- /appinc/images/btn-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/btn-add.png -------------------------------------------------------------------------------- /appinc/images/citizens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/citizens.png -------------------------------------------------------------------------------- /appinc/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/favicon.ico -------------------------------------------------------------------------------- /appinc/images/infnets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/infnets.png -------------------------------------------------------------------------------- /appinc/images/like_FB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/like_FB.jpg -------------------------------------------------------------------------------- /appinc/images/logo-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/logo-bg.png -------------------------------------------------------------------------------- /appinc/images/logo-sk.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/logo-sk.gif -------------------------------------------------------------------------------- /appinc/images/share-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/share-bg.png -------------------------------------------------------------------------------- /appinc/images/zoom-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/zoom-in.png -------------------------------------------------------------------------------- /appinc/images/zoom-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/zoom-out.png -------------------------------------------------------------------------------- /appinc/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/ajax-loader.gif -------------------------------------------------------------------------------- /appinc/images/arrow-ltr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/arrow-ltr.png -------------------------------------------------------------------------------- /appinc/images/btn-review.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/btn-review.png -------------------------------------------------------------------------------- /appinc/images/btn-search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/btn-search.png -------------------------------------------------------------------------------- /appinc/images/developers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/developers.png -------------------------------------------------------------------------------- /appinc/images/journalists.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/journalists.png -------------------------------------------------------------------------------- /appinc/images/leftright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/leftright.png -------------------------------------------------------------------------------- /appinc/images/logo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/logo-blue.png -------------------------------------------------------------------------------- /appinc/images/mini-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/mini-email.png -------------------------------------------------------------------------------- /appinc/images/quot-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/quot-left.png -------------------------------------------------------------------------------- /appinc/images/quot-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/quot-right.png -------------------------------------------------------------------------------- /appinc/images/show-footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/show-footer.png -------------------------------------------------------------------------------- /appinc/images/tipsy-sky.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/tipsy-sky.gif -------------------------------------------------------------------------------- /appinc/images/tipsy-white.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/tipsy-white.gif -------------------------------------------------------------------------------- /appinc/images/topbottom-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/topbottom-b.png -------------------------------------------------------------------------------- /appinc/images/user-status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/user-status.png -------------------------------------------------------------------------------- /appinc/javascript/SVGWEB/svg-htc.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /appinc/javascript/logo2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/javascript/logo2.jpg -------------------------------------------------------------------------------- /appinc/images/close_violet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/close_violet.png -------------------------------------------------------------------------------- /appinc/images/slider_bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/slider_bullet.png -------------------------------------------------------------------------------- /appinc/images/transparency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/transparency.png -------------------------------------------------------------------------------- /appinc/librarie/Rmail/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/librarie/Rmail/.DS_Store -------------------------------------------------------------------------------- /appinc/librarie/Rmail/Rmail.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/librarie/Rmail/Rmail.php -------------------------------------------------------------------------------- /appinc/librarie/Rmail/smtp.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/librarie/Rmail/smtp.php -------------------------------------------------------------------------------- /appinc/images/input-x-shadow-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/input-x-shadow-r.png -------------------------------------------------------------------------------- /appinc/images/input-x-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/input-x-shadow.png -------------------------------------------------------------------------------- /appinc/images/input-y-shadow-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/input-y-shadow-r.png -------------------------------------------------------------------------------- /appinc/images/input-y-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/input-y-shadow.png -------------------------------------------------------------------------------- /appinc/images/logo-blue-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/logo-blue-small.png -------------------------------------------------------------------------------- /appinc/images/share-bg-after.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/share-bg-after.png -------------------------------------------------------------------------------- /appinc/images/share-bg-before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/share-bg-before.png -------------------------------------------------------------------------------- /appinc/javascript/SVGWEB/svg.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/javascript/SVGWEB/svg.swf -------------------------------------------------------------------------------- /appinc/librarie/Rmail/RFC822.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/librarie/Rmail/RFC822.php -------------------------------------------------------------------------------- /appinc/librarie/Rmail/mimePart.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/librarie/Rmail/mimePart.php -------------------------------------------------------------------------------- /appinc/template/_compiled/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/template/_compiled/.DS_Store -------------------------------------------------------------------------------- /appinc/images/fb-topic-information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/fb-topic-information.png -------------------------------------------------------------------------------- /appinc/images/input-corner-shadow-r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/input-corner-shadow-r.png -------------------------------------------------------------------------------- /appinc/images/input-corner-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/images/input-corner-shadow.png -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/demo/configs/test.conf: -------------------------------------------------------------------------------- 1 | title = Welcome to Smarty! 2 | cutoff_size = 40 3 | 4 | [setup] 5 | bold = true 6 | -------------------------------------------------------------------------------- /config/locale/en_US/LC_MESSAGES/traductions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/config/locale/en_US/LC_MESSAGES/traductions.mo -------------------------------------------------------------------------------- /config/locale/fr_FR/LC_MESSAGES/traductions.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/config/locale/fr_FR/LC_MESSAGES/traductions.mo -------------------------------------------------------------------------------- /appinc/template/tmpl/error-tooltip.tmpl: -------------------------------------------------------------------------------- 1 |
2 |
close
3 |
${msg}
4 |
-------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-icons_734d99_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-icons_734d99_256x240.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-icons_8d78a5_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-icons_8d78a5_256x240.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-icons_a8a3ae_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-icons_a8a3ae_256x240.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-icons_ebccce_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-icons_ebccce_256x240.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-bg_flat_0_eeeeee_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-bg_flat_0_eeeeee_40x100.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-bg_flat_55_994d53_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-bg_flat_55_994d53_40x100.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-bg_flat_55_fafafa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-bg_flat_55_fafafa_40x100.png -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/demo/templates/header.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | {popup_init src="/javascripts/overlib.js"} 4 | {$title} - {$Name} 5 | 6 | 7 | -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-bg_gloss-wave_30_3d3644_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-bg_gloss-wave_30_3d3644_500x100.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-bg_highlight-soft_100_dcd9de_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-bg_highlight-soft_100_dcd9de_1x100.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-bg_highlight-soft_100_eae6ea_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-bg_highlight-soft_100_eae6ea_1x100.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-bg_highlight-soft_25_30273a_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-bg_highlight-soft_25_30273a_1x100.png -------------------------------------------------------------------------------- /appinc/stylesheet/ui-eggplant/images/ui-bg_highlight-soft_45_5f5964_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dooke/Influence-Networks/HEAD/appinc/stylesheet/ui-eggplant/images/ui-bg_highlight-soft_45_5f5964_1x100.png -------------------------------------------------------------------------------- /appinc/librarie/Rmail/LICENSE.txt: -------------------------------------------------------------------------------- 1 | License for Rmail 2 | ================= 3 | 4 | This software is covered by the PHPGuru License. You can read it, along with a few FAQs, here: 5 | 6 | http://www.phpguru.org/static/license.html 7 | -------------------------------------------------------------------------------- /appinc/template/tmpl/node-property.tmpl: -------------------------------------------------------------------------------- 1 |
  • 2 | {{if values.length > 0}} 3 | ${type} : 4 | {{each values}}{{if $index > 0}}, {{/if}}${$value}{{/each}} 5 | {{/if}} 6 |
  • -------------------------------------------------------------------------------- /appinc/template/screen/page.tpl: -------------------------------------------------------------------------------- 1 | {if $page} 2 |
    3 |

    {$page->title}

    4 |
    5 | {$page->content} 6 |
    7 | 8 |
    9 | {/if} -------------------------------------------------------------------------------- /appinc/javascript/html5.js: -------------------------------------------------------------------------------- 1 | document.createElement("article"); 2 | document.createElement("header"); 3 | document.createElement("footer"); 4 | document.createElement("hgroup"); 5 | document.createElement("nav"); 6 | document.createElement("section"); 7 | document.createElement("aside"); -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/demo/templates/index_view.php: -------------------------------------------------------------------------------- 1 | PHP file test 2 | $foo is 3 |
    Test functions 4 | 5 |
    Test objects 6 | setName('Paul')->setAge(39)->introduce()?> 7 |
    Test Arrays 8 | 9 |
    function time 10 | 11 |
    nocache function time 12 | ';?> 13 |
    DONE 14 | -------------------------------------------------------------------------------- /appinc/template/tmpl/li-relation.tmpl: -------------------------------------------------------------------------------- 1 | 2 | details 3 | ${label} 4 | ${type} 5 | ${trust_level} 6 | Review 7 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/variablefilter.htmlspecialchars.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.noprint.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: noprint
    14 | * Purpose: return an empty string 15 | * @author Uwe Tews 16 | * @param array $params parameters 17 | * @return string with compiled code 18 | */ 19 | function smarty_modifiercompiler_noprint($params, $compiler) 20 | { 21 | return "''"; 22 | } 23 | 24 | ?> -------------------------------------------------------------------------------- /appinc/template/index.tpl: -------------------------------------------------------------------------------- 1 | {include file="header.tpl"} 2 | 3 | {if $screen=="relation-add"} 4 | 5 | {include file="screen/relation-add.tpl"} 6 | 7 | {elseif $screen=="relation-review"} 8 | 9 | {include file="screen/relation-review.tpl"} 10 | 11 | {elseif $screen=="relation-visualize"} 12 | 13 | {include file="screen/relation-visualize.tpl"} 14 | 15 | {elseif $screen=="page"} 16 | 17 | {include file="screen/page.tpl"} 18 | 19 | {else} 20 | 21 | {include file="screen/homepage.tpl"} 22 | 23 | {/if} 24 | 25 | {include file="footer.tpl"} 26 | 27 | -------------------------------------------------------------------------------- /appinc/stylesheet/reset.css: -------------------------------------------------------------------------------- 1 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { 2 | margin:0; 3 | padding:0; 4 | } 5 | table { 6 | border-collapse:collapse; 7 | border-spacing:0; 8 | } 9 | fieldset,img { 10 | border:0; 11 | } 12 | address,caption,cite,code,dfn,em,strong,th,var { 13 | font-style:normal; 14 | font-weight:normal; 15 | } 16 | ol,ul { 17 | list-style:none; 18 | } 19 | caption,th { 20 | text-align:left; 21 | } 22 | h1,h2,h3,h4,h5,h6 { 23 | font-size:100%; 24 | font-weight:normal; 25 | } 26 | q:before,q:after { 27 | content:''; 28 | } 29 | abbr,acronym { border:0; 30 | } 31 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/block.php.php: -------------------------------------------------------------------------------- 1 | allow_php_tag) { 21 | throw new SmartyException("{php} is deprecated, set allow_php_tag = true to enable"); 22 | } 23 | eval($content); 24 | return ''; 25 | } 26 | 27 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.string_format.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: string_format
    14 | * Purpose: format strings via sprintf 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_string_format($params, $compiler) 22 | { 23 | return 'sprintf(' . $params[1] . ',' . $params[0] . ')'; 24 | } 25 | 26 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.cat.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: cat
    14 | * Date: Feb 24, 2003 15 | * Purpose: catenate a value to a variable 16 | * Input: string to catenate 17 | * Example: {$var|cat:"foo"} 18 | * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat 19 | * (Smarty online manual) 20 | * @author Uwe Tews 21 | * @param array $params parameters 22 | * @return string with compiled code 23 | */ 24 | function smarty_modifiercompiler_cat($params, $compiler) 25 | { 26 | return '('.implode(').(', $params).')'; 27 | } 28 | 29 | ?> -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | Options +FollowSymlinks 2 | 3 | RewriteEngine On 4 | RewriteBase / 5 | 6 | 7 | # one resource with number ID 8 | RewriteRule ^api/([a-z]+)/([0-9]+)/?$ /index.php?api&resource=$1&id=$2 [L,NC,QSA] 9 | 10 | # one resource with MID 11 | RewriteRule ^api/([a-z]+)(/[a-z0-9_-]+/[a-z0-9_-]+)/?$ /index.php?api&resource=$1&id=$2 [L,NC,QSA] 12 | 13 | # resources 14 | RewriteRule ^api/([a-z]+)/?$ /index.php?api&resource=$1&$2 [L,NC,QSA] 15 | 16 | # redirection to the root 17 | RewriteRule ^api/?$ / [R,NC] 18 | RewriteRule ^page/?$ / [R,NC] 19 | 20 | # main pages 21 | RewriteRule ^contribute/?$ /index.php?screen=relation-add [L,NC,QSA] 22 | RewriteRule ^review/?$ /index.php?screen=relation-review [L,NC,QSA] 23 | RewriteRule ^explore/?$ /index.php?screen=relation-visualize [L,NC,QSA] 24 | RewriteRule ^page/([-_a-z]+)/?$ /index.php?screen=page&id=$1 [L,NC,QSA] 25 | 26 | 27 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.count_paragraphs.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_paragraphs
    14 | * Purpose: count the number of paragraphs in a text 15 | * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php 16 | * count_paragraphs (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_count_paragraphs($params, $compiler) 22 | { 23 | // count \r or \n characters 24 | return '(preg_match_all(\'#[\r\n]+#\', ' . $params[0] . ', $tmp)+1)'; 25 | } 26 | 27 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.count_sentences.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_sentences 14 | * Purpose: count the number of sentences in a text 15 | * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php 16 | * count_sentences (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_count_sentences($params, $compiler) 22 | { 23 | // find periods with a word before but not after. 24 | return 'preg_match_all(\'/[^\s]\.(?!\w)/\', ' . $params[0] . ', $tmp)'; 25 | } 26 | 27 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/shared.escape_special_chars.php: -------------------------------------------------------------------------------- 1 | 13 | * Purpose: used by other smarty functions to escape 14 | * special chars except for already escaped ones 15 | * @author Monte Ohrt 16 | * @param string 17 | * @return string 18 | */ 19 | function smarty_function_escape_special_chars($string) 20 | { 21 | if(!is_array($string)) { 22 | $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string); 23 | $string = htmlspecialchars($string); 24 | $string = str_replace(array('%%%SMARTY_START%%%','%%%SMARTY_END%%%'), array('&',';'), $string); 25 | } 26 | return $string; 27 | } 28 | 29 | ?> -------------------------------------------------------------------------------- /appinc/template/email-user-confirmation.tpl: -------------------------------------------------------------------------------- 1 |

    2 | 3 | Influence Networks 4 | 5 |

    6 | 7 |

    8 | Welcome to Influence Networks, 9 |

    10 | 11 |

    12 | Please, to confirm your user registration, you have to visit the following link:
    13 | {$smarty.const.APP_URL}?action=confirmAccount&user_id={$user.id}&code={$user.code} 14 |

    15 | 16 |

    17 | If you can't click on the link, please copy and paste it on your browser's address bar. 18 |

    19 | 20 |

    21 | Regards, 22 |

    23 | 24 |

    25 | The Influence Networks Team. 26 |

    27 | -------------------------------------------------------------------------------- /appinc/class/model/Relation_trust_level.class.php: -------------------------------------------------------------------------------- 1 | relation_id; 15 | } 16 | 17 | public function setRelationId($relation_id) { 18 | $this->relation_id = $relation_id; 19 | } 20 | 21 | public function getUserId() { 22 | return $this->user_id; 23 | } 24 | 25 | public function setUserId($user_id) { 26 | $this->user_id = $user_id; 27 | } 28 | 29 | public function getTrustLevel() { 30 | return $this->trust_level; 31 | } 32 | 33 | public function setTrustLevel($trust_level) { 34 | $this->trust_level = $trust_level; 35 | } 36 | 37 | 38 | 39 | } 40 | 41 | ?> 42 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.indent.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: indent
    13 | * Purpose: indent lines of text 14 | * @link http://smarty.php.net/manual/en/language.modifier.indent.php 15 | * indent (Smarty online manual) 16 | * @author Uwe Tews 17 | * @param array $params parameters 18 | * @return string with compiled code 19 | */ 20 | 21 | function smarty_modifiercompiler_indent($params, $compiler) 22 | { 23 | if (!isset($params[1])) { 24 | $params[1] = 4; 25 | } 26 | if (!isset($params[2])) { 27 | $params[2] = "' '"; 28 | } 29 | return 'preg_replace(\'!^!m\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')'; 30 | } 31 | 32 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.strip_tags.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: strip_tags
    14 | * Purpose: strip html tags from text 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | 22 | function smarty_modifiercompiler_strip_tags($params, $compiler) 23 | { 24 | if (!isset($params[1])) { 25 | $params[1] = true; 26 | } 27 | if ($params[1] === true) { 28 | return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})"; 29 | } else { 30 | return 'strip_tags(' . $params[0] . ')'; 31 | } 32 | } 33 | 34 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.upper.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: lower
    14 | * Purpose: convert string to uppercase 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_upper($params, $compiler) 22 | { 23 | if (function_exists('mb_strtoupper')) { 24 | return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? mb_strtoupper(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET) : strtoupper(' . $params[0] . '))' ; 25 | } else { 26 | return 'strtoupper(' . $params[0] . ')'; 27 | } 28 | } 29 | 30 | ?> -------------------------------------------------------------------------------- /appinc/template/footer.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
    6 | 7 | 8 | {include file="footer.share.tpl"} 9 | 10 | {literal} 11 | 24 | {/literal} 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.default.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: default
    14 | * Purpose: designate default value for empty variables 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.default.php default (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_default ($params, $compiler) 22 | { 23 | $output = $params[0]; 24 | if (!isset($params[1])) { 25 | $params[1] = "''"; 26 | } 27 | for ($i = 1, $cnt = count($params); $i < $cnt; $i++) { 28 | $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $params[$i] . ' : $tmp)'; 29 | } 30 | return $output; 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.strip.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: strip
    14 | * Purpose: Replace all repeated spaces, newlines, tabs 15 | * with a single space or supplied replacement string.
    16 | * Example: {$var|strip} {$var|strip:" "} 17 | * Date: September 25th, 2002 18 | * 19 | * @link http://smarty.php.net/manual/en/language.modifier.strip.php strip (Smarty online manual) 20 | * @author Uwe Tews 21 | * @param array $params parameters 22 | * @return string with compiled code 23 | */ 24 | 25 | function smarty_modifiercompiler_strip($params, $compiler) 26 | { 27 | if (!isset($params[1])) { 28 | $params[1] = "' '"; 29 | } 30 | return "preg_replace('!\s+!', {$params[1]},{$params[0]})"; 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.wordwrap.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: wordwrap
    14 | * Purpose: wrap a string of text at a given length 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_wordwrap($params, $compiler) 22 | { 23 | if (!isset($params[1])) { 24 | $params[1] = 80; 25 | } 26 | if (!isset($params[2])) { 27 | $params[2] = '"\n"'; 28 | } 29 | if (!isset($params[3])) { 30 | $params[3] = 'false'; 31 | } 32 | return 'wordwrap(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')'; 33 | } 34 | 35 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.lower.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: lower
    13 | * Purpose: convert string to lowercase 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.lower.php lower (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | 22 | function smarty_modifiercompiler_lower($params, $compiler) 23 | { 24 | if (function_exists('mb_strtolower')) { 25 | return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? mb_strtolower(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET) : strtolower(' . $params[0] . '))' ; 26 | } else { 27 | return 'strtolower(' . $params[0] . ')'; 28 | } 29 | } 30 | 31 | ?> -------------------------------------------------------------------------------- /config/config.global.php: -------------------------------------------------------------------------------- 1 | 5 | * @version 1.0 6 | */ 7 | 8 | // permet d'afficher les messages d'erreur 9 | if( isset($_GET['debug'])) { 10 | ini_set('display_errors', 1); 11 | ini_set('log_errors', 1); 12 | error_reporting(E_ALL); 13 | } else { 14 | ini_set('display_errors', 0); 15 | ini_set('log_errors', 0); 16 | error_reporting(null); 17 | } 18 | 19 | 20 | // le dossier à la racine du site 21 | define("BASE_DIR", preg_replace("#/config$#i", "", dirname(__FILE__))); 22 | define("APP_URL", "http://".$_SERVER["SERVER_NAME"].str_replace("index.php", "", $_SERVER["SCRIPT_NAME"]) ); 23 | 24 | // Les constantes qui paramêtrent l'APP 25 | // ------------------------------------ 26 | require_once (BASE_DIR."/config/config.init.php"); 27 | 28 | // lance une session si celle-ci n'est pas déjà lancée 29 | if(session_id() == "") session_start(); 30 | 31 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/demo/index.php: -------------------------------------------------------------------------------- 1 | force_compile = true; 9 | $smarty->debugging = true; 10 | $smarty->caching = true; 11 | $smarty->cache_lifetime = 120; 12 | 13 | $smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill",true); 14 | $smarty->assign("FirstName",array("John","Mary","James","Henry")); 15 | $smarty->assign("LastName",array("Doe","Smith","Johnson","Case")); 16 | $smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"), 17 | array("I", "J", "K", "L"), array("M", "N", "O", "P"))); 18 | 19 | $smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"), 20 | array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234"))); 21 | 22 | $smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX")); 23 | $smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas")); 24 | $smarty->assign("option_selected", "NE"); 25 | 26 | $smarty->display('index.tpl'); 27 | ?> 28 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.count_words.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_words
    14 | * Purpose: count the number of words in a text 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_count_words($params, $compiler) 22 | { 23 | // mb_ functions available? 24 | if (function_exists('mb_strlen')) { 25 | return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? preg_match_all(\'#[\w\pL]+#u\', ' . $params[0] . ', $tmp) : preg_match_all(\'#\w+#\',' . $params[0] . ', $tmp))'; 26 | } else { 27 | return 'str_word_count(' . $params[0] . ')'; 28 | } 29 | } 30 | 31 | ?> -------------------------------------------------------------------------------- /MIT-LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 by OWNI, http://owni.fr 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifier.capitalize.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: capitalize
    14 | * Purpose: capitalize words in the string 15 | * 16 | * @link 17 | * @author Monte Ohrt 18 | * @param string $ 19 | * @return string 20 | */ 21 | function smarty_modifier_capitalize($string, $uc_digits = false) 22 | { 23 | // uppercase with php function ucwords 24 | $upper_string = ucwords($string); 25 | // check for any missed hyphenated words 26 | $upper_string = preg_replace("!(^|[^\p{L}'])([\p{Ll}])!ue", "'\\1'.ucfirst('\\2')", $upper_string); 27 | // check uc_digits case 28 | if (!$uc_digits) { 29 | if (preg_match_all("!\b([\p{L}]*[\p{N}]+[\p{L}]*)\b!u", $string, $matches, PREG_OFFSET_CAPTURE)) { 30 | foreach($matches[1] as $match) 31 | $upper_string = substr_replace($upper_string, $match[0], $match[1], strlen($match[0])); 32 | } 33 | } 34 | return $upper_string; 35 | } 36 | 37 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_debug.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 26 | // check and get attributes 27 | $_attr = $this->_get_attributes($args); 28 | 29 | // compile always as nocache 30 | $this->compiler->tag_nocache = true; 31 | 32 | // display debug template 33 | $_output = "smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>"; 34 | return $_output; 35 | } 36 | } 37 | 38 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_rdelim.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 27 | $_attr = $this->_get_attributes($args); 28 | if ($_attr['nocache'] === true) { 29 | $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); 30 | } 31 | // this tag does not return compiled code 32 | $this->compiler->has_code = true; 33 | return $this->compiler->smarty->right_delimiter; 34 | } 35 | } 36 | 37 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifier.spacify.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: spacify
    13 | * Purpose: add spaces between characters in a string 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @param string $ 18 | * @param string $ 19 | * @return string 20 | */ 21 | function smarty_modifier_spacify($string, $spacify_char = ' ') 22 | { 23 | // mb_ functions available? 24 | if (function_exists('mb_strlen') && mb_detect_encoding($string, 'UTF-8, ISO-8859-1') === 'UTF-8') { 25 | $strlen = mb_strlen($string); 26 | while ($strlen) { 27 | $array[] = mb_substr($string, 0, 1, "UTF-8"); 28 | $string = mb_substr($string, 1, $strlen, "UTF-8"); 29 | $strlen = mb_strlen($string); 30 | } 31 | return implode($spacify_char, $array); 32 | } else { 33 | return implode($spacify_char, preg_split('//', $string, -1)); 34 | } 35 | } 36 | 37 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_ldelim.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 27 | $_attr = $this->_get_attributes($args); 28 | if ($_attr['nocache'] === true) { 29 | $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); 30 | } 31 | // this tag does not return compiled code 32 | $this->compiler->has_code = true; 33 | return $this->compiler->smarty->left_delimiter; 34 | } 35 | } 36 | 37 | ?> 38 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/function.popup_init.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: popup_init
    14 | * Purpose: initialize overlib 15 | * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init} 16 | * (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param array $params parameters 19 | * @param object $template template object 20 | * @return string 21 | */ 22 | 23 | function smarty_function_popup_init($params, $template) 24 | { 25 | $zindex = 1000; 26 | 27 | if (!empty($params['zindex'])) { 28 | $zindex = $params['zindex']; 29 | } 30 | 31 | if (!empty($params['src'])) { 32 | return '' . "\n" 33 | . '' . "\n"; 34 | } else { 35 | trigger_error("popup_init: missing src parameter",E_USER_WARNING); 36 | } 37 | } 38 | 39 | ?> -------------------------------------------------------------------------------- /appinc/screen/inc.homepage.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | */ 12 | 13 | // assing the screen 14 | $s->assign('screen', 'homepage'); 15 | // page title 16 | $s->assign('pageTitle', _('Home') ); 17 | 18 | // introduction 19 | $s->assign('intro', getPage("introduction")); 20 | 21 | // influence networks for... 22 | $s->assign('forJournalists', getPage("influence-networks-for-journalists")); 23 | $s->assign('forDevelopers', getPage("influence-networks-for-developers")); 24 | $s->assign('forCitizens', getPage("influence-networks-for-citizens")); 25 | 26 | $s->assign("countRelation", $managers["relation"]->getRelationCount()); 27 | $s->assign("countRelationReview", $managers["relation_trust_level"]->getRelationTrustLevelCount()); 28 | $s->assign("countUser", $managers["user"]->getUserCount()); 29 | 30 | // every errors to a JSON 31 | $s->assign("err_json", json_encode($err)); 32 | $s->display('index.tpl'); 33 | 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/demo/index_php_template.php: -------------------------------------------------------------------------------- 1 | 5 | * @package SmartyTestScripts 6 | */ 7 | require('../libs/Smarty.class.php'); 8 | 9 | class Person 10 | { 11 | private $m_szName; 12 | private $m_iAge; 13 | 14 | public function setName($szName) 15 | { 16 | $this->m_szName = $szName; 17 | return $this; // We now return $this (the Person) 18 | } 19 | 20 | public function setAge($iAge) 21 | { 22 | $this->m_iAge = $iAge; 23 | return $this; // Again, return our Person 24 | } 25 | 26 | public function introduce() 27 | { 28 | return 'Hello my name is '.$this->m_szName.' and I am '.$this->m_iAge.' years old.'; 29 | } 30 | } 31 | 32 | $smarty = new Smarty(); 33 | $smarty->allow_php_templates= true; 34 | $smarty->force_compile = false; 35 | $smarty->caching = true; 36 | $smarty->cache_lifetime = 100; 37 | //$smarty->debugging = true; 38 | 39 | $smarty->assign('foo',"'bar'"); 40 | 41 | $person = new Person; 42 | 43 | $smarty->assign('person',$person); 44 | 45 | $smarty->assign('array',array('a'=>array('aa'=>'This is a long string'),'b'=>2)); 46 | 47 | $smarty->display('php:index_view.php'); 48 | 49 | ?> 50 | -------------------------------------------------------------------------------- /config/locale/make_mo_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | i=0 4 | 5 | echo "------------------------------------------------------------------------------------------------------------" 6 | echo " ____ _ _ _ __ _ _ " 7 | echo " / ___|___ _ __ ___ _ __ (_) | ___ | | __ _ _ __ __ _ _ _ __ _ __ _ ___ / _(_) | ___ ___ " 8 | echo "| | / _ \| '_ \` _ \| '_ \| | |/ _ \ | |/ _\` | '_ \ / _\` | | | |/ _\` |/ _\` |/ _ \ | |_| | |/ _ \/ __|" 9 | echo "| |__| (_) | | | | | | |_) | | | __/ | | (_| | | | | (_| | |_| | (_| | (_| | __/ | _| | | __/\__ \\" 10 | echo " \____\___/|_| |_| |_| .__/|_|_|\___| |_|\__,_|_| |_|\__, |\__,_|\__,_|\__, |\___| |_| |_|_|\___||___/" 11 | echo " |_| |___/ |___/" 12 | echo "------------------------------------------------------------------------------------------------------------" 13 | 14 | for inode in $(ls -R); do 15 | FILE_IN="./$inode/LC_MESSAGES/traductions.po" 16 | FILE_OUT="./$inode/LC_MESSAGES/traductions.mo"; 17 | if [ -f $FILE_IN ]; then 18 | echo "" 19 | msgfmt -o $FILE_OUT $FILE_IN 20 | echo "- $FILE_OUT compiled" 21 | echo "---------------------------------------------" 22 | fi 23 | done 24 | echo "" 25 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/shared.make_timestamp.php: -------------------------------------------------------------------------------- 1 | 11 | * Purpose: used by other smarty functions to make a timestamp 12 | * from a string. 13 | * @author Monte Ohrt 14 | * @param string $string 15 | * @return string 16 | */ 17 | 18 | function smarty_make_timestamp($string) 19 | { 20 | if(empty($string)) { 21 | // use "now": 22 | return time(); 23 | } elseif ($string instanceof DateTime) { 24 | return $string->getTimestamp(); 25 | } elseif (preg_match('/^\d{14}$/', $string)) { 26 | // it is mysql timestamp format of YYYYMMDDHHMMSS? 27 | return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2), 28 | substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4)); 29 | } elseif (is_numeric($string)) { 30 | // it is a numeric string, we handle it as timestamp 31 | return (int)$string; 32 | } else { 33 | // strtotime should handle it 34 | $time = strtotime($string); 35 | if ($time == -1 || $time === false) { 36 | // strtotime() was not able to parse $string, use "now": 37 | return time(); 38 | } 39 | return $time; 40 | } 41 | } 42 | 43 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifier.regex_replace.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: regex_replace
    14 | * Purpose: regular expression search/replace 15 | * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php 16 | * regex_replace (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param string 19 | * @param string|array 20 | * @param string|array 21 | * @return string 22 | */ 23 | function smarty_modifier_regex_replace($string, $search, $replace) 24 | { 25 | if(is_array($search)) { 26 | foreach($search as $idx => $s) 27 | $search[$idx] = _smarty_regex_replace_check($s); 28 | } else { 29 | $search = _smarty_regex_replace_check($search); 30 | } 31 | 32 | return preg_replace($search, $replace, $string); 33 | } 34 | 35 | function _smarty_regex_replace_check($search) 36 | { 37 | if (($pos = strpos($search,"\0")) !== false) 38 | $search = substr($search,0,$pos); 39 | if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) { 40 | /* remove eval-modifier from $search */ 41 | $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]); 42 | } 43 | return $search; 44 | } 45 | 46 | ?> -------------------------------------------------------------------------------- /appinc/class/model/Relation_type_property.class.php: -------------------------------------------------------------------------------- 1 | id; 16 | } 17 | 18 | public function setId($id) { 19 | $this->id = $id; 20 | } 21 | 22 | public function getType() { 23 | return $this->type; 24 | } 25 | 26 | public function setType($type) { 27 | $this->type = $type; 28 | } 29 | 30 | public function getFreebaseId() { 31 | return $this->freebase_id; 32 | } 33 | 34 | public function setFreebaseId($freebase_id) { 35 | $this->freebase_id = $freebase_id; 36 | } 37 | 38 | public function getLiteral() { 39 | return $this->literal; 40 | } 41 | 42 | public function setLiteral($literal) { 43 | $this->literal = $literal; 44 | } 45 | 46 | 47 | 48 | /** 49 | * Return an array with all value of this object 50 | * @return array 51 | * @access public 52 | */ 53 | public function getArray($native = false) { 54 | 55 | $r = Array( 56 | "id" => $this->id, 57 | "type" => $this->type, 58 | "freebase_id" => $this->freebase_id, 59 | "literal" => $this->literal 60 | ); 61 | 62 | return $r; 63 | } 64 | 65 | } 66 | 67 | ?> 68 | -------------------------------------------------------------------------------- /appinc/screen/inc.relation-add.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | */ 12 | // assing the screen 13 | $s->assign('screen', 'relation-add'); 14 | 15 | // page title 16 | $s->assign('pageTitle', _('Contribute')); 17 | 18 | if (!$managers["user"]->isConnected()) 19 | $err[] = Array("time" => time(), "msg" => _("You must be connected to add a relation.")); 20 | else { 21 | // check if we need to add a relation 22 | if (isset($_POST["entity-left-mid"]) && isset($_POST["entity-right-mid"]) && isset($_POST["relation_type"])) 23 | $managers['relation']->addRelation(); 24 | 25 | // load type of relation 26 | $rt["-1"] = Array("label" => "--", "direction" => "", "hint" => ""); 27 | foreach ($managers['relation_type']->htmlOption() as $key => $val) 28 | $rt[$key] = $val; 29 | 30 | $s->assign('relation_type_option', $rt); 31 | } 32 | 33 | 34 | $s->assign("countRelation", $managers["relation"]->getRelationCount()); 35 | $s->assign("countRelationReview", $managers["relation_trust_level"]->getRelationTrustLevelCount()); 36 | $s->assign("countUser", $managers["user"]->getUserCount()); 37 | 38 | 39 | // every errors to a JSON 40 | $s->assign("err_json", json_encode($err)); 41 | $s->display('index.tpl'); 42 | ?> 43 | -------------------------------------------------------------------------------- /appinc/class/model/Relation_type.class.php: -------------------------------------------------------------------------------- 1 | freebase_id; 16 | } 17 | 18 | public function setFreebaseId($freebase_id) { 19 | $this->freebase_id = $freebase_id; 20 | } 21 | 22 | public function getLabel() { 23 | return $this->label; 24 | } 25 | 26 | public function setLabel($label) { 27 | $this->label = $label; 28 | } 29 | 30 | public function getDirection() { 31 | return $this->direction; 32 | } 33 | 34 | public function setDirection($direction) { 35 | $this->direction = $direction; 36 | } 37 | 38 | public function getHint() { 39 | return $this->hint; 40 | } 41 | 42 | public function setHint($hint) { 43 | $this->hint = $hint; 44 | } 45 | 46 | 47 | /** 48 | * Return an array with all value of this object 49 | * @return array 50 | * @access public 51 | */ 52 | public function getArray($native = false) { 53 | 54 | $r = Array( 55 | "id" => $this->id, 56 | "freebase_id" => $this->freebase_id, 57 | "label" => $this->label, 58 | "direction" => $this->direction, 59 | "hint" => $this->hint 60 | ); 61 | 62 | return $r; 63 | } 64 | 65 | } 66 | 67 | ?> 68 | -------------------------------------------------------------------------------- /appinc/screen/inc.page.php: -------------------------------------------------------------------------------- 1 | 10 | * @tutorial Influence Networks don't want to provide a service to edit and 11 | * broadcast page. To offer a quality service to our editors, we choise to use 12 | * Wordpress 3 and a JSON API plugin... 13 | * 14 | * @link http://wordpress.org/ 15 | * @link http://wordpress.org/extend/plugins/json-api/ 16 | * 17 | */ 18 | 19 | if( isset($_GET["id"]) ) { 20 | 21 | 22 | // decode the page 23 | $page = getPage($_GET["id"]); 24 | 25 | // if status is OK 26 | if(!!$page) { 27 | // page title 28 | $s->assign('pageTitle', $page->title ); 29 | // page data 30 | $s->assign('page', $page); 31 | 32 | } 33 | 34 | } 35 | 36 | 37 | // assing the screen 38 | $s->assign('screen', 'page'); 39 | 40 | 41 | // counts for the footer 42 | $s->assign("countRelation", $managers["relation"]->getRelationCount()); 43 | $s->assign("countRelationReview", $managers["relation_trust_level"]->getRelationTrustLevelCount()); 44 | $s->assign("countUser", $managers["user"]->getUserCount()); 45 | 46 | 47 | // every errors to a JSON 48 | $s->assign("err_json", json_encode($err)); 49 | $s->display('index.tpl'); 50 | 51 | ?> 52 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifiercompiler.count_characters.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: count_characteres
    14 | * Purpose: count the number of characters in a text 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual) 17 | * @author Uwe Tews 18 | * @param array $params parameters 19 | * @return string with compiled code 20 | */ 21 | function smarty_modifiercompiler_count_characters($params, $compiler) 22 | { 23 | // mb_ functions available? 24 | if (function_exists('mb_strlen')) { 25 | // count also spaces? 26 | if (isset($params[1]) && $params[1] == 'true') { 27 | return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? mb_strlen(' . $params[0] . ', SMARTY_RESOURCE_CHAR_SET) : strlen(' . $params[0] . '))'; 28 | } 29 | return '((mb_detect_encoding(' . $params[0] . ', \'UTF-8, ISO-8859-1\') === \'UTF-8\') ? preg_match_all(\'#[^\s\pZ]#u\', ' . $params[0] . ', $tmp) : preg_match_all(\'/[^\s]/\',' . $params[0] . ', $tmp))'; 30 | } else { 31 | // count also spaces? 32 | if (isset($params[1]) && $params[1] == 'true') { 33 | return 'strlen(' . $params[0] . ')'; 34 | } 35 | return 'preg_match_all(\'/[^\s]/\',' . $params[0] . ', $tmp)'; 36 | } 37 | } 38 | 39 | ?> -------------------------------------------------------------------------------- /appinc/class/model/User.class.php: -------------------------------------------------------------------------------- 1 | 8 | * @version 1.0 9 | * @package Record 10 | * @subpackage User 11 | */ 12 | class User extends Record{ 13 | 14 | private $email; 15 | private $password; 16 | private $trust_level; 17 | private $pending; 18 | private $confirmationCode; 19 | 20 | public function getId() { 21 | return $this->id; 22 | } 23 | 24 | public function setId($id) { 25 | $this->id = $id; 26 | } 27 | 28 | public function getEmail() { 29 | return $this->email; 30 | } 31 | 32 | public function setEmail($mail) { 33 | $this->email = $mail; 34 | } 35 | 36 | public function getPassword() { 37 | return $this->password; 38 | } 39 | 40 | public function setPassword($password) { 41 | $this->password = $password; 42 | } 43 | 44 | public function getTrustLevel() { 45 | return $this->trust_level; 46 | } 47 | 48 | public function setTrustLevel($trust_level) { 49 | $this->trust_level = $trust_level; 50 | } 51 | 52 | public function getPending() { 53 | return $this->pending; 54 | } 55 | 56 | public function setPending($pending) { 57 | $this->pending = $pending; 58 | } 59 | 60 | public function getConfirmationCode() { 61 | return $this->confirmationCode; 62 | } 63 | 64 | public function setConfirmationCode($confirmationCode) { 65 | $this->confirmationCode = $confirmationCode; 66 | } 67 | 68 | } 69 | 70 | ?> 71 | -------------------------------------------------------------------------------- /appinc/class/manager/Manager.class.php: -------------------------------------------------------------------------------- 1 | smarty = & $smarty; 24 | 25 | // une référence vers la base 26 | $this->db = & $db; 27 | 28 | // une référence vers les managers 29 | $this->managers = & $managers; 30 | 31 | // une référence vers le gestionaire d'erreur 32 | $this->err = & $err; 33 | 34 | } 35 | 36 | public function getSmarty() { 37 | return $this->smarty; 38 | } 39 | 40 | public function setSmarty($smarty) { 41 | $this->smarty = $smarty; 42 | } 43 | 44 | public function getDb() { 45 | return $this->db; 46 | } 47 | 48 | public function setDb($db) { 49 | $this->db = $db; 50 | } 51 | 52 | public function getManagers() { 53 | return $this->managers; 54 | } 55 | 56 | public function setManagers($managers) { 57 | $this->managers = $managers; 58 | } 59 | 60 | public function getErr() { 61 | return $this->err; 62 | } 63 | 64 | public function setErr($err) { 65 | $this->err = $err; 66 | } 67 | 68 | 69 | } 70 | 71 | ?> 72 | -------------------------------------------------------------------------------- /appinc/javascript/functions.utils.js: -------------------------------------------------------------------------------- 1 | // espace de nommage UTILS 2 | var RR_UTILS = {}; 3 | 4 | // Recherche dans un tableau arr, la valeur val 5 | RR_UTILS.inArray = function(arr, val) { 6 | for(var i = 0; arr[i] != val && i < arr.length; i++) {} 7 | return (i < arr.length); 8 | }; 9 | 10 | // le navigateur est-il est un ipad ? 11 | RR_UTILS.isIpad = function() { 12 | return navigator.userAgent.match(/iPad/i); 13 | }; 14 | 15 | // le navigateur est-il est un iphone ? 16 | RR_UTILS.isIphone = function() { 17 | return navigator.userAgent.match(/iPhone/i); 18 | }; 19 | 20 | // le navigateur est-il est un ipad ou un iphone ? 21 | RR_UTILS.isApple = function() { 22 | return RR_UTILS.isIpad() || RR_UTILS.isIphone(); 23 | }; 24 | 25 | 26 | // déclenche un copier 27 | RR_UTILS.copier = function (inElement) { 28 | 29 | if (inElement.createTextRange) { 30 | var range = inElement.createTextRange(); 31 | if (range && BodyLoaded==1) 32 | range.execCommand('Copy'); 33 | } else { 34 | var flashcopier = 'flashcopier'; 35 | if(!document.getElementById(flashcopier)) { 36 | var divholder = document.createElement('div'); 37 | divholder.id = flashcopier; 38 | document.body.appendChild(divholder); 39 | } 40 | 41 | document.getElementById(flashcopier).innerHTML = ''; 42 | var divinfo = ''; 43 | document.getElementById(flashcopier).innerHTML = divinfo; 44 | } 45 | 46 | }; 47 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_append.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 32 | // check and get attributes 33 | $_attr = $this->_get_attributes($args); 34 | // map to compile assign attributes 35 | if (isset($_attr['index'])) { 36 | $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']'; 37 | unset($_attr['index']); 38 | } else { 39 | $_params['smarty_internal_index'] = '[]'; 40 | } 41 | $_new_attr = array(); 42 | foreach ($_attr as $key => $value) { 43 | $_new_attr[] = array($key => $value); 44 | } 45 | // call compile assign 46 | return parent::compile($_new_attr, $compiler, $_params); 47 | } 48 | } 49 | 50 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_write_file.php: -------------------------------------------------------------------------------- 1 | _dir_perms, true); 29 | } 30 | // write to tmp file, then move to overt file lock race condition 31 | $_tmp_file = tempnam($_dirpath, 'wrt'); 32 | 33 | if (!($fd = @fopen($_tmp_file, 'wb'))) { 34 | $_tmp_file = $_dirpath . DS . uniqid('wrt'); 35 | if (!($fd = @fopen($_tmp_file, 'wb'))) { 36 | throw new SmartyException("unable to write file {$_tmp_file}"); 37 | return false; 38 | } 39 | } 40 | 41 | fwrite($fd, $_contents); 42 | fclose($fd); 43 | 44 | // remove original file 45 | if (file_exists($_filepath)) 46 | @unlink($_filepath); 47 | // rename tmp file 48 | rename($_tmp_file, $_filepath); 49 | // set file permissions 50 | chmod($_filepath, $smarty->_file_perms); 51 | umask($old_umask); 52 | return true; 53 | } 54 | } 55 | 56 | ?> -------------------------------------------------------------------------------- /appinc/librarie/functions.page.php: -------------------------------------------------------------------------------- 1 | PAGES_PROVIDER."about/?json=1", 14 | "licence" => PAGES_PROVIDER."licence/?json=1", 15 | "developers" => PAGES_PROVIDER."developers/?json=1", 16 | "terms-of-use" => PAGES_PROVIDER."terms-of-use/?json=1", 17 | "privacy-policy" => PAGES_PROVIDER."privacy-policy/?json=1", 18 | "introduction" => PAGES_PROVIDER."introduction/?json=1&custom_fields=yt", 19 | "influence-networks-for-journalists" => PAGES_PROVIDER."influence-networks-for-journalists/?json=1", 20 | "influence-networks-for-citizens" => PAGES_PROVIDER."influence-networks-for-citizens/?json=1", 21 | "influence-networks-for-developers" => PAGES_PROVIDER."influence-networks-for-developers/?json=1" 22 | ); 23 | 24 | 25 | // url to extract the page 26 | $pageProvider = $arrPageQuery[$name]; 27 | 28 | // extract the page 29 | $pageText = file_get_contents($pageProvider); 30 | 31 | if($pageText) { 32 | 33 | // decode the page 34 | $page = json_decode($pageText); 35 | 36 | // if status is OK 37 | if($page->status == "ok") { 38 | 39 | return $page->page; 40 | 41 | } else return false; 42 | 43 | } else return false; 44 | 45 | } 46 | 47 | 48 | ?> 49 | -------------------------------------------------------------------------------- /appinc/screen/inc.relation-visualize.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | */ 12 | // assing the screen 13 | $s->assign('screen', 'relation-visualize'); 14 | 15 | // page title 16 | $s->assign('pageTitle', _('Explore')); 17 | 18 | $node_left = null; 19 | $node_right = null; 20 | 21 | // if a relation is given 22 | if (isset($_GET["rel"])) { 23 | 24 | $rel = explode("|", $_GET["rel"]); 25 | // pattern to test if the string is a freebase ID 26 | $freebase_id_pattern = "!(\/[a-z]{1,3}\/){1}([a-z0-9_]){3,}!i"; 27 | 28 | if (preg_match($freebase_id_pattern, $rel[0])) 29 | $entity_left = $managers["node"]->getNode($rel[0]); 30 | 31 | if (count($rel) == 2 && preg_match($freebase_id_pattern, $rel[1])) 32 | $entity_right = $managers["node"]->getNode($rel[1]); 33 | } 34 | 35 | $s->assign("trust_rank", isset($_GET["trust_rank"]) && is_numeric($_GET["trust_rank"]) && $_GET["trust_rank"] <= 5 && $_GET["trust_rank"] >= 1 ? $_GET["trust_rank"] : 3); 36 | $s->assign("entity_left", $entity_left); 37 | $s->assign("entity_right", $entity_right); 38 | 39 | 40 | $s->assign("countRelation", $managers["relation"]->getRelationCount()); 41 | $s->assign("countRelationReview", $managers["relation_trust_level"]->getRelationTrustLevelCount()); 42 | $s->assign("countUser", $managers["user"]->getUserCount()); 43 | 44 | // every errors to a JSON 45 | $s->assign("err_json", json_encode($err)); 46 | $s->display('index.tpl'); 47 | ?> 48 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifier.replace.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: replace
    13 | * Purpose: simple search/replace 14 | * 15 | * @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual) 16 | * @author Monte Ohrt 17 | * @author Uwe Tews 18 | * @param string $ 19 | * @param string $ 20 | * @param string $ 21 | * @return string 22 | */ 23 | function smarty_modifier_replace($string, $search, $replace) 24 | { 25 | if (!function_exists('mb_str_replace')) { 26 | // simulate the missing PHP mb_str_replace function 27 | function mb_str_replace($needles, $replacements, $haystack) 28 | { 29 | $rep = (array)$replacements; 30 | foreach ((array)$needles as $key => $needle) { 31 | $replacement = $rep[$key]; 32 | $needle_len = mb_strlen($needle); 33 | $replacement_len = mb_strlen($replacement); 34 | $pos = mb_strpos($haystack, $needle, 0); 35 | while ($pos !== false) { 36 | $haystack = mb_substr($haystack, 0, $pos) . $replacement 37 | . mb_substr($haystack, $pos + $needle_len); 38 | $pos = mb_strpos($haystack, $needle, $pos + $replacement_len); 39 | } 40 | } 41 | return $haystack; 42 | } 43 | } 44 | if (function_exists('mb_substr')) { 45 | return mb_str_replace($search, $replace, $string); 46 | } else { 47 | return str_replace($search, $replace, $string); 48 | } 49 | } 50 | 51 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_eval.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 30 | $this->required_attributes = array('var'); 31 | $this->optional_attributes = array('assign'); 32 | // check and get attributes 33 | $_attr = $this->_get_attributes($args); 34 | if (isset($_attr['assign'])) { 35 | // output will be stored in a smarty variable instead of beind displayed 36 | $_assign = $_attr['assign']; 37 | } 38 | 39 | // create template object 40 | $_output = "\$_template = new {$compiler->smarty->template_class}('eval:'.".$_attr['var'].", \$_smarty_tpl->smarty, \$_smarty_tpl);"; 41 | //was there an assign attribute? 42 | if (isset($_assign)) { 43 | $_output .= "\$_smarty_tpl->assign($_assign,\$_template->getRenderedTemplate());"; 44 | } else { 45 | $_output .= "echo \$_template->getRenderedTemplate();"; 46 | } 47 | return ""; 48 | } 49 | } 50 | 51 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_nocache_insert.php: -------------------------------------------------------------------------------- 1 | assign('{$_assign}' , {$_function} (" . var_export($_attr, true) . ",\$_smarty_tpl), true);?>"; 38 | } else { 39 | $_output .= "echo {$_function}(" . var_export($_attr, true) . ",\$_smarty_tpl);?>"; 40 | } 41 | $_tpl = $_template; 42 | while ($_tpl->parent instanceof Smarty_Internal_Template) { 43 | $_tpl = $_tpl->parent; 44 | } 45 | return "/*%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/" . $_output . "/*/%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/"; 46 | } 47 | } 48 | 49 | ?> -------------------------------------------------------------------------------- /appinc/template/menu.tpl: -------------------------------------------------------------------------------- 1 | 2 | {if $isConnected} 3 |
  • 4 | {t}Get involved{/t} 5 | 6 | {t}Contribute{/t} 7 | 8 |
  • 9 |
  • 10 | 11 | {t}Review{/t} 12 | 13 |
  • 14 | {else} 15 |
  • 16 | {t}Get involved{/t} 17 | 18 | {t}Contribute{/t} 19 | 20 |
  • 21 |
  • 22 | 23 | {t}Review{/t} 24 | 25 |
  • 26 | {/if} 27 | 28 |
  • 29 | 30 | {t}Explore{/t} 31 | 32 |
    33 | 34 | 35 |
    36 |
  • 37 |
  • 38 | 39 | {t}Home{/t} 40 | 41 |
  • 42 | -------------------------------------------------------------------------------- /appinc/class/model/Relation_value.class.php: -------------------------------------------------------------------------------- 1 | id; 17 | } 18 | 19 | public function setId($id) { 20 | $this->id = $id; 21 | } 22 | 23 | public function getProperty() { 24 | return $this->property; 25 | } 26 | 27 | public function setProperty($property) { 28 | $this->property = $property; 29 | } 30 | 31 | public function getPropertyLabel() { 32 | return $this->property_label; 33 | } 34 | 35 | public function setPropertyLabel($propertyLabel) { 36 | $this->property_label = $propertyLabel; 37 | } 38 | 39 | public function getRelation() { 40 | return $this->relation; 41 | } 42 | 43 | public function setRelation($relation) { 44 | $this->relation = $relation; 45 | } 46 | 47 | public function getValue() { 48 | if($this->getPropertyLabel() == "Source" && !preg_match("#^http://#i", $this->value) ) 49 | $this->value= "http://".$this->value; 50 | return $this->value; 51 | } 52 | 53 | public function setValue($value) { 54 | $this->value = $value; 55 | } 56 | 57 | 58 | 59 | /** 60 | * Return an array with all value of this object 61 | * @return array 62 | * @access public 63 | */ 64 | public function getArray($native = false) { 65 | 66 | $r = Array( 67 | "id" => $this->id, 68 | "property" => $this->property, 69 | "property_label" => $this->property_label, 70 | "value" => $this->value 71 | ); 72 | 73 | return $r; 74 | } 75 | } 76 | 77 | ?> 78 | -------------------------------------------------------------------------------- /appinc/screen/inc.relation-visualize-embed.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | */ 12 | 13 | // assing the screen 14 | $s->assign('screen', 'relation-visualize-embed'); 15 | 16 | // partners data 17 | $partners = array("sk" => 18 | array( 19 | "img" => "logo-sk.gif", 20 | "url" => "http://suomenkuvalehti.fi/", 21 | "name" => "Suomen Kuvalehti" 22 | ) 23 | ); 24 | 25 | // if a partners is specified in the request... 26 | if(isset($_GET["partner"]) && key_exists($_GET["partner"], $partners)) 27 | // we assign it 28 | $s->assign("partner", $partners[$_GET["partner"]]); 29 | 30 | 31 | $node_left = null; 32 | $node_right = null; 33 | 34 | // if a relation is given 35 | if (isset($_GET["rel"])) { 36 | 37 | $rel = explode("|", $_GET["rel"]); 38 | // pattern to test if the string is a freebase ID 39 | $freebase_id_pattern = "!(\/[a-z]{1,3}\/){1}([a-z0-9_]){3,}!i"; 40 | 41 | if (preg_match($freebase_id_pattern, $rel[0])) 42 | $entity_left = $managers["node"]->getNode($rel[0]); 43 | 44 | if (count($rel) == 2 && preg_match($freebase_id_pattern, $rel[1])) 45 | $entity_right = $managers["node"]->getNode($rel[1]); 46 | } 47 | 48 | $s->assign("trust_rank", isset($_GET["trust_rank"]) && is_numeric($_GET["trust_rank"]) && $_GET["trust_rank"] <= 5 && $_GET["trust_rank"] >= 1 ? $_GET["trust_rank"] : 3); 49 | $s->assign("entity_left", $entity_left); 50 | $s->assign("entity_right", $entity_right); 51 | 52 | // every errors to a JSON 53 | $s->assign("err_json", json_encode($err)); 54 | $s->display('embed.tpl'); 55 | ?> 56 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_private_function_plugin.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 33 | // This tag does create output 34 | $this->compiler->has_output = true; 35 | 36 | // check and get attributes 37 | $_attr = $this->_get_attributes($args); 38 | if ($_attr['nocache'] === true) { 39 | $this->compiler->tag_nocache = true; 40 | } 41 | unset($_attr['nocache']); 42 | // convert attributes into parameter array string 43 | $_paramsArray = array(); 44 | foreach ($_attr as $_key => $_value) { 45 | if (is_int($_key)) { 46 | $_paramsArray[] = "$_key=>$_value"; 47 | } else { 48 | $_paramsArray[] = "'$_key'=>$_value"; 49 | } 50 | } 51 | $_params = 'array(' . implode(",", $_paramsArray) . ')'; 52 | // compile code 53 | $output = "\n"; 54 | return $output; 55 | } 56 | } 57 | 58 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_function_call_handler.php: -------------------------------------------------------------------------------- 1 | smarty->template_functions[$_name]['called_nocache'] = true; 19 | } else { 20 | $_function = "smarty_template_function_{$_hash}_{$_name}"; 21 | } 22 | if (!is_callable($_function)) { 23 | $_code = "function {$_function}(\$_smarty_tpl,\$params) { 24 | \$saved_tpl_vars = \$_smarty_tpl->tpl_vars; 25 | foreach (\$_smarty_tpl->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(trim(\$value,'\''));}; 26 | foreach (\$params as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}?>"; 27 | if ($_nocache) { 28 | $_code .= preg_replace(array("!<\?php echo \\'/\*%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\*/|/\*/%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\*/\\';\?>!", 29 | "!\\\'!"), array('', "'"), $_template->smarty->template_functions[$_name]['compiled']); 30 | } else { 31 | $_code .= preg_replace("/{$_template->smarty->template_functions[$_name]['nocache_hash']}/", $_template->properties['nocache_hash'], $_template->smarty->template_functions[$_name]['compiled']); 32 | } 33 | $_code .= "tpl_vars = \$saved_tpl_vars;}"; 34 | eval($_code); 35 | } 36 | $_function($_template, $_params); 37 | } 38 | } 39 | 40 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/demo/templates/index.tpl: -------------------------------------------------------------------------------- 1 | {config_load file="test.conf" section="setup"} 2 | {include file="header.tpl" title=foo} 3 | 4 |
     5 | 
     6 | {* bold and title are read from the config file *}
     7 | {if #bold#}{/if}
     8 | {* capitalize the first letters of each word of the title *}
     9 | Title: {#title#|capitalize}
    10 | {if #bold#}{/if}
    11 | 
    12 | The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
    13 | 
    14 | The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}
    15 | 
    16 | Example of accessing server environment variable SERVER_NAME: {$smarty.server.SERVER_NAME}
    17 | 
    18 | The value of {ldelim}$Name{rdelim} is {$Name}
    19 | 
    20 | variable modifier example of {ldelim}$Name|upper{rdelim}
    21 | 
    22 | {$Name|upper}
    23 | 
    24 | 
    25 | An example of a section loop:
    26 | 
    27 | {section name=outer 
    28 | loop=$FirstName}
    29 | {if $smarty.section.outer.index is odd by 2}
    30 | 	{$smarty.section.outer.rownum} . {$FirstName[outer]} {$LastName[outer]}
    31 | {else}
    32 | 	{$smarty.section.outer.rownum} * {$FirstName[outer]} {$LastName[outer]}
    33 | {/if}
    34 | {sectionelse}
    35 | 	none
    36 | {/section}
    37 | 
    38 | An example of section looped key values:
    39 | 
    40 | {section name=sec1 loop=$contacts}
    41 | 	phone: {$contacts[sec1].phone}
    42 | fax: {$contacts[sec1].fax}
    43 | cell: {$contacts[sec1].cell}
    44 | {/section} 45 |

    46 | 47 | testing strip tags 48 | {strip} 49 | 50 | 51 | 56 | 57 |
    52 | 53 | This is a test 54 | 55 |
    58 | {/strip} 59 | 60 |

    61 | 62 | This is an example of the html_select_date function: 63 | 64 |
    65 | {html_select_date start_year=1998 end_year=2010} 66 |
    67 | 68 | This is an example of the html_select_time function: 69 | 70 |
    71 | {html_select_time use_24_hours=false} 72 |
    73 | 74 | This is an example of the html_options function: 75 | 76 |
    77 | 80 |
    81 | 82 | {include file="footer.tpl"} 83 | -------------------------------------------------------------------------------- /appinc/class/manager/RelationTypeManager.class.php: -------------------------------------------------------------------------------- 1 | db->query($query) or die("Database error. Sorry, try again."); 23 | 24 | $options = array(); 25 | 26 | while ( $row = $this->db->fetch() ) { 27 | $options[$row["id"]] = Array("label" => _($row["label"]), "direction" => $row["direction"], "hint" => _($row["hint"]) ); 28 | $this->types[ $row["id"] ] = new Relation_type($row); 29 | } 30 | 31 | return $options; 32 | } 33 | 34 | public function getType($type_id) { 35 | 36 | if( !isset($this->types[$type_id]) ) { 37 | 38 | if( is_numeric($type_id) ) { 39 | $query = "SELECT * FROM ". TABLE_PREFIX ."relation_type "; 40 | $query .= " WHERE id={$type_id}"; 41 | 42 | $this->db->query($query) or die("Database error. Sorry, try again."); 43 | 44 | if( $row = $this->db->fetch() ) { 45 | 46 | $this->types[$type_id] = new Relation_type($row); 47 | return $this->types[$type_id]; 48 | 49 | } else return false; 50 | 51 | } else return false; 52 | 53 | } else return $this->types[$type_id]; 54 | 55 | } 56 | 57 | } 58 | 59 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/function.counter.php: -------------------------------------------------------------------------------- 1 | 12 | * Name: counter
    13 | * Purpose: print out a counter value 14 | * @author Monte Ohrt 15 | * @link http://smarty.php.net/manual/en/language.function.counter.php {counter} 16 | * (Smarty online manual) 17 | * @param array parameters 18 | * @param Smarty 19 | * @param object $template template object 20 | * @return string|null 21 | */ 22 | function smarty_function_counter($params, $template) 23 | { 24 | static $counters = array(); 25 | 26 | $name = (isset($params['name'])) ? $params['name'] : 'default'; 27 | if (!isset($counters[$name])) { 28 | $counters[$name] = array( 29 | 'start'=>1, 30 | 'skip'=>1, 31 | 'direction'=>'up', 32 | 'count'=>1 33 | ); 34 | } 35 | $counter =& $counters[$name]; 36 | 37 | if (isset($params['start'])) { 38 | $counter['start'] = $counter['count'] = (int)$params['start']; 39 | } 40 | 41 | if (!empty($params['assign'])) { 42 | $counter['assign'] = $params['assign']; 43 | } 44 | 45 | if (isset($counter['assign'])) { 46 | $template->assign($counter['assign'], $counter['count']); 47 | } 48 | 49 | if (isset($params['print'])) { 50 | $print = (bool)$params['print']; 51 | } else { 52 | $print = empty($counter['assign']); 53 | } 54 | 55 | if ($print) { 56 | $retval = $counter['count']; 57 | } else { 58 | $retval = null; 59 | } 60 | 61 | if (isset($params['skip'])) { 62 | $counter['skip'] = $params['skip']; 63 | } 64 | 65 | if (isset($params['direction'])) { 66 | $counter['direction'] = $params['direction']; 67 | } 68 | 69 | if ($counter['direction'] == "down") 70 | $counter['count'] -= $counter['skip']; 71 | else 72 | $counter['count'] += $counter['skip']; 73 | 74 | return $retval; 75 | 76 | } 77 | 78 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_nocache.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 27 | $_attr = $this->_get_attributes($args); 28 | if ($_attr['nocache'] === true) { 29 | $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); 30 | } 31 | // enter nocache mode 32 | $this->compiler->nocache = true; 33 | // this tag does not return compiled code 34 | $this->compiler->has_code = false; 35 | return true; 36 | } 37 | } 38 | 39 | /** 40 | * Smarty Internal Plugin Compile Nocacheclose Class 41 | */ 42 | class Smarty_Internal_Compile_Nocacheclose extends Smarty_Internal_CompileBase { 43 | /** 44 | * Compiles code for the {/nocache} tag 45 | * 46 | * This tag does not generate compiled output. It only sets a compiler flag 47 | * @param array $args array with attributes from parser 48 | * @param object $compiler compiler object 49 | * @return string compiled code 50 | */ 51 | public function compile($args, $compiler) 52 | { 53 | $this->compiler = $compiler; 54 | $_attr = $this->_get_attributes($args); 55 | // leave nocache mode 56 | $this->compiler->nocache = false; 57 | // this tag does not return compiled code 58 | $this->compiler->has_code = false; 59 | return true; 60 | } 61 | } 62 | 63 | ?> -------------------------------------------------------------------------------- /appinc/stylesheet/tipsy.css: -------------------------------------------------------------------------------- 1 | .tipsy { 2 | padding: 10px; font-size: 14px; position: absolute; z-index: 100000; 3 | } 4 | .tipsy-inner { 5 | padding: 5px 8px 4px 8px; 6 | color:#163d59; 7 | 8 | font-family: 'PT Sans', arial, serif; 9 | font-size:16px; 10 | font-weight:bold; 11 | 12 | max-width: 250px; 13 | text-align: center; 14 | 15 | border-radius:2px; 16 | -webkit-border-radius:2px; 17 | -moz-border-radius:2px; 18 | -khtml-border-radius:2px; 19 | -o-border-radius:2px; 20 | 21 | background-color: #fff; 22 | 23 | box-shadow:0px 5px 15px 0 rgba(0,0,0,0.4); 24 | -moz-box-shadow:0px 5px 15px 0 rgba(0,0,0,0.4); 25 | -khtml-box-shadow:0px 5px 15px 0 rgba(0,0,0,0.4); 26 | -webkit-box-shadow:0px 5px 15px 0 rgba(0,0,0,0.4); 27 | -o-box-shadow:0px 5px 15px 0 rgba(0,0,0,0.4); 28 | 29 | transition:0s; 30 | -webkit-transition:0s; 31 | -moz-transition:0s; 32 | -o-transition:0s; 33 | } 34 | 35 | .tipsy-sky .tipsy-inner { 36 | color:#000; 37 | background: #abe1e8; 38 | } 39 | .tipsy-embed .tipsy-inner { 40 | padding:20px; 41 | width:250px; 42 | } 43 | .tipsy-embed .tipsy-inner input { 44 | width:220px; 45 | transition:0s; 46 | -webkit-transition:0s; 47 | -moz-transition:0s; 48 | -o-transition:0s; 49 | } 50 | .tipsy-arrow { position: absolute; background: url('../images/tipsy-white.gif') no-repeat top left; width: 21px; height: 11px; } 51 | .tipsy-sky .tipsy-arrow { background-image: url('../images/tipsy-sky.gif'); } 52 | .tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -10px; } 53 | .tipsy-nw .tipsy-arrow { top: 0px; left: 10px; } 54 | .tipsy-ne .tipsy-arrow { top: 0px; right: 10px; } 55 | .tipsy-s .tipsy-arrow { bottom: 0px; left: 50%; margin-left: -10px; background-position: bottom left; } 56 | .tipsy-sw .tipsy-arrow { bottom: 0px; left: 10px; background-position: bottom left; } 57 | .tipsy-se .tipsy-arrow { bottom: 0px; right: 10px; background-position: bottom left; } 58 | .tipsy-e .tipsy-arrow { top: 50%; margin-top: -10px; right: 0px; width: 11px; height: 21px; background-position: top right; } 59 | .tipsy-w .tipsy-arrow { top: 50%; margin-top: -10px; left: 0px; width: 11px; height: 21px; } -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifier.date_format.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: date_format
    14 | * Purpose: format datestamps via strftime
    15 | * Input:
    16 | * - string: input date string 17 | * - format: strftime format for output 18 | * - default_date: default date if $string is empty 19 | * 20 | * @link http://smarty.php.net/manual/en/language.modifier.date.format.php date_format (Smarty online manual) 21 | * @author Monte Ohrt 22 | * @param string $ 23 | * @param string $ 24 | * @param string $ 25 | * @return string |void 26 | * @uses smarty_make_timestamp() 27 | */ 28 | function smarty_modifier_date_format($string, $format = SMARTY_RESOURCE_DATE_FORMAT, $default_date = '',$formatter='auto') 29 | { 30 | /** 31 | * Include the {@link shared.make_timestamp.php} plugin 32 | */ 33 | require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php'); 34 | if ($string != '') { 35 | $timestamp = smarty_make_timestamp($string); 36 | } elseif ($default_date != '') { 37 | $timestamp = smarty_make_timestamp($default_date); 38 | } else { 39 | return; 40 | } 41 | if($formatter=='strftime'||($formatter=='auto'&&strpos($format,'%')!==false)) { 42 | if (DS == '\\') { 43 | $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T'); 44 | $_win_to = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S'); 45 | if (strpos($format, '%e') !== false) { 46 | $_win_from[] = '%e'; 47 | $_win_to[] = sprintf('%\' 2d', date('j', $timestamp)); 48 | } 49 | if (strpos($format, '%l') !== false) { 50 | $_win_from[] = '%l'; 51 | $_win_to[] = sprintf('%\' 2d', date('h', $timestamp)); 52 | } 53 | $format = str_replace($_win_from, $_win_to, $format); 54 | } 55 | return strftime($format, $timestamp); 56 | } else { 57 | return date($format, $timestamp); 58 | } 59 | } 60 | 61 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_config_load.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 32 | // check and get attributes 33 | $_attr = $this->_get_attributes($args); 34 | 35 | if ($_attr['nocache'] === true) { 36 | $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); 37 | } 38 | 39 | 40 | // save posible attributes 41 | $conf_file = $_attr['file']; 42 | if (isset($_attr['section'])) { 43 | $section = $_attr['section']; 44 | } else { 45 | $section = 'null'; 46 | } 47 | $scope = 'local'; 48 | // scope setup 49 | if (isset($_attr['scope'])) { 50 | $_attr['scope'] = trim($_attr['scope'], "'\""); 51 | if (in_array($_attr['scope'],array('local','parent','root','global'))) { 52 | $scope = $_attr['scope']; 53 | } else { 54 | $this->compiler->trigger_template_error('illegal value for "scope" attribute', $this->compiler->lex->taglineno); 55 | } 56 | } 57 | // create config object 58 | $_output = "smarty, \$_smarty_tpl);"; 59 | $_output .= "\$_config->loadConfigVars($section, '$scope'); ?>"; 60 | return $_output; 61 | } 62 | } 63 | 64 | ?> -------------------------------------------------------------------------------- /appinc/template/footer.share.tpl: -------------------------------------------------------------------------------- 1 | 2 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_break.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 32 | $this->smarty = $compiler->smarty; 33 | // check and get attributes 34 | $_attr = $this->_get_attributes($args); 35 | 36 | if ($_attr['nocache'] === true) { 37 | $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); 38 | } 39 | 40 | if (isset($_attr['levels'])) { 41 | if (!is_numeric($_attr['levels'])) { 42 | $this->compiler->trigger_template_error('level attribute must be a numeric constant', $this->compiler->lex->taglineno); 43 | } 44 | $_levels = $_attr['levels']; 45 | } else { 46 | $_levels = 1; 47 | } 48 | $level_count = $_levels; 49 | $stack_count = count($compiler->_tag_stack) - 1; 50 | while ($level_count > 0 && $stack_count >= 0) { 51 | if (in_array($compiler->_tag_stack[$stack_count][0], array('for', 'foreach', 'while', 'section'))) { 52 | $level_count--; 53 | } 54 | $stack_count--; 55 | } 56 | if ($level_count != 0) { 57 | $this->compiler->trigger_template_error("cannot break {$_levels} level(s)", $this->compiler->lex->taglineno); 58 | } 59 | // this tag does not return compiled code 60 | $this->compiler->has_code = true; 61 | return ""; 62 | } 63 | } 64 | 65 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_continue.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 31 | $this->smarty = $compiler->smarty; 32 | // check and get attributes 33 | $_attr = $this->_get_attributes($args); 34 | 35 | if ($_attr['nocache'] === true) { 36 | $this->compiler->trigger_template_error('nocache option not allowed', $this->compiler->lex->taglineno); 37 | } 38 | 39 | if (isset($_attr['levels'])) { 40 | if (!is_numeric($_attr['levels'])) { 41 | $this->compiler->trigger_template_error('level attribute must be a numeric constant', $this->compiler->lex->taglineno); 42 | } 43 | $_levels = $_attr['levels']; 44 | } else { 45 | $_levels = 1; 46 | } 47 | $level_count = $_levels; 48 | $stack_count = count($compiler->_tag_stack) - 1; 49 | while ($level_count > 0 && $stack_count >= 0) { 50 | if (in_array($compiler->_tag_stack[$stack_count][0], array('for', 'foreach', 'while', 'section'))) { 51 | $level_count--; 52 | } 53 | $stack_count--; 54 | } 55 | if ($level_count != 0) { 56 | $this->compiler->trigger_template_error("cannot continue {$_levels} level(s)", $this->compiler->lex->taglineno); 57 | } 58 | // this tag does not return compiled code 59 | $this->compiler->has_code = true; 60 | return ""; 61 | } 62 | } 63 | 64 | ?> -------------------------------------------------------------------------------- /appinc/class/model/Node.class.php: -------------------------------------------------------------------------------- 1 | 9 | * @version 1.0 10 | * @package Record 11 | * @subpackage Node 12 | */ 13 | class Node extends Record { 14 | 15 | /** 16 | * @var string 17 | * @access private 18 | */ 19 | private $freebase_id; 20 | /** 21 | * @var string 22 | * @access private 23 | */ 24 | private $label; 25 | /** 26 | * @var string 27 | * @access private 28 | */ 29 | private $type; 30 | 31 | /** 32 | * $freebase_id attrbiute getter 33 | * @return string 34 | * @access public 35 | */ 36 | public function getFreebaseId() { 37 | return $this->freebase_id; 38 | } 39 | 40 | /** 41 | * $freebase_id attrbiute setter 42 | * @param string $freebase_id 43 | * @access public 44 | */ 45 | public function setFreebaseId($freebase_id) { 46 | $this->freebase_id = $freebase_id; 47 | } 48 | 49 | 50 | /** 51 | * $label attrbiute getter 52 | * @return string 53 | * @access public 54 | */ 55 | public function getLabel() { 56 | return $this->label; 57 | } 58 | 59 | 60 | /** 61 | * $label attrbiute setter 62 | * @param string $label 63 | * @access public 64 | */ 65 | public function setLabel($label) { 66 | $this->label = $label; 67 | } 68 | 69 | /** 70 | * $type attrbiute getter 71 | * @return string 72 | * @access public 73 | */ 74 | public function getType() { 75 | return $this->type; 76 | } 77 | 78 | /** 79 | * $type attrbiute setter 80 | * @param string $type 81 | * @access public 82 | */ 83 | public function setType($type) { 84 | $this->type = $type; 85 | } 86 | 87 | /** 88 | * Return an array with all value of this object 89 | * @return array 90 | * @access public 91 | */ 92 | public function getArray() { 93 | 94 | $r = Array( 95 | "id" => (int)$this->id, 96 | "freebase_id" => $this->freebase_id, 97 | "label" => $this->label, 98 | "type" => $this->type 99 | ); 100 | 101 | return $r; 102 | } 103 | 104 | } 105 | 106 | 107 | ?> 108 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifier.truncate.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: truncate
    14 | * Purpose: Truncate a string to a certain length if necessary, 15 | * optionally splitting in the middle of a word, and 16 | * appending the $etc string or inserting $etc into the middle. 17 | * 18 | * @link http://smarty.php.net/manual/en/language.modifier.truncate.php truncate (Smarty online manual) 19 | * @author Monte Ohrt 20 | * @param string $string input string 21 | * @param integer $length lenght of truncated text 22 | * @param string $etc end string 23 | * @param boolean $break_words truncate at word boundary 24 | * @param boolean $middle truncate in the middle of text 25 | * @return string truncated string 26 | */ 27 | function smarty_modifier_truncate($string, $length = 80, $etc = '...', 28 | $break_words = false, $middle = false) 29 | { 30 | if ($length == 0) 31 | return ''; 32 | 33 | if (is_callable('mb_strlen')) { 34 | if (mb_detect_encoding($string, 'UTF-8, ISO-8859-1') === 'UTF-8') { 35 | // $string has utf-8 encoding 36 | if (mb_strlen($string) > $length) { 37 | $length -= min($length, mb_strlen($etc)); 38 | if (!$break_words && !$middle) { 39 | $string = preg_replace('/\s+?(\S+)?$/u', '', mb_substr($string, 0, $length + 1)); 40 | } 41 | if (!$middle) { 42 | return mb_substr($string, 0, $length) . $etc; 43 | } else { 44 | return mb_substr($string, 0, $length / 2) . $etc . mb_substr($string, - $length / 2); 45 | } 46 | } else { 47 | return $string; 48 | } 49 | } 50 | } 51 | // $string has no utf-8 encoding 52 | if (strlen($string) > $length) { 53 | $length -= min($length, strlen($etc)); 54 | if (!$break_words && !$middle) { 55 | $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length + 1)); 56 | } 57 | if (!$middle) { 58 | return substr($string, 0, $length) . $etc; 59 | } else { 60 | return substr($string, 0, $length / 2) . $etc . substr($string, - $length / 2); 61 | } 62 | } else { 63 | return $string; 64 | } 65 | } 66 | 67 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_filter.php: -------------------------------------------------------------------------------- 1 | smarty = $smarty; 20 | } 21 | /** 22 | * Registers a filter function 23 | * 24 | * @param string $type filter type 25 | * @param callback $callback 26 | */ 27 | public function registerFilter($type, $callback) 28 | { 29 | $this->smarty->registered_filters[$type][$this->_get_filter_name($callback)] = $callback; 30 | } 31 | 32 | /** 33 | * Unregisters a filter function 34 | * 35 | * @param string $type filter type 36 | * @param callback $callback 37 | */ 38 | public function unregisterFilter($type, $callback) 39 | { 40 | $name = $this->_get_filter_name($callback); 41 | if(isset($this->smarty->registered_filters[$type][$name])) { 42 | unset($this->smarty->registered_filters[$type][$name]); 43 | } 44 | } 45 | 46 | 47 | /** 48 | * Return internal filter name 49 | * 50 | * @param callback $function_name 51 | */ 52 | public function _get_filter_name($function_name) 53 | { 54 | if (is_array($function_name)) { 55 | $_class_name = (is_object($function_name[0]) ? 56 | get_class($function_name[0]) : $function_name[0]); 57 | return $_class_name . '_' . $function_name[1]; 58 | } else { 59 | return $function_name; 60 | } 61 | } 62 | 63 | 64 | /** 65 | * load a filter of specified type and name 66 | * 67 | * @param string $type filter type 68 | * @param string $name filter name 69 | * @return bool 70 | */ 71 | function loadFilter($type, $name) 72 | { 73 | $_plugin = "smarty_{$type}filter_{$name}"; 74 | $_filter_name = $_plugin; 75 | if ($this->smarty->loadPlugin($_plugin)) { 76 | if (class_exists($_plugin, false)) { 77 | $_plugin = array($_plugin, 'execute'); 78 | } 79 | if (is_callable($_plugin)) { 80 | return $this->smarty->registered_filters[$type][$_filter_name] = $_plugin; 81 | } 82 | } 83 | throw new SmartyException("{$type}filter \"{$name}\" not callable"); 84 | return false; 85 | } 86 | 87 | 88 | } 89 | ?> -------------------------------------------------------------------------------- /appinc/javascript/jquery/jquery-extend-center.js: -------------------------------------------------------------------------------- 1 | // Place un élément au centre de l'écran (positionement absolu) 2 | // l'élément à center ne dois pas être contenu dans un block positioné en RELATIVE ! 3 | (function($){ 4 | $.fn.extend({ 5 | center: function() { 6 | 7 | if( typeof $(this).data("center_last_update") == "undefined" ) { 8 | $(this).data("center_last_update", 0); // timestamp who indicates the last center update 9 | 10 | // Pour fonctionner pleinnement, cette fonction doit être appellée au chargement et au redimmensionement de la page 11 | $(window).resize(function () { $(".center").center(); }); 12 | } 13 | 14 | var obj = $(this); 15 | var d = new Date(); 16 | 17 | // On redimensione l'élément seulement si la dernière redimension date de plus d'une 1/10 seconde 18 | if(d.getTime() - $(this).data("center_last_update") >= 100 ) { 19 | 20 | // ----------- 21 | // Centre l'élement (ou les éléments) 22 | // au milieu de la page 23 | // ---------------------------------- 24 | $(obj).each(function () { 25 | 26 | var x = ( $(window).width() > $(this).outerWidth() ) ? $(window).width() / 2 - $(this).outerWidth() / 2 : 0; 27 | var y = ( $(window).height() > $(this).outerHeight() ) ? $(window).height() / 2 - $(this).outerHeight() / 2 : 0; 28 | 29 | 30 | // recherche dans les éléments parents positionnés en absolute 31 | var par = $(this).parent(); 32 | 33 | while( par.get(0) != null && par.get(0).nodeName != "BODY") { 34 | 35 | // l'élément est modifié 36 | if( par.css("position") == "absolute" ) { 37 | x -= par.css("left" ).replace("px", "").replace(",", ".") * 1; 38 | y -= par.css("top").replace("px", "").replace(",", ".") * 1; 39 | } 40 | 41 | par = par.parent(); 42 | } 43 | 44 | $(this).css({ 45 | position:"absolute", 46 | left:x+"px", 47 | top: y+"px", 48 | margin:0 49 | }); 50 | 51 | }); 52 | 53 | $(this).data("center_last_update", d.getTime() ); 54 | } 55 | 56 | return obj; 57 | } 58 | }); 59 | })(jQuery); -------------------------------------------------------------------------------- /appinc/javascript/protovis.tipsy.js: -------------------------------------------------------------------------------- 1 | pv.Behavior.tipsy = function(opts) { 2 | var tip; 3 | 4 | /** 5 | * @private When the mouse leaves the root panel, trigger a mouseleave event 6 | * on the tooltip span. This is necessary for dimensionless marks (e.g., 7 | * lines) when the mouse isn't actually over the span. 8 | */ 9 | function trigger() { 10 | if (tip) { 11 | $(tip).tipsy("hide"); 12 | tip.parentNode.removeChild(tip); 13 | tip = null; 14 | } 15 | } 16 | 17 | return function(d) { 18 | /* Compute the transform to offset the tooltip position. */ 19 | var t = pv.Transform.identity, p = this.parent; 20 | do { 21 | t = t.translate(p.left(), p.top()).times(p.transform()); 22 | } while (p = p.parent); 23 | 24 | /* Create and cache the tooltip span to be used by tipsy. */ 25 | if (!tip) { 26 | var c = this.root.canvas(); 27 | c.style.position = "relative"; 28 | $(c).mouseleave(trigger); 29 | 30 | tip = c.appendChild(document.createElement("div")); 31 | tip.style.position = "absolute"; 32 | tip.style.pointerEvents = "none"; // ignore mouse events 33 | $(tip).tipsy(opts); 34 | } 35 | 36 | /* Propagate the tooltip text. */ 37 | tip.title = this.title() || this.text(); 38 | 39 | /* 40 | * Compute bounding box. TODO support area, lines, wedges, stroke. Also 41 | * note that CSS positioning does not support subpixels, and the current 42 | * rounding implementation can be off by one pixel. 43 | */ 44 | if (this.properties.width) { 45 | tip.style.width = Math.ceil(this.width() * t.k) + 1 + "px"; 46 | tip.style.height = Math.ceil(this.height() * t.k) + 1 + "px"; 47 | } else if (this.properties.shapeRadius) { 48 | var r = this.shapeRadius(); 49 | t.x -= r; 50 | t.y -= r; 51 | tip.style.height = tip.style.width = Math.ceil(2 * r * t.k) + "px"; 52 | } 53 | tip.style.left = Math.floor(this.left() * t.k + t.x) + "px"; 54 | tip.style.top = Math.floor(this.top() * t.k + t.y) + "px"; 55 | 56 | /* 57 | * Cleanup the tooltip span on mouseout. Immediately trigger the tooltip; 58 | * this is necessary for dimensionless marks. Note that the tip has 59 | * pointer-events disabled (so as to not interfere with other mouse 60 | * events, such as "click"); thus the mouseleave event handler is 61 | * registered on the event target rather than the tip overlay. 62 | */ 63 | if (tip.style.height) $(pv.event.target).mouseleave(trigger); 64 | $(tip).tipsy("show"); 65 | }; 66 | }; 67 | -------------------------------------------------------------------------------- /appinc/librarie/functions.language.php: -------------------------------------------------------------------------------- 1 | 6 | * @desc 7 | *********************************************************************************/ 8 | 9 | /** Function setLanguage 10 | * @author Development Team (XL based on Yosra's) 11 | * @desc set language info for gettext stuff and co 12 | * 13 | * @param $lang : string ; looks like "fr_FR" or "en_US" ... 14 | * @param $domain : string ; typically the name of the language files 15 | * @param $baseFolder : string ; under the document root ; it's the folder that contain sth like "fr_FR/LC_MESSAGES/*.[pm]o" 16 | * @return zilch, it just gets the job done 17 | */ 18 | function setLanguage($lang, $domain = "traductions", $baseFolder = "./config/locale") { 19 | 20 | $_SESSION[LANG_SESSION_VAR] = $lang; 21 | 22 | $codeset = "UTF-8"; 23 | 24 | putenv("LC_ALL=$lang.$codeset"); 25 | putenv("LANG=$lang.$codeset"); 26 | putenv("LANGUAGE=$lang.$codeset"); 27 | 28 | setlocale(LC_ALL, "$lang.$codeset"); 29 | 30 | bindtextdomain($domain, $baseFolder); 31 | bind_textdomain_codeset($domain, $codeset); 32 | 33 | textdomain($domain); 34 | 35 | } 36 | 37 | /** Function __ 38 | * @author Development Team (XL) 39 | * @desc alias (aka shortcut) for (d)ngettext 40 | * 41 | * @param $msg1/2 : string to translate 42 | * @param $n : number 43 | * @param $domain : string ; optional 44 | * @return translated message 45 | */ 46 | function __($msg1, $msg2, $n, $domain = null) { 47 | return is_null($domain) ? ngettext($msg1, $msg2, $n) : dngettext($domain, $msg1, $msg2, $n); 48 | } 49 | 50 | 51 | /** Function initLanguage 52 | * @author Pierre Romera, Team 22mars 53 | * @desc Define application language 54 | * 55 | */ 56 | if(! function_exists("initLanguage") ) { 57 | 58 | define('LANG_SESSION_VAR', 'language'); 59 | 60 | function initLanguage() { 61 | 62 | if(session_id() == "") session_start(); 63 | 64 | if(isset($_GET["lang"])) 65 | setLanguage($_GET["lang"]); 66 | 67 | elseif( isset($_SESSION[LANG_SESSION_VAR]) ) 68 | setLanguage($_SESSION[LANG_SESSION_VAR]); 69 | 70 | else setLanguage("en_US"); 71 | 72 | } 73 | } 74 | 75 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_assign.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 28 | $this->required_attributes = array('var', 'value'); 29 | $this->shorttag_order = array('var', 'value'); 30 | $this->optional_attributes = array('scope'); 31 | $_nocache = 'null'; 32 | $_scope = 'null'; 33 | // check and get attributes 34 | $_attr = $this->_get_attributes($args); 35 | // nocache ? 36 | if ($this->compiler->tag_nocache || $this->compiler->nocache) { 37 | $_nocache = 'true'; 38 | // create nocache var to make it know for further compiling 39 | $compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_variable(null, true); 40 | } 41 | // scope setup 42 | if (isset($_attr['scope'])) { 43 | $_attr['scope'] = trim($_attr['scope'], "'\""); 44 | if ($_attr['scope'] == 'parent') { 45 | $_scope = Smarty::SCOPE_PARENT; 46 | } elseif ($_attr['scope'] == 'root') { 47 | $_scope = Smarty::SCOPE_ROOT; 48 | } elseif ($_attr['scope'] == 'global') { 49 | $_scope = Smarty::SCOPE_GLOBAL; 50 | } else { 51 | $this->compiler->trigger_template_error('illegal value for "scope" attribute', $this->compiler->lex->taglineno); 52 | } 53 | } 54 | // compiled output 55 | if (isset($parameter['smarty_internal_index'])) { 56 | return "tpl_vars[$_attr[var]]) || !is_array(\$_smarty_tpl->tpl_vars[$_attr[var]]->value)) \$_smarty_tpl->createLocalArrayVariable($_attr[var], $_nocache, $_scope);\n\$_smarty_tpl->tpl_vars[$_attr[var]]->value$parameter[smarty_internal_index] = $_attr[value];?>"; 57 | } else { 58 | return "tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);?>"; 59 | } 60 | } 61 | } 62 | 63 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_private_registered_function.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 31 | // This tag does create output 32 | $this->compiler->has_output = true; 33 | // check and get attributes 34 | $_attr = $this->_get_attributes($args); 35 | if ($_attr['nocache']) { 36 | $this->compiler->tag_nocache = true; 37 | } 38 | unset($_attr['nocache']); 39 | // not cachable? 40 | $this->compiler->tag_nocache = $this->compiler->tag_nocache || !$compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag][1]; 41 | // convert attributes into parameter array string 42 | $_paramsArray = array(); 43 | foreach ($_attr as $_key => $_value) { 44 | if (is_int($_key)) { 45 | $_paramsArray[] = "$_key=>$_value"; 46 | } else { 47 | $_paramsArray[] = "'$_key'=>$_value"; 48 | } 49 | } 50 | $_params = 'array(' . implode(",", $_paramsArray) . ')'; 51 | $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag][0]; 52 | // compile code 53 | if (!is_array($function)) { 54 | $output = "\n"; 55 | } else if (is_object($function[0])) { 56 | $output = "smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['{$tag}'][0][0]->{$function[1]}({$_params},\$_smarty_tpl);?>\n"; 57 | } else { 58 | $output = "\n"; 59 | } 60 | return $output; 61 | } 62 | } 63 | 64 | ?> -------------------------------------------------------------------------------- /config/config.init.php: -------------------------------------------------------------------------------- 1 | 5 | * @version 1.0 6 | * @desc Set up the application 7 | */ 8 | 9 | // MySQL Database settings 10 | // ----------------------- 11 | if (strstr($_SERVER['SERVER_NAME'], 'influencenetworks.org')): 12 | 13 | /* * ** PROD ENVIRONMENT *** */ 14 | define('MYSQL_HOST', 'localhost'); 15 | define('MYSQL_DB', '@@MYSQL_DB@@'); 16 | define('MYSQL_USER', '@@MYSQL_USER@@'); 17 | define('MYSQL_PASS', '@@MYSQL_PASS@@'); 18 | 19 | define('TABLE_PREFIX', 'inf_'); 20 | 21 | else : 22 | 23 | /* * ** DEV ENVIRONMENT *** */ 24 | define('MYSQL_HOST', 'localhost'); 25 | define('MYSQL_DB', 'influence_networks'); 26 | define('MYSQL_USER', 'root'); 27 | define('MYSQL_PASS', 'root'); 28 | 29 | define('TABLE_PREFIX', 'inf_'); 30 | 31 | endif; 32 | 33 | 34 | // list of every screen 35 | $arrScreen = Array( 36 | "404" => "./appinc/screen/inc.homepage.php", 37 | "page" => "./appinc/screen/inc.page.php", 38 | "homepage" => "./appinc/screen/inc.homepage.php", 39 | "relation-add" => "./appinc/screen/inc.relation-add.php", 40 | "relation-review" => "./appinc/screen/inc.relation-review.php", 41 | "relation-visualize" => "./appinc/screen/inc.relation-visualize.php", 42 | "relation-visualise" => "./appinc/screen/inc.relation-visualize.php", // retro-compatibility 43 | "relation-visualize-embed" => "./appinc/screen/inc.relation-visualize-embed.php" 44 | ); 45 | 46 | 47 | define("PAGES_PROVIDER", "http://in.oeildupirate.com/"); 48 | 49 | // Sharing configuration 50 | // ----------------------- 51 | define("DOC_URL", "http://influencenetworks.org"); 52 | define("DOC_TITLE", "[APP] Influence Networks lets you see how public figures know each other"); 53 | define("DOC_TWUSER", "owni"); 54 | define("GA_PROFILE", "UA-18463169-5"); 55 | 56 | define("FREEBASE_USERNAME", "@@FREEBASE_USER@@"); 57 | define("FREEBASE_PASSWORD", "@@FREEBASE_PASS@@"); 58 | 59 | define("FREEBASE_API_LOGIN", "https://api.freebase.com/api/account/login"); 60 | define("FREEBASE_API_MQLWRITE", "https://api.freebase.com/api/service/mqlwrite"); 61 | define("FREEBASE_API_MQLREAD", "http://www.freebase.com/api/service/mqlread"); 62 | 63 | // define("FREEBASE_API_LOGIN", "https://api.sandbox-freebase.com/api/account/login"); 64 | // define("FREEBASE_API_MQLWRITE", "https://api.sandbox-freebase.com/api/service/mqlwrite"); 65 | // define("FREEBASE_API_MQLREAD", "http://www.sandbox-freebase.com/api/service/mqlread"); 66 | 67 | 68 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_private_object_function.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 33 | // check and get attributes 34 | $_attr = $this->_get_attributes($args); 35 | if ($_attr['nocache'] === true) { 36 | $this->compiler->tag_nocache = true; 37 | } 38 | unset($_attr['nocache']); 39 | $_assign = null; 40 | if (isset($_attr['assign'])) { 41 | $_assign = $_attr['assign']; 42 | unset($_attr['assign']); 43 | } 44 | // convert attributes into parameter array string 45 | if ($this->compiler->smarty->registered_objects[$tag][2]) { 46 | $_paramsArray = array(); 47 | foreach ($_attr as $_key => $_value) { 48 | if (is_int($_key)) { 49 | $_paramsArray[] = "$_key=>$_value"; 50 | } else { 51 | $_paramsArray[] = "'$_key'=>$_value"; 52 | } 53 | } 54 | $_params = 'array(' . implode(",", $_paramsArray) . ')'; 55 | $return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params},\$_smarty_tpl)"; 56 | } else { 57 | $_params = implode(",", $_attr); 58 | $return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$methode}({$_params})"; 59 | } 60 | if (empty($_assign)) { 61 | // This tag does create output 62 | $this->compiler->has_output = true; 63 | $output = "\n"; 64 | } else { 65 | $output = "assign({$_assign},{$return});?>\n"; 66 | } 67 | return $output; 68 | } 69 | } 70 | 71 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_resource_eval.php: -------------------------------------------------------------------------------- 1 | smarty = $smarty; 20 | } 21 | // classes used for compiling Smarty templates from file resource 22 | public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler'; 23 | public $template_lexer_class = 'Smarty_Internal_Templatelexer'; 24 | public $template_parser_class = 'Smarty_Internal_Templateparser'; 25 | // properties 26 | public $usesCompiler = true; 27 | public $isEvaluated = true; 28 | 29 | /** 30 | * Return flag if template source is existing 31 | * 32 | * @return boolean true 33 | */ 34 | public function isExisting($template) 35 | { 36 | return true; 37 | } 38 | 39 | /** 40 | * Get filepath to template source 41 | * 42 | * @param object $_template template object 43 | * @return string return 'string' as template source is not a file 44 | */ 45 | public function getTemplateFilepath($_template) 46 | { 47 | // no filepath for evaluated strings 48 | // return "string" for compiler error messages 49 | return 'eval:'; 50 | } 51 | 52 | /** 53 | * Get timestamp to template source 54 | * 55 | * @param object $_template template object 56 | * @return boolean false as string resources have no timestamp 57 | */ 58 | public function getTemplateTimestamp($_template) 59 | { 60 | // evaluated strings must always be compiled and have no timestamp 61 | return false; 62 | } 63 | 64 | /** 65 | * Retuen template source from resource name 66 | * 67 | * @param object $_template template object 68 | * @return string content of template source 69 | */ 70 | public function getTemplateSource($_template) 71 | { 72 | // return template string 73 | $_template->template_source = $_template->resource_name; 74 | return true; 75 | } 76 | 77 | /** 78 | * Get filepath to compiled template 79 | * 80 | * @param object $_template template object 81 | * @return boolean return false as compiled template is not stored 82 | */ 83 | public function getCompiledFilepath($_template) 84 | { 85 | // no filepath for strings 86 | return false; 87 | } 88 | } 89 | ?> -------------------------------------------------------------------------------- /appinc/class/manager/RelationValueManager.class.php: -------------------------------------------------------------------------------- 1 | db->query($query) or die("Database error. Sorry, try again."); 27 | 28 | $values = array(); 29 | while( $row = $this->db->fetch() ) { 30 | 31 | $prop = new Relation_value($row); 32 | $values[$row["property"]] = $prop; 33 | $this->values[$row["id"]] = $prop; 34 | } 35 | 36 | return $values; 37 | 38 | } else return false; 39 | 40 | } 41 | 42 | public function getRelationValuesJSON($relation_id) { 43 | 44 | if(is_numeric($relation_id)) { 45 | 46 | $values = $this->getRelationValues($relation_id); 47 | $valuesPublic = array(); 48 | 49 | /* @var $v Relation_value */ 50 | foreach($values as $key => &$v) { 51 | 52 | $valuesPublic[ $v->getId() ] = Array("value" => $v->getValue (), 53 | "property" => $v->getProperty(), 54 | "relation" => $v->getRelation(), 55 | "label" => $v->getPropertyLabel()); 56 | } 57 | 58 | return json_encode($valuesPublic); 59 | 60 | } else return false; 61 | 62 | } 63 | 64 | public function getValues() { 65 | return $this->values; 66 | } 67 | 68 | public function setValues($properties) { 69 | $this->values = $properties; 70 | } 71 | 72 | } 73 | 74 | ?> 75 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_smartytemplatecompiler.php: -------------------------------------------------------------------------------- 1 | smarty = $smarty; 27 | parent::__construct(); 28 | // get required plugins 29 | $this->lexer_class = $lexer_class; 30 | $this->parser_class = $parser_class; 31 | } 32 | 33 | /** 34 | * Methode to compile a Smarty template 35 | * 36 | * @param $_content template source 37 | * @return bool true if compiling succeeded, false if it failed 38 | */ 39 | protected function doCompile($_content) 40 | { 41 | /* here is where the compiling takes place. Smarty 42 | tags in the templates are replaces with PHP code, 43 | then written to compiled files. */ 44 | // init the lexer/parser to compile the template 45 | $this->lex = new $this->lexer_class($_content, $this); 46 | $this->parser = new $this->parser_class($this->lex, $this); 47 | if (isset($this->smarty->_parserdebug)) $this->parser->PrintTrace(); 48 | // get tokens from lexer and parse them 49 | while ($this->lex->yylex() && !$this->abort_and_recompile) { 50 | if (isset($this->smarty->_parserdebug)) echo "
    Line {$this->lex->line} Parsing  {$this->parser->yyTokenName[$this->lex->token]} Token " . htmlentities($this->lex->value) . "
    "; 51 | $this->parser->doParse($this->lex->token, $this->lex->value); 52 | } 53 | 54 | if ($this->abort_and_recompile) { 55 | // exit here on abort 56 | return false; 57 | } 58 | // finish parsing process 59 | $this->parser->doParse(0, 0); 60 | // check for unclosed tags 61 | if (count($this->_tag_stack) > 0) { 62 | // get stacked info 63 | list($_open_tag, $_data) = array_pop($this->_tag_stack); 64 | $this->trigger_template_error("unclosed {" . $_open_tag . "} tag"); 65 | } 66 | // return compiled code 67 | // return str_replace(array("? >\nparser->retvalue); 68 | return $this->parser->retvalue; 69 | } 70 | } 71 | 72 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_capture.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 30 | // check and get attributes 31 | $_attr = $this->_get_attributes($args); 32 | 33 | $buffer = isset($_attr['name']) ? $_attr['name'] : "'default'"; 34 | $assign = isset($_attr['assign']) ? $_attr['assign'] : null; 35 | $append = isset($_attr['append']) ? $_attr['append'] : null; 36 | 37 | $this->compiler->_capture_stack[] = array($buffer, $assign, $append, $this->compiler->nocache); 38 | // maybe nocache because of nocache variables 39 | $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; 40 | $_output = ""; 41 | 42 | return $_output; 43 | } 44 | } 45 | 46 | /** 47 | * Smarty Internal Plugin Compile Captureclose Class 48 | */ 49 | class Smarty_Internal_Compile_CaptureClose extends Smarty_Internal_CompileBase { 50 | /** 51 | * Compiles code for the {/capture} tag 52 | * 53 | * @param array $args array with attributes from parser 54 | * @param object $compiler compiler object 55 | * @return string compiled code 56 | */ 57 | public function compile($args, $compiler) 58 | { 59 | $this->compiler = $compiler; 60 | // check and get attributes 61 | $_attr = $this->_get_attributes($args); 62 | // must endblock be nocache? 63 | if ($this->compiler->nocache) { 64 | $this->compiler->tag_nocache = true; 65 | } 66 | 67 | list($buffer, $assign, $append, $this->compiler->nocache) = array_pop($this->compiler->_capture_stack); 68 | 69 | $_output = "assign($assign, ob_get_contents());"; 72 | } 73 | if (isset($append)) { 74 | $_output .= " \$_smarty_tpl->append($append, ob_get_contents());"; 75 | } 76 | $_output .= " Smarty::\$_smarty_vars['capture'][$buffer]=ob_get_clean();?>"; 77 | return $_output; 78 | } 79 | } 80 | 81 | ?> -------------------------------------------------------------------------------- /appinc/javascript/jquery/jquery.rotate.js: -------------------------------------------------------------------------------- 1 | /* 2 | * rotate: A jQuery cssHooks adding a cross browser 'rotate' property to $.fn.css() and $.fn.animate() 3 | * 4 | * Copyright (c) 2010 Louis-Rémi Babé 5 | * Licensed under the MIT license. 6 | * 7 | * This saved you an hour of work? 8 | * Send me music http://www.amazon.fr/wishlist/HNTU0468LQON 9 | * 10 | */ 11 | (function($) { 12 | 13 | var div = document.createElement('div'), 14 | divStyle = div.style, 15 | support = $.support, 16 | rmatrixFilter = /M\d{2}=([\d+.\-]+)/g; 17 | 18 | support.transform = 19 | divStyle.MozTransform === ''? 'MozTransform' : 20 | (divStyle.WebkitTransform === ''? 'WebkitTransform' : 21 | (divStyle.OTransform === ''? 'OTransform' : 22 | false)); 23 | support.matrixFilter = !support.transform && divStyle.filter === ''; 24 | 25 | $.cssNumber.rotate = true; 26 | $.cssHooks.rotate = { 27 | set: function( elem, value ) { 28 | var _support = support, 29 | supportTransform = _support.transform, 30 | cos, sin, 31 | centerOrigin; 32 | 33 | if (typeof value === 'string') { 34 | value = toRadian(value); 35 | } 36 | 37 | $.data( elem, 'transform', { 38 | rotate: value 39 | }); 40 | 41 | if (supportTransform) { 42 | elem.style[supportTransform] = 'rotate('+ value +'rad)'; 43 | 44 | } else if (_support.matrixFilter) { 45 | cos = Math.cos(value); 46 | sin = Math.sin(value); 47 | elem.style.filter = [ 48 | "progid:DXImageTransform.Microsoft.Matrix(", 49 | "M11="+cos+",", 50 | "M12="+(-sin)+",", 51 | "M21="+sin+",", 52 | "M22="+cos+",", 53 | "SizingMethod='auto expand'", 54 | ")" 55 | ].join(''); 56 | 57 | if(centerOrigin = $.rotate.centerOrigin) { 58 | elem.style[centerOrigin == 'margin' ? 'marginLeft' : 'left'] = -(elem.offsetWidth/2) + (elem.clientWidth/2) + "px"; 59 | elem.style[centerOrigin == 'margin' ? 'marginTop' : 'top'] = -(elem.offsetHeight/2) + (elem.clientHeight/2) + "px"; 60 | } 61 | } 62 | }, 63 | get: function( elem, computed ) { 64 | var transform = $.data( elem, 'transform' ); 65 | return transform && transform.rotate? 66 | // Make sure the value is always between 0 and 2PI 67 | (transform.rotate + (transform.rotate < 0? 2*Math.PI : 0))%(2*Math.PI) : 68 | 0; 69 | } 70 | } 71 | $.fx.step.rotate = function( fx ) { 72 | $.cssHooks.rotate.set( fx.elem, fx.now+fx.unit ); 73 | } 74 | 75 | function radToDeg( rad ) { 76 | return rad * 180 / Math.PI; 77 | } 78 | function toRadian(value) { 79 | if(value.indexOf("deg") != -1) { 80 | return parseInt(value,10) * (Math.PI * 2 / 360); 81 | } else if (value.indexOf("grad") != -1) { 82 | return parseInt(value,10) * (Math.PI/200); 83 | } 84 | return parseFloat(value,10); 85 | } 86 | 87 | $.rotate = { 88 | centerOrigin: 'margin', 89 | radToDeg: radToDeg 90 | }; 91 | 92 | })(jQuery); -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_filter_handler.php: -------------------------------------------------------------------------------- 1 | smarty->variable_filter && $flag !== false) || $flag === true) { 33 | // loop over autoload filters of specified type 34 | if (!empty($template->smarty->autoload_filters[$type])) { 35 | foreach ((array)$template->smarty->autoload_filters[$type] as $name) { 36 | $plugin_name = "Smarty_{$type}filter_{$name}"; 37 | if ($template->smarty->loadPlugin($plugin_name)) { 38 | if (function_exists($plugin_name)) { 39 | // use loaded Smarty2 style plugin 40 | $output = $plugin_name($output, $template); 41 | } elseif (class_exists($plugin_name, false)) { 42 | // loaded class of filter plugin 43 | $output = call_user_func(array($plugin_name, 'execute'), $output, $template); 44 | } 45 | } else { 46 | // nothing found, throw exception 47 | throw new SmartyException("Unable to load filter {$plugin_name}"); 48 | } 49 | } 50 | } 51 | // loop over registerd filters of specified type 52 | if (!empty($template->smarty->registered_filters[$type])) { 53 | foreach ($template->smarty->registered_filters[$type] as $key => $name) { 54 | if (is_array($template->smarty->registered_filters[$type][$key])) { 55 | $output = call_user_func($template->smarty->registered_filters[$type][$key], $output, $template); 56 | } else { 57 | $output = $template->smarty->registered_filters[$type][$key]($output, $template); 58 | } 59 | } 60 | } 61 | } 62 | // return filtered output 63 | return $output; 64 | } 65 | } 66 | 67 | ?> -------------------------------------------------------------------------------- /appinc/template/screen/homepage.tpl: -------------------------------------------------------------------------------- 1 |
    2 | 3 |

    Homepage

    4 |
    5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |

    {$intro->title}

    13 |
    14 | {$intro->content} 15 |
    16 |
    17 | 18 | 19 | 20 |
    21 |

    Influence Networks for Journalists

    22 |
    23 | {$forJournalists->content} 24 |
    25 |
    26 | 27 |
    28 |

    Influence Networks for Citizens

    29 |
    30 | {$forCitizens->content} 31 |
    32 |
    33 | 34 |
    35 |

    Influence Networks for Developers

    36 |
    37 | {$forDevelopers->content} 38 |
    39 |
    40 | 41 |
    42 | 43 | 44 | 45 |
    46 |

    {t}Influence Networks in the News{/t}

    47 |
      48 |
    • 49 | 50 |
      Sem quis congue suscipit, augue nulla.
      51 |

      The Guardian, December 18th, 2011

      52 |
    • 53 |
    • 54 | 55 |
      Sem quis congue suscipit, augue nulla.
      56 |

      The Guardian, December 18th, 2011

      57 |
    • 58 |
    • 59 | 60 |
      Sem quis congue suscipit, augue nulla.
      61 |

      The Guardian, December 18th, 2011

      62 |
    • 63 |
    • 64 | 65 |
      Sem quis congue suscipit, augue nulla.
      66 |

      The Guardian, December 18th, 2011

      67 |
    • 68 |
    69 | 70 |
    71 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/function.math.php: -------------------------------------------------------------------------------- 1 | 14 | * Name: math
    15 | * Purpose: handle math computations in template
    16 | * @link http://smarty.php.net/manual/en/language.function.math.php {math} 17 | * (Smarty online manual) 18 | * @author Monte Ohrt 19 | * @param array $params parameters 20 | * @param object $template template object 21 | * @return string|null 22 | */ 23 | function smarty_function_math($params, $template) 24 | { 25 | // be sure equation parameter is present 26 | if (empty($params['equation'])) { 27 | trigger_error("math: missing equation parameter",E_USER_WARNING); 28 | return; 29 | } 30 | 31 | $equation = $params['equation']; 32 | 33 | // make sure parenthesis are balanced 34 | if (substr_count($equation,"(") != substr_count($equation,")")) { 35 | trigger_error("math: unbalanced parenthesis",E_USER_WARNING); 36 | return; 37 | } 38 | 39 | // match all vars in equation, make sure all are passed 40 | preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]*)!",$equation, $match); 41 | $allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10', 42 | 'max','min','pi','pow','rand','round','sin','sqrt','srand','tan'); 43 | 44 | foreach($match[1] as $curr_var) { 45 | if ($curr_var && !in_array($curr_var, array_keys($params)) && !in_array($curr_var, $allowed_funcs)) { 46 | trigger_error("math: function call $curr_var not allowed",E_USER_WARNING); 47 | return; 48 | } 49 | } 50 | 51 | foreach($params as $key => $val) { 52 | if ($key != "equation" && $key != "format" && $key != "assign") { 53 | // make sure value is not empty 54 | if (strlen($val)==0) { 55 | trigger_error("math: parameter $key is empty",E_USER_WARNING); 56 | return; 57 | } 58 | if (!is_numeric($val)) { 59 | trigger_error("math: parameter $key: is not numeric",E_USER_WARNING); 60 | return; 61 | } 62 | $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation); 63 | } 64 | } 65 | $smarty_math_result = null; 66 | eval("\$smarty_math_result = ".$equation.";"); 67 | 68 | if (empty($params['format'])) { 69 | if (empty($params['assign'])) { 70 | return $smarty_math_result; 71 | } else { 72 | $template->assign($params['assign'],$smarty_math_result); 73 | } 74 | } else { 75 | if (empty($params['assign'])){ 76 | printf($params['format'],$smarty_math_result); 77 | } else { 78 | $template->assign($params['assign'],sprintf($params['format'],$smarty_math_result)); 79 | } 80 | } 81 | } 82 | 83 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_resource_stream.php: -------------------------------------------------------------------------------- 1 | smarty = $smarty; 20 | } 21 | // classes used for compiling Smarty templates from file resource 22 | public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler'; 23 | public $template_lexer_class = 'Smarty_Internal_Templatelexer'; 24 | public $template_parser_class = 'Smarty_Internal_Templateparser'; 25 | // properties 26 | public $usesCompiler = true; 27 | public $isEvaluated = true; 28 | 29 | /** 30 | * Return flag if template source is existing 31 | * 32 | * @return boolean true 33 | */ 34 | public function isExisting($template) 35 | { 36 | if ($template->getTemplateSource() == '') { 37 | return false; 38 | } else { 39 | return true; 40 | } 41 | } 42 | /** 43 | * Get filepath to template source 44 | * 45 | * @param object $_template template object 46 | * @return string return 'string' as template source is not a file 47 | */ 48 | public function getTemplateFilepath($_template) 49 | { 50 | // no filepath for strings 51 | // return resource name for compiler error messages 52 | return str_replace(':', '://', $_template->template_resource); 53 | } 54 | 55 | /** 56 | * Get timestamp to template source 57 | * 58 | * @param object $_template template object 59 | * @return boolean false as string resources have no timestamp 60 | */ 61 | public function getTemplateTimestamp($_template) 62 | { 63 | // strings must always be compiled and have no timestamp 64 | return false; 65 | } 66 | 67 | /** 68 | * Retuen template source from resource name 69 | * 70 | * @param object $_template template object 71 | * @return string content of template source 72 | */ 73 | public function getTemplateSource($_template) 74 | { 75 | // return template string 76 | $_template->template_source = ''; 77 | $fp = fopen(str_replace(':', '://', $_template->template_resource),'r+'); 78 | while (!feof($fp)) { 79 | $_template->template_source .= fgets($fp); 80 | } 81 | fclose($fp); 82 | 83 | return true; 84 | } 85 | 86 | /** 87 | * Get filepath to compiled template 88 | * 89 | * @param object $_template template object 90 | * @return boolean return false as compiled template is not stored 91 | */ 92 | public function getCompiledFilepath($_template) 93 | { 94 | // no filepath for strings 95 | return false; 96 | } 97 | } 98 | 99 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/outputfilter.trimwhitespace.php: -------------------------------------------------------------------------------- 1 | 13 | * Type: outputfilter
    14 | * Name: trimwhitespace
    15 | * Date: Jan 25, 2003
    16 | * Purpose: trim leading white space and blank lines from 17 | * template source after it gets interpreted, cleaning 18 | * up code and saving bandwidth. Does not affect 19 | * <
    >
    and blocks.
    20 | * Install: Drop into the plugin directory, call 21 | * $smarty->load_filter('output','trimwhitespace'); 22 | * from application. 23 | * @author Monte Ohrt 24 | * @author Contributions from Lars Noschinski 25 | * @version 1.3 26 | * @param string $source input string 27 | * @param object &$smarty Smarty object 28 | * @return string filtered output 29 | */ 30 | function smarty_outputfilter_trimwhitespace($source, $smarty) 31 | { 32 | // Pull out the script blocks 33 | preg_match_all("!]*?>.*?!is", $source, $match); 34 | $_script_blocks = $match[0]; 35 | $source = preg_replace("!]*?>.*?!is", 36 | '@@@SMARTY:TRIM:SCRIPT@@@', $source); 37 | 38 | // Pull out the pre blocks 39 | preg_match_all("!]*?>.*?!is", $source, $match); 40 | $_pre_blocks = $match[0]; 41 | $source = preg_replace("!]*?>.*?!is", 42 | '@@@SMARTY:TRIM:PRE@@@', $source); 43 | 44 | // Pull out the textarea blocks 45 | preg_match_all("!]*?>.*?!is", $source, $match); 46 | $_textarea_blocks = $match[0]; 47 | $source = preg_replace("!]*?>.*?!is", 48 | '@@@SMARTY:TRIM:TEXTAREA@@@', $source); 49 | 50 | // remove all leading spaces, tabs and carriage returns NOT 51 | // preceeded by a php close tag. 52 | $source = trim(preg_replace('/((?)\n)[\s]+/m', '\1', $source)); 53 | 54 | // replace textarea blocks 55 | smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source); 56 | 57 | // replace pre blocks 58 | smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source); 59 | 60 | // replace script blocks 61 | smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source); 62 | 63 | return $source; 64 | } 65 | 66 | function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) { 67 | $_len = strlen($search_str); 68 | $_pos = 0; 69 | for ($_i=0, $_count=count($replace); $_i<$_count; $_i++) 70 | if (($_pos=strpos($subject, $search_str, $_pos))!==false) 71 | $subject = substr_replace($subject, $replace[$_i], $_pos, $_len); 72 | else 73 | break; 74 | 75 | } 76 | 77 | ?> -------------------------------------------------------------------------------- /appinc/screen/inc.relation-review.php: -------------------------------------------------------------------------------- 1 | 10 | * 11 | */ 12 | // assing the screen 13 | $s->assign('screen', 'relation-review'); 14 | 15 | // page title 16 | $s->assign('pageTitle', _('Review')); 17 | 18 | if (!$managers["user"]->isConnected()) 19 | $err[] = Array("time" => time(), "msg" => _("You must be connected to review a relation.")); 20 | else { 21 | 22 | // check if we need to add a relation 23 | if (isset($_POST["relation-id"]) && isset($_POST["rate"])) 24 | $managers['relation_trust_level']->addTrustLevel(); 25 | 26 | 27 | if (isset($_GET["id"]) && is_numeric($_GET["id"])) { 28 | /* @var $relation Relation */ 29 | $relation = $managers["relation"]->getRelation($_GET["id"]); 30 | if (!!$relation) 31 | // to load property from db 32 | $relation->setPropertyValues($managers["relation_value"]->getRelationValues($relation->getId())); // 33 | } else // get random relation 34 | /* @var $relation Relation */ 35 | $relation = $managers["relation"]->getRandRelation(); 36 | 37 | 38 | 39 | if ($relation === false) 40 | $err[] = Array("time" => time(), "msg" => _("There is no relation to review.")); 41 | 42 | 43 | if ($relation->getCreator() == $_SESSION["user_id"]) { 44 | $relation = false; 45 | $err[] = Array("time" => time(), "msg" => _("You can't review a relation you have created.")); 46 | } 47 | 48 | $s->assign("relation", $relation); 49 | 50 | if (!!$relation) { 51 | 52 | $s->assign("relation_value", $relation->getPropertyValues()); 53 | 54 | /* @var $entity_left Node */ 55 | $entity_left = $managers["node"]->getNode($relation->getNodeLeft()); 56 | // assign Smarty variable 57 | if (!!$entity_left) 58 | $s->assign("entity_left", $entity_left); 59 | 60 | 61 | /* @var $entity_right Node */ 62 | $entity_right = $managers["node"]->getNode($relation->getNodeRight()); 63 | // assign Smarty variable 64 | if (!!$entity_right) 65 | $s->assign("entity_right", $entity_right); 66 | 67 | 68 | /* @var $relation_type Relation_type */ 69 | $relation_type = $managers["relation_type"]->getType($relation->getType()); 70 | $s->assign("relation_type", $relation_type); 71 | } 72 | } 73 | 74 | 75 | $s->assign("countRelation", $managers["relation"]->getRelationCount()); 76 | $s->assign("countRelationReview", $managers["relation_trust_level"]->getRelationTrustLevelCount()); 77 | $s->assign("countUser", $managers["user"]->getUserCount()); 78 | 79 | // every errors to a JSON 80 | $s->assign("err_json", json_encode($err)); 81 | $s->display('index.tpl'); 82 | ?> 83 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/modifier.debug_print_var.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: debug_print_var
    14 | * Purpose: formats variable contents for display in the console 15 | * 16 | * @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php debug_print_var (Smarty online manual) 17 | * @author Monte Ohrt 18 | * @param array $ |object 19 | * @param integer $ 20 | * @param integer $ 21 | * @return string 22 | */ 23 | function smarty_modifier_debug_print_var ($var, $depth = 0, $length = 40) 24 | { 25 | $_replace = array("\n" => '\n', 26 | "\r" => '\r', 27 | "\t" => '\t' 28 | ); 29 | 30 | switch (gettype($var)) { 31 | case 'array' : 32 | $results = 'Array (' . count($var) . ')'; 33 | foreach ($var as $curr_key => $curr_val) { 34 | $results .= '
    ' . str_repeat(' ', $depth * 2) 35 | . '' . strtr($curr_key, $_replace) . ' => ' 36 | . smarty_modifier_debug_print_var($curr_val, ++$depth, $length); 37 | $depth--; 38 | } 39 | break; 40 | case 'object' : 41 | $object_vars = get_object_vars($var); 42 | $results = '' . get_class($var) . ' Object (' . count($object_vars) . ')'; 43 | foreach ($object_vars as $curr_key => $curr_val) { 44 | $results .= '
    ' . str_repeat(' ', $depth * 2) 45 | . ' ->' . strtr($curr_key, $_replace) . ' = ' 46 | . smarty_modifier_debug_print_var($curr_val, ++$depth, $length); 47 | $depth--; 48 | } 49 | break; 50 | case 'boolean' : 51 | case 'NULL' : 52 | case 'resource' : 53 | if (true === $var) { 54 | $results = 'true'; 55 | } elseif (false === $var) { 56 | $results = 'false'; 57 | } elseif (null === $var) { 58 | $results = 'null'; 59 | } else { 60 | $results = htmlspecialchars((string) $var); 61 | } 62 | $results = '' . $results . ''; 63 | break; 64 | case 'integer' : 65 | case 'float' : 66 | $results = htmlspecialchars((string) $var); 67 | break; 68 | case 'string' : 69 | $results = strtr($var, $_replace); 70 | if (strlen($var) > $length) { 71 | $results = substr($var, 0, $length - 3) . '...'; 72 | } 73 | $results = htmlspecialchars('"' . $results . '"'); 74 | break; 75 | case 'unknown type' : 76 | default : 77 | $results = strtr((string) $var, $_replace); 78 | if (strlen($results) > $length) { 79 | $results = substr($results, 0, $length - 3) . '...'; 80 | } 81 | $results = htmlspecialchars($results); 82 | } 83 | 84 | return $results; 85 | } 86 | 87 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_private_modifier.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 27 | $this->smarty = $this->compiler->smarty; 28 | // check and get attributes 29 | $_attr = $this->_get_attributes($args); 30 | $output = $parameter['value']; 31 | // loop over list of modifiers 32 | foreach ($parameter['modifierlist'] as $single_modifier) { 33 | $modifier = $single_modifier[0]; 34 | $single_modifier[0] = $output; 35 | $params = implode(',', $single_modifier); 36 | // check for registered modifier 37 | if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier])) { 38 | $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0]; 39 | if (!is_array($function)) { 40 | $output = "{$function}({$params})"; 41 | } else { 42 | if (is_object($function[0])) { 43 | $output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' . $modifier . '\'][0][0]->' . $function[1] . '(' . $params . ')'; 44 | } else { 45 | $output = $function[0] . '::' . $function[1] . '(' . $params . ')'; 46 | } 47 | } 48 | // check for plugin modifiercompiler 49 | } else if ($compiler->smarty->loadPlugin('smarty_modifiercompiler_' . $modifier)) { 50 | $plugin = 'smarty_modifiercompiler_' . $modifier; 51 | $output = $plugin($single_modifier, $compiler); 52 | // check for plugin modifier 53 | } else if ($function = $this->compiler->getPlugin($modifier, Smarty::PLUGIN_MODIFIER)) { 54 | $output = "{$function}({$params})"; 55 | // check if trusted PHP function 56 | } else if (is_callable($modifier)) { 57 | // check if modifier allowed 58 | if (!is_object($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedModifier($modifier, $this->compiler)) { 59 | $output = "{$modifier}({$params})"; 60 | } 61 | } else { 62 | $this->compiler->trigger_template_error ("unknown modifier \"" . $modifier . "\"", $this->compiler->lex->taglineno); 63 | } 64 | } 65 | return $output; 66 | } 67 | } 68 | 69 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_include_php.php: -------------------------------------------------------------------------------- 1 | smarty->allow_php_tag) { 32 | throw new SmartyException("{include_php} is deprecated, set allow_php_tag = true to enable"); 33 | } 34 | $this->compiler = $compiler; 35 | // check and get attributes 36 | $_attr = $this->_get_attributes($args); 37 | 38 | $_output = 'template; 41 | $_filepath = false; 42 | eval('$_file = ' . $_attr['file'] . ';'); 43 | if (!isset($this->compiler->smarty->security_policy) && file_exists($_file)) { 44 | $_filepath = $_file; 45 | } else { 46 | if (isset($this->compiler->smarty->security_policy)) { 47 | $_dir = $this->compiler->smarty->security_policy->trusted_dir; 48 | } else { 49 | $_dir = $this->compiler->smarty->trusted_dir; 50 | } 51 | if (!empty($_dir)) { 52 | foreach((array)$_dir as $_script_dir) { 53 | if (strpos('/\\', substr($_script_dir, -1)) === false) { 54 | $_script_dir .= DS; 55 | } 56 | if (file_exists($_script_dir . $_file)) { 57 | $_filepath = $_script_dir . $_file; 58 | break; 59 | } 60 | } 61 | } 62 | } 63 | if ($_filepath == false) { 64 | $this->compiler->trigger_template_error("{include_php} file '{$_file}' is not readable", $this->compiler->lex->taglineno); 65 | } 66 | 67 | if (isset($this->compiler->smarty->security_policy)) { 68 | $this->compiler->smarty->security_policy->isTrustedPHPDir($_filepath); 69 | } 70 | 71 | if (isset($_attr['assign'])) { 72 | // output will be stored in a smarty variable instead of being displayed 73 | $_assign = $_attr['assign']; 74 | } 75 | $_once = '_once'; 76 | if (isset($_attr['once'])) { 77 | if ($_attr['once'] == 'false') { 78 | $_once = ''; 79 | } 80 | } 81 | 82 | if (isset($_assign)) { 83 | return "assign({$_assign},ob_get_contents()); ob_end_clean();?>"; 84 | } else { 85 | return "\n"; 86 | } 87 | } 88 | } 89 | 90 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_private_print_expression.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 31 | // check and get attributes 32 | $_attr = $this->_get_attributes($args); 33 | // nocache option 34 | if ($_attr['nocache'] === true) { 35 | $this->compiler->tag_nocache = true; 36 | } 37 | // filter handling 38 | if ($_attr['nofilter'] === true) { 39 | $_filter = 'false'; 40 | } else { 41 | $_filter = 'true'; 42 | } 43 | // compiled output 44 | // compiled output 45 | if (isset($_attr['assign'])) { 46 | // assign output to variable 47 | $output = "assign({$_attr['assign']},{$parameter['value']});?>"; 48 | } else { 49 | // display value 50 | if (!$_attr['nofilter'] && isset($this->compiler->smarty->registered_filters['variable'])) { 51 | $output = "Smarty_Internal_Filter_Handler::runFilter('variable', {$parameter['value']}, \$_smarty_tpl, {$_filter})"; 52 | } else { 53 | $output = $parameter['value']; 54 | } 55 | if (!$_attr['nofilter'] && !empty($this->compiler->smarty->default_modifiers)) { 56 | $modifierlist = array(); 57 | foreach ($this->compiler->smarty->default_modifiers as $key => $single_default_modifier) { 58 | preg_match_all('/(\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|:|[^:]+)/', $single_default_modifier, $mod_array); 59 | for ($i = 0, $count = count($mod_array[0]);$i < $count;$i++) { 60 | if ($mod_array[0][$i] != ':') { 61 | $modifierlist[$key][] = $mod_array[0][$i]; 62 | } 63 | } 64 | } 65 | $output = $this->compiler->compileTag('private_modifier', array(), array('modifierlist' => $modifierlist, 'value' => $output)); 66 | } 67 | if (!empty($parameter['modifierlist'])) { 68 | $output = $this->compiler->compileTag('private_modifier', array(), array('modifierlist' => $parameter['modifierlist'], 'value' => $output)); 69 | } 70 | $this->compiler->has_output = true; 71 | $output = ""; 72 | } 73 | return $output; 74 | } 75 | } 76 | 77 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/plugins/block.textformat.php: -------------------------------------------------------------------------------- 1 | 13 | * Name: textformat
    14 | * Purpose: format text a certain way with preset styles 15 | * or custom wrap/indent settings
    16 | * 17 | * @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat} 18 | * (Smarty online manual) 19 | * @param array $params parameters 20 | *
     21 |  * Params:   style: string (email)
     22 |  *            indent: integer (0)
     23 |  *            wrap: integer (80)
     24 |  *            wrap_char string ("\n")
     25 |  *            indent_char: string (" ")
     26 |  *            wrap_boundary: boolean (true)
     27 |  * 
    28 | * @author Monte Ohrt 29 | * @param string $content contents of the block 30 | * @param object $template template object 31 | * @param boolean &$repeat repeat flag 32 | * @return string content re-formatted 33 | */ 34 | function smarty_block_textformat($params, $content, $template, &$repeat) 35 | { 36 | if (is_null($content)) { 37 | return; 38 | } 39 | 40 | $style = null; 41 | $indent = 0; 42 | $indent_first = 0; 43 | $indent_char = ' '; 44 | $wrap = 80; 45 | $wrap_char = "\n"; 46 | $wrap_cut = false; 47 | $assign = null; 48 | 49 | foreach ($params as $_key => $_val) { 50 | switch ($_key) { 51 | case 'style': 52 | case 'indent_char': 53 | case 'wrap_char': 54 | case 'assign': 55 | $$_key = (string)$_val; 56 | break; 57 | 58 | case 'indent': 59 | case 'indent_first': 60 | case 'wrap': 61 | $$_key = (int)$_val; 62 | break; 63 | 64 | case 'wrap_cut': 65 | $$_key = (bool)$_val; 66 | break; 67 | 68 | default: 69 | trigger_error("textformat: unknown attribute '$_key'"); 70 | } 71 | } 72 | 73 | if ($style == 'email') { 74 | $wrap = 72; 75 | } 76 | // split into paragraphs 77 | $_paragraphs = preg_split('![\r\n][\r\n]!', $content); 78 | $_output = ''; 79 | 80 | for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) { 81 | if ($_paragraphs[$_x] == '') { 82 | continue; 83 | } 84 | // convert mult. spaces & special chars to single space 85 | $_paragraphs[$_x] = preg_replace(array('!\s+!', '!(^\s+)|(\s+$)!'), array(' ', ''), $_paragraphs[$_x]); 86 | // indent first line 87 | if ($indent_first > 0) { 88 | $_paragraphs[$_x] = str_repeat($indent_char, $indent_first) . $_paragraphs[$_x]; 89 | } 90 | // wordwrap sentences 91 | $_paragraphs[$_x] = wordwrap($_paragraphs[$_x], $wrap - $indent, $wrap_char, $wrap_cut); 92 | // indent lines 93 | if ($indent > 0) { 94 | $_paragraphs[$_x] = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraphs[$_x]); 95 | } 96 | } 97 | $_output = implode($wrap_char . $wrap_char, $_paragraphs); 98 | 99 | return $assign ? $template->assign($assign, $_output) : $_output; 100 | } 101 | 102 | ?> -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/debug.tpl: -------------------------------------------------------------------------------- 1 | {capture name='_smarty_debug' assign=debug_output} 2 | 3 | 4 | 5 | Smarty Debug Console 6 | 86 | 87 | 88 | 89 |

    Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}

    90 | 91 | {if !empty($template_data)} 92 |

    included templates & config files (load time in seconds)

    93 | 94 |
    95 | {foreach $template_data as $template} 96 | {$template.name} 97 | 98 | (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"}) 99 | 100 |
    101 | {/foreach} 102 |
    103 | {/if} 104 | 105 |

    assigned template variables

    106 | 107 | 108 | {foreach $assigned_vars as $vars} 109 | 110 | 111 | 112 | {/foreach} 113 |
    ${$vars@key|escape:'html'}{$vars|debug_print_var}
    114 | 115 |

    assigned config file variables (outer template scope)

    116 | 117 | 118 | {foreach $config_vars as $vars} 119 | 120 | 121 | 122 | {/foreach} 123 | 124 |
    {$vars@key|escape:'html'}{$vars|debug_print_var}
    125 | 126 | 127 | {/capture} 128 | 134 | -------------------------------------------------------------------------------- /appinc/template/screen/relation-review.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    {t}Review a relation{/t}

    4 |

    Help us make sure that the information we collect is trustworthy.

    5 | 6 |
    7 | {*if there is a relation *} 8 | {if $relation} 9 | 10 |
    11 |

    A user indicated that

    12 | 13 | 14 | 15 | 28 | 29 | 30 |
    31 |

    {t}Relation type:{/t} {$relation_type->getLabel()}

    32 | {foreach from=$relation_value item=i key=k} 33 | 34 | {* Don't show empty value *} 35 | {if $i->getValue() != ""} 36 | 37 | {* Special format for URL *} 38 | {if $i->getPropertyLabel() == "Source"} 39 |

    40 | {$i->getPropertyLabel()}: link 41 |

    42 | {else} 43 |

    44 | 45 | {$i->getPropertyLabel()}: {$i->getValue()} 46 |

    47 | {/if} 48 | {/if} 49 | {/foreach} 50 |
    51 | 52 |

    {t}How reliable is this information?{/t}

    53 | 54 | 55 |
    56 | {t}It's not true{/t} 57 |
    58 |
    59 | {t}It's a fact{/t} 60 |
    61 |
    62 | 63 |
    64 | 65 | 66 |
    67 |
    68 | 69 | {/if} 70 |
    -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_private_block_plugin.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 32 | if (strlen($tag) < 6 || substr($tag, -5) != 'close') { 33 | // opening tag of block plugin 34 | // check and get attributes 35 | $_attr = $this->_get_attributes($args); 36 | if ($_attr['nocache'] === true) { 37 | $this->compiler->tag_nocache = true; 38 | } 39 | unset($_attr['nocache']); 40 | // convert attributes into parameter array string 41 | $_paramsArray = array(); 42 | foreach ($_attr as $_key => $_value) { 43 | if (is_int($_key)) { 44 | $_paramsArray[] = "$_key=>$_value"; 45 | } else { 46 | $_paramsArray[] = "'$_key'=>$_value"; 47 | } 48 | } 49 | $_params = 'array(' . implode(",", $_paramsArray) . ')'; 50 | 51 | $this->_open_tag($tag, array($_params, $this->compiler->nocache)); 52 | // maybe nocache because of nocache variables or nocache plugin 53 | $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; 54 | // compile code 55 | $output = "smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; {$function}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>"; 56 | } else { 57 | // must endblock be nocache? 58 | if ($this->compiler->nocache) { 59 | $this->compiler->tag_nocache = true; 60 | } 61 | // closing tag of block plugin, restore nocache 62 | list($_params, $this->compiler->nocache) = $this->_close_tag(substr($tag, 0, -5)); 63 | // This tag does create output 64 | $this->compiler->has_output = true; 65 | // compile code 66 | if (!isset($parameter['modifier_list'])) { 67 | $mod_pre = $mod_post =''; 68 | } else { 69 | $mod_pre = ' ob_start(); '; 70 | $mod_post = 'echo '.$this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';'; 71 | } 72 | $output = "smarty->_tag_stack);?>"; 73 | } 74 | return $output . "\n"; 75 | } 76 | } 77 | 78 | ?> -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Influence Networks 2 | 3 | [Influence Networks](http://influencenetworks.org) is an open-source, collaborative directory of relationships between people, institutions and companies. Each relation has its own level of trustworthiness, so that facts can be distinguished from noise. 4 | 5 | ## Issue report ## 6 | 7 | Go on [https://www.pivotaltracker.com/projects/336991](https://www.pivotaltracker.com/projects/336991) to report a bug. 8 | 9 | ## How does it work? ## 10 | 11 | There was a need for a network analysis tool who could be used by journalists and that be both open and reliable. Influence Networks aims at solving this problem. The platform allows for anyone to add a ‘relationship' in the database (though the "add a relation" tab). The bit of information the user inputs is given a "rumor" status as long as its reliability has not been assessed by another user. 12 | 13 | The "review a relation" tab allows for vetting the credibility of relations added by others. The user who validates can rate the relation on a scale going from "rumor" to "established fact". The rating the relation receives also depends on the trust level of the user who validates it. 14 | 15 | Let's take an example. Mathias registers on the platform. He starts with a trust level of 1 out of 5. He adds a valid piece of information, complete with source. The information is validated by a user who has a trust level of 5 out of 5. The information is then given the status of "established fact" and Mathias' trust level increases by 0.5. 16 | 17 | Mathias then adds another bit of valid information, but the information is validated by George, who has a trust level of only 1. This time, since we have no way of knowing about George's trustworthiness, the information's status is upped just above "rumor", but not much more. 18 | 19 | As of today, right after launch, the database contains only a few ‘relationships'. We will build a batch-add feature in the coming months, so that users can, for instance, upload a meeting's attendance list. What's more, the entities (people and organizations) that can be described in Influence Networks all come from Freebase, which is like a machine-readable Wikipedia. That means that if the entity you are looking for is not featured on Influence Networks, you can go to Freebase and add it there. In the coming months, we will add a feature to do just that within the Influence Networks interface. 20 | 21 | ## How to install it ## 22 | 23 | 1. Download the last stable version of [Influence Networks from Github](https://github.com/Pirhoo/Influence-Networks/zipball/v2.0) (v2.0); 24 | 2. Extract your archive in the execution directory; 25 | 3. Check _PATH/appinc/template/\_compiled_ and _PATH/appinc/template/\_common_ are allowed for reading and writing: 26 | 4. Import the two SQL dumps from _PATH/config/_ directory in your MySQL database (_CREATE-*.sql_ then _INSERT-*.sql_); 27 | 5. Configure database login on _PATH/config/config.init.php_ file (and some other things...). 28 | 29 | ## MIT License ## 30 | 31 | This programme is under *MIT License*. Acording to [Wikipedia](http://en.wikipedia.org/wiki/MIT_License), "the MIT License is a free software license originating at the Massachusetts Institute of Technology (MIT). It is a permissive license, meaning that it permits reuse within proprietary software on the condition that the license is distributed with that software. The license is also GPL-compatible, meaning that the GPL permits combination and redistribution with software that uses the MIT License." 32 | 33 | ## About Influence Networks ## 34 | 35 | Influence Networks was born out of a collaboration between [OWNI.fr](http://owni.fr), [Transparency International](http://transparency.org/), [Zeit Online](http://www.zeit.de/index) and [Obsweb](http://obsweb.net/) (Metz University). 36 | -------------------------------------------------------------------------------- /appinc/librarie/Smarty-3.0.6/libs/sysplugins/smarty_internal_compile_while.php: -------------------------------------------------------------------------------- 1 | compiler = $compiler; 27 | // check and get attributes 28 | $_attr = $this->_get_attributes($args); 29 | $this->_open_tag('while', $this->compiler->nocache); 30 | 31 | // maybe nocache because of nocache variables 32 | $this->compiler->nocache = $this->compiler->nocache | $this->compiler->tag_nocache; 33 | if (is_array($parameter['if condition'])) { 34 | if ($this->compiler->nocache) { 35 | $_nocache = ',true'; 36 | // create nocache var to make it know for further compiling 37 | if (is_array($parameter['if condition']['var'])) { 38 | $this->compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true); 39 | } else { 40 | $this->compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true); 41 | } 42 | } else { 43 | $_nocache = ''; 44 | $_nocache2 = ''; 45 | } 46 | if (is_array($parameter['if condition']['var'])) { 47 | $_output = "tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache2);\n"; 48 | $_output .= "while (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>"; 49 | } else { 50 | $_output = "tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(\$_smarty_tpl->getVariable(".$parameter['if condition']['var'].")->value{$_nocache},null,true,false);"; 51 | $_output .= "while (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>"; 52 | } 53 | return $_output; 54 | } else { 55 | return ""; 56 | } 57 | } 58 | } 59 | 60 | /** 61 | * Smarty Internal Plugin Compile Whileclose Class 62 | */ 63 | class Smarty_Internal_Compile_Whileclose extends Smarty_Internal_CompileBase { 64 | /** 65 | * Compiles code for the {/while} tag 66 | * 67 | * @param array $args array with attributes from parser 68 | * @param object $compiler compiler object 69 | * @return string compiled code 70 | */ 71 | public function compile($args, $compiler) 72 | { 73 | $this->compiler = $compiler; 74 | // must endblock be nocache? 75 | if ($this->compiler->nocache) { 76 | $this->compiler->tag_nocache = true; 77 | } 78 | $this->compiler->nocache = $this->_close_tag(array('while')); 79 | return ""; 80 | } 81 | } 82 | 83 | ?> -------------------------------------------------------------------------------- /appinc/stylesheet/jquery.website-tour.css: -------------------------------------------------------------------------------- 1 | .tooltip{ 2 | position:absolute; 3 | max-width:250px; 4 | left:0; 5 | top:0; 6 | color:#311C31; 7 | background-color: #d7d7d7; 8 | z-index:999; 9 | } 10 | .tooltip p{ 11 | padding:10px; 12 | font-size:14px; 13 | text-shadow:none; 14 | font-family: 'Vollkorn', arial, serif; 15 | } 16 | .tooltip_arrow{ 17 | position:absolute; 18 | background-color:transparent; 19 | background-repeat:no-repeat; 20 | } 21 | 22 | .tooltip_arrow_T, 23 | .tooltip_arrow_B, 24 | .tooltip_arrow_TL, 25 | .tooltip_arrow_TR, 26 | .tooltip_arrow_BL, 27 | .tooltip_arrow_BR{ 28 | background-image:url(../images/topbottom.png); 29 | width:13px; 30 | height:7px; 31 | } 32 | .tooltip_arrow_L, 33 | .tooltip_arrow_R, 34 | .tooltip_arrow_LT, 35 | .tooltip_arrow_LB, 36 | .tooltip_arrow_RT, 37 | .tooltip_arrow_RB{ 38 | background-image:url(../images/leftright.png); 39 | width:7px; 40 | height:13px; 41 | } 42 | .tooltip_arrow_T{ 43 | background-position:0px -7px; 44 | top:-7px; 45 | left:50%; 46 | margin-left:-3.5px; 47 | } 48 | .tooltip_arrow_TL{ 49 | background-position:0px -7px; 50 | top:-7px; 51 | left:5px; 52 | } 53 | .tooltip_arrow_TR{ 54 | background-position:0px -7px; 55 | top:-7px; 56 | right:5px; 57 | } 58 | .tooltip_arrow_B{ 59 | background-position:0px 0px; 60 | bottom:-7px; 61 | left:50%; 62 | margin-left:-3.5px; 63 | } 64 | .tooltip_arrow_BL{ 65 | background-position:0px 0px; 66 | bottom:-7px; 67 | left:5px; 68 | } 69 | .tooltip_arrow_BR{ 70 | background-position:0px 0px; 71 | bottom:-7px; 72 | right:5px; 73 | } 74 | .tooltip_arrow_L{ 75 | background-position:-7px 0px; 76 | top:50%; 77 | margin-top:-6.5px; 78 | left:-7px; 79 | } 80 | .tooltip_arrow_LT{ 81 | background-position:-7px 0px; 82 | top:5px; 83 | left:-7px; 84 | } 85 | .tooltip_arrow_LB{ 86 | background-position:-7px 0px; 87 | bottom:5px; 88 | left:-7px; 89 | } 90 | .tooltip_arrow_R{ 91 | background-position:0px 0px; 92 | top:50%; 93 | margin-top:-6.5px; 94 | right:-7px; 95 | } 96 | .tooltip_arrow_RT{ 97 | background-position:0px 0px; 98 | top:5px; 99 | right:-7px; 100 | } 101 | .tooltip_arrow_RB{ 102 | background-position:0px 0px; 103 | bottom:5px; 104 | right:-7px; 105 | } 106 | .overlay{ 107 | position:absolute; 108 | width:100%; 109 | height:100%; 110 | top:0px; 111 | left:0px; 112 | background:#000; 113 | opacity:0.5; 114 | z-index:998; 115 | filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50); 116 | } 117 | 118 | .tourcontrols{ 119 | text-align: center; 120 | position:absolute; 121 | left:50%; 122 | bottom:8px; 123 | width:280px; 124 | margin-left:-150px; 125 | font-size:14px; 126 | padding:10px; 127 | z-index:999; 128 | color:#311C31; 129 | } 130 | 131 | .tourcontrols .button.left { 132 | float:left; 133 | } 134 | 135 | .tourcontrols .button.right { 136 | float:right; 137 | } 138 | 139 | .tourcontrols .button.middle { 140 | margin:auto; 141 | display:block; 142 | } 143 | 144 | .tourcontrols h2{ 145 | display:block; 146 | } 147 | 148 | .tourcontrols .close{ 149 | position:absolute; 150 | top:6px; 151 | right:7px; 152 | width:10px; 153 | height:10px; 154 | background: url(../images/close_violet.png) no-repeat center center; 155 | cursor:pointer; 156 | } 157 | .tourcontrols p{ 158 | padding:10px 0px; 159 | padding-top:0px; 160 | } 161 | 162 | .tourcontrols a{ 163 | cursor: pointer; 164 | } 165 | 166 | .nav{ 167 | float:left; 168 | clear:both; 169 | width:100%; 170 | font-weight: normal; 171 | padding:5px 0px; 172 | } 173 | 174 | #stopTheTour { 175 | display:none; 176 | } --------------------------------------------------------------------------------