moved winix directories to winixdsubdirectory

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1028 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2016-03-17 08:26:02 +00:00
parent ed5adb3f23
commit 145efe937c
246 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<p class="winix_iteminfo">
{added_by}: [dir_last_user], [dir_last_date_creation_nice]
[if not dir_last_dates_equal]
, {last_modified}
[if dir_last_users_different]
{by}: [dir_last_modification_user],
[else]
:
[end]
[dir_last_date_modification_nice]
[end]
</p>

7
winixd/html/err_404.html Normal file
View File

@@ -0,0 +1,7 @@
<div class="winix">
<h1>{error_404}</h1>
<p>{error_404_msg}</p>
</div>

View File

@@ -0,0 +1,16 @@
<div class="winix">
<h1>{access_denied}</h1>
<p>{access_denied_msg}
[if ipban_is_current_ip_banned]
<br>
{ipban_your_ip_is_banned} [ipban_current_ip_expires_time].
[end]
</p>
</div>

View File

@@ -0,0 +1,20 @@
<div class="winix">
<h1>Account</h1>
[if user_logged]
<p>You are logged as: [user_name]<br>
[if user_super_user]
You are the root
[end]
[# !! IMPROVE ME add info about groups, may other parameters like time zone, language?]
</p>
[else]
<p>You are not logged in.</p>
[end]
</div>

View File

@@ -0,0 +1,41 @@
<div class="winix">
<h1>[if user_logged]{adduser_header_add}[else]{adduser_header_register}[end]</h1>
<form id="additem" method="post" action="[doc_base_url][dir]adduser">
<fieldset>
<legend>{adduser_form_legend}</legend>
<p class="withnext">{adduser_login}:</p>
<input class="edit" type="text" name="login" value="[adduser_last_login]">
<p class="withnext">{adduser_password}:</p>
<input class="edit" type="password" name="password" value="">
<p class="withnext">{adduser_confirm_password}:</p>
<input class="edit" type="password" name="passwordconfirm" value="">
[if winix_account_need_email_verification]
<p class="withnext">{adduser_need_email}<br>{adduser_need_email2}:</p>
[else]
<p class="withnext">{adduser_email}:</p>
[end]
<input class="edit" type="text" name="email" value="[adduser_last_email]">
[if user_super_user]
<p>
<input type="checkbox" name="autoactivate" id="autoactivate"><label style="display: inline;" for="autoactivate">{adduser_auto_activate}</label>
</p>
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="[if user_logged]{adduser_submit}[else]{register_user_submit}[end]">
</fieldset>
</form>
</div>

37
winixd/html/fun_cat.html Normal file
View File

@@ -0,0 +1,37 @@
[if mount_page_arg_is "subject"][if mount_page_arg_is "info"]<h1 class="withinfo">[else]<h1>[end][item_subject]</h1>[end]
[if mount_page_arg_is "info"][include "item_info.html"][end]
[if one item_filetype_is_image]
<a href="[item_link]"><img class="catimage" [if not item_has_thumb]height="100"[end] src="[item_link]/download[if item_has_thumb]/thumb[end]" alt="[item_subject]"></a>
[# we use pre.nowinixbreak to tell the html_filter not to put a blank space into those urles]
<div>
<pre class="nowinixbreak">
{cat_image_url}: [item_link]<br>
{cat_image_thumb_url}: [item_link]/-/thumb
</pre>
</div>
[item_print_content]
[else]
[if not item_filetype_is_none]
{download}: <a href="[item_link]/download" title="[item_subject]">[item_subject]</a>
<div>
<pre class="nowinixbreak">
{cat_file_url}: [item_link]<br>
</pre>
</div>
[item_print_content]
[else]
[item_print_content]
[end]
[end]

View File

@@ -0,0 +1,2 @@
[include "fun_priv.html"]

View File

@@ -0,0 +1 @@
[include "fun_priv.html"]

View File

@@ -0,0 +1,71 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]ckeditor">
[if mount_type_is "cms"]
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
<div class="winix_input_a">
<label for="winix_url_id">{suggested_url}:</label>
<input id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
[end]
[if any [mount_type_is "thread"] [thread_mount_arg_is "subject"]]
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
<div class="winix_input_a">
<label for="winix_url_id">{suggested_url}:</label>
<input id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
[end]
<div class="winix_input_a">
[if mount_type_is "cms"]<label for="winix_content_id">{form_emacs_content_cms}</label>[end]
[if mount_type_is "thread"]<label for="winix_content_id">{form_emacs_content_thread}</label>[end]
[if mount_type_is "ticket"]<label for="winix_content_id">{form_emacs_content_ticket}</label>[end]
[# template fun_ls.html uses the name: itemcontent to refer to this textarea item]
<textarea id="winix_content_id" rows="[if mount_type_is "cms"]30[else]10[end]" cols="60" name="itemcontent">[item_content]</textarea>
</div>
<input type="hidden" name="contenttype" value="2">
[if winix_function_param_is "full"]
<script type="text/javascript">CKEDITOR.replace('itemcontent', \{filebrowserUploadUrl: '[doc_base_url][dir]upload?noredirect&ckeditor_upload', filebrowserBrowseUrl: '[doc_base_url][dir]ls?ckeditor_browse&fullscreen', customConfig : '[doc_base_url]/var/ckeditor_full.js' \});</script>
[else]
<script type="text/javascript">CKEDITOR.replace('itemcontent', \{filebrowserUploadUrl: '[doc_base_url][dir]upload?noredirect&ckeditor_upload', filebrowserBrowseUrl: '[doc_base_url][dir]ls?ckeditor_browse&fullscreen', customConfig : '[doc_base_url]/var/ckeditor_winix.js' \});</script>
[end]
[if not user_logged]
<div class="winix_input_a">
<label for="winix_nick_id">{nick}:</label>
<input id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</p>
<input id="winix_rebus_id" type="text" name="rebus">
</div>
[end]
<input type="submit" value="[if item_is]{change}[else]{add}[end]">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
</div>

39
winixd/html/fun_cp.html Normal file
View File

@@ -0,0 +1,39 @@
<div class="winix">
<h1>{cp_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]cp[if not item_is]/r[end]">
<fieldset>
<legend>{cp_form_legend}</legend>
<p>
[if item_is]{cp_page} "[item_url]":[else]{cp_dir} "[dir_without_slash]"[end]
</p>
<p class="withnext">{suggested_url}</p>
<input class="edit" type="text" name="to" value="[dir_without_slash][if item_is]/[item_url][end]">
<p>
<label><input type="checkbox" name="preserveattr">{cp_preserve_attr}</label>
[if not item_is]
<label><input type="checkbox" name="onlycontent">{cp_only_content}</label>
<label><input type="checkbox" name="removedefaults" checked="checked">{cp_remove_defaults}</label>
<label><input type="checkbox" name="followsymlinks" checked="checked">{cp_follow_symlinks}</label>
[end]
</p>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{copy}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,37 @@
<div class="winix">
<h1>{create_thread_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir]createthread">
<fieldset>
<legend>{form_thread_legend}</legend>
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
[if thread_mount_arg_is "subject"]
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[include "fun_emacs_post.html"]
[if not user_logged]
<p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{button_thread_submit}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,136 @@
<div class="winix">
[# this template is used in fun_editticket.html as well]
[if item_is]<h1>{edit_ticket_header}</h1>[else]<h1>{create_ticket_header}</h1>[end]
<form method="post" action="[doc_base_url][dir][if item_is][item_url]/editticket[else]createticket[end]" enctype="multipart/form-data">
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
[if ticket_tab]
<table class="winix_create_ticket">
[for ticket_tab]
<tr>
<th>[filter fil_firstup][ticket_tab_param_name]:[end]</th>
<td>
[if ticket_tab_type_is "select"]
<select name="ticketparam[ticket_tab_param_id]">
[for ticket_tab_select_tab]
<option [if ticket_tab_select_tab_is_selected]selected [end]value="[ticket_tab_select_tab_id]">[ticket_tab_select_tab_name]</option>
[end]
</select>
[end]
[if one [ticket_tab_type_is "integer"] [ticket_tab_type_is "progress"] [ticket_tab_type_is "string"]]
<input type="text" name="ticketparam[ticket_tab_param_id]" value="[ticket_tab_value]">
[end]
[if ticket_tab_type_is "multistring"]
<textarea name="ticketparam[ticket_tab_param_id]" rows="10" cols="60">[ticket_tab_value]</textarea>
[end]
[if ticket_tab_type_is "images"]
[for ticket_tab_file_tab]
<div class="winix_create_ticket_file_row">
<img src="[doc_base_url][ticket_tab_file_tab_path]/-/thumb" alt="[ticket_tab_file_tab_path]" height="150">
<input type="submit" name="ticketdeletefile_[ticket_tab_file_tab_itemid]" value="{ticket_delete_file}">
</div>
[end]
<input size="30" type="file" name="ticketparam[ticket_tab_param_id]" multiple>
<input type="submit" name="fileuploadsubmit" value="{add}">
[end]
[if ticket_tab_type_is "files"]
[if ticket_tab_file_tab]
<ul>
[for ticket_tab_file_tab]
<li>
<a href="[doc_base_url][ticket_tab_file_tab_path]/download">[ticket_tab_file_tab_path]</a>
[# !! CHECK ME how this look like -- css was not set]
<input type="submit" name="ticketdeletefile_[ticket_tab_file_tab_itemid]" value="{ticket_delete_file}">
</li>
[end]
</ul>
[end]
<input size="30" type="file" name="ticketparam[ticket_tab_param_id]" multiple>
<input type="submit" name="fileuploadsubmit" value="{add}">
[end]
[if any_not [ticket_tab_type_is "images"] [ticket_tab_type_is "files"] ticket_is_creating_new ticket_tab_has_value]
{ticket_value_not_set}
[end]
</td>
</tr>
[end]
</table>
[end]
[# FIXME !! change names form_emacs_content_thread and form_emacs_content_ticket]
<div class="winix_input_a">
<label for="winix_content_id">{form_emacs_content_ticket}</label>
<textarea id="winix_content_id" rows="10" cols="60" name="itemcontent">[item_content]</textarea>
</div>
<div class="winix_input_a">
<label for="winix_content_type_id">{form_emacs_content_type}</label>
<select id="winix_content_type_id" name="contenttype">
<option[if item_content_type_is "text"] selected[end] value="0">{form_emacs_content_type_text}</option>
<option[if item_content_type_is "formatted text"] selected[end] value="1">{form_emacs_content_type_formatted_text}</option>
[if user_can_use_html]<option[if item_content_type_is "html"] selected[end] value="2">{form_emacs_content_type_html}</option>[end]
[if user_can_use_bbcode]<option[if item_content_type_is "bbcode"] selected[end] value="3">{form_emacs_content_type_bbcode}</option>[end]
[if user_can_use_raw]<option[if item_content_type_is "raw"] selected[end] value="4">{form_emacs_content_type_raw}</option>[end]
</select>
</div>
[if not user_logged]
<div class="winix_input_a">
<label for="winix_nick_id">{nick}:</label>
<input id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</p>
<input id="winix_rebus_id" type="text" name="rebus">
</div>
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input type="submit" value="[if item_is]{form_ticket_edit_submit}[else]{form_ticket_create_submit}[end]">
</form>
</div>

View File

@@ -0,0 +1,26 @@
<div class="winix">
<h1>{default_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir]default">
<fieldset>
<legend>{form_default_legend}</legend>
{url}:<br>
<input class="edit" type="text" name="linkto" value="[dir_last_link_to]">
<p>
<label><input class="" type="checkbox" name="makeredirect"[if dir_last_is_link_redirect] checked="checked"[end]>{default_make_redirect}</label>
</p>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1 @@
[include "fun_createticket.html"]

View File

@@ -0,0 +1,42 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
<form method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]emacs">
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]" [if not item_is]autofocus [end]>
</div>
<div class="winix_input_a">
<label for="winix_url_id">{suggested_url}:</label>
<input id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
[include "fun_emacs_post.html"]
[if not user_logged]
<div class="winix_input_a">
<label for="winix_nick_id">{nick}:</label>
<input id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</label>
<input id="winix_rebus_id" type="text" name="rebus">
</div>
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input type="submit" value="[if item_is]{change}[else]{add}[end]">
</form>
</div>

View File

@@ -0,0 +1,28 @@
<div class="winix_input_a">
[if winix_function_is "upload"]
<label for="winix_content_id">{upload_content}</label>
[else]
[if mount_type_is "cms"]<label for="winix_content_id">{form_emacs_content_cms}</label>[end]
[if mount_type_is "thread"]<label for="winix_content_id">{form_emacs_content_thread}</label>[end]
[if mount_type_is "ticket"]<label for="winix_content_id">{form_emacs_content_ticket}</label>[end]
[end]
<textarea [if item_is]autofocus [end]id="winix_content_id" rows="[if winix_function_is "upload"]7[else][if mount_type_is "cms"]30[else]10[end][end]" cols="60" name="itemcontent">[item_content]</textarea>
</div>
<div class="winix_input_a">
<label for="winix_contenttype_id">{form_emacs_content_type}</label>
<select name="contenttype" id="winix_contenttype_id">
<option[if item_content_type_is "text"] selected[end] value="0">{form_emacs_content_type_text}</option>
<option[if item_content_type_is "formatted text"] selected[end] value="1">{form_emacs_content_type_formatted_text}</option>
[if user_can_use_html]<option[if item_content_type_is "html"] selected[end] value="2">{form_emacs_content_type_html}</option>[end]
[if user_can_use_bbcode]<option[if item_content_type_is "bbcode"] selected[end] value="3">{form_emacs_content_type_bbcode}</option>[end]
[if user_can_use_raw]<option[if item_content_type_is "raw"] selected[end] value="4">{form_emacs_content_type_raw}</option>[end]
</select>
</div>

56
winixd/html/fun_env.html Normal file
View File

@@ -0,0 +1,56 @@
<div class="winix">
<h1>{env_header}</h1>
[if user_super_user]
[if winix_function_param_is "a"]
<p class="withnext">{env_change_admin_env_for_user}:</p>
[else]
<p class="withnext">{env_change_env_for_user}:</p>
[end]
<form class="envchangeuser" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]env[if winix_function_param_is "a"]/a[end]">
<fieldset>
<legend>{form_env_legend}</legend>
<select name="userid">
[for env_user_tab]
<option value="[env_user_tab_id]" [if env_user_tab_is_current]selected="selected"[end]>[env_user_tab_name]</option>
[end]
</select>
<input type="hidden" name="changeuser">
<input class="submit" type="submit" value="{env_change_user}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</fieldset>
</form>
[end]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]env[if winix_function_param_is "a"]/a[end]">
<fieldset>
<legend>{form_env_legend}</legend>
<textarea class="multitext" rows="30" cols="60" name="envvar">[if winix_function_param_is "a"][env_user_admin_env_str][else][env_user_env_str][end]</textarea>
<input type="hidden" name="userid" value="[env_user_id]">
<input class="submit" type="submit" value="{change}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,28 @@
<div class="winix">
<h1>{export_header}</h1>
[if item_is]
<p>{export_transer_file_info}</p>
[else]
<p>{export_transer_dir_info}</p>
[end]
<form action="[doc_base_url][dir][if item_is][item_url]/[end]export" method="post">
<input type="checkbox" name="staticfilestoo" id="nonstaticfiles"><label for="nonstaticfiles">{export_checkbox_static_file_too}</label>
<br><br>
<input type="submit" value="Export">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
</div>

View File

@@ -0,0 +1,166 @@
<div class="winix">
[if mount_page_arg_is "subject"][if mount_page_arg_is "info"]<h1 class="withinfo">[else]<h1>[end][dir_last_subject]</h1>[end]
[if mount_page_arg_is "info"][include "dir_last_info.html"][end]
[if one gallery_has_not_mount_type [gallery_mount_type_arg_is "lightbox"]]
[if gallery_tab]
<ul class="galleryimages">
[for gallery_tab]
<li><a rel="lightbox\[gallery\]" href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[end]
[end]
[if gallery_mount_type_arg_is "galleria"]
[if gallery_tab]
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
[for gallery_tab]
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[if gallery_mount_theme_arg_is "transparent"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/aino-galleria/themes/transparent/galleria.transparent.js');</script>
[else]
[if gallery_mount_theme_arg_is "white"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/aino-galleria/themes/white/galleria.white.js');</script>
[else]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/aino-galleria/themes/classic/galleria.classic.js');</script>
[end]
[end]
[if not [winix_function_param_is "image"]]
<script type="text/javascript">$('.galleryimages').galleria();</script>
[else]
[# !! IMPROVE ME add this javascript code to the rest of galleria types]
<script type="text/javascript">var url = window.document.URL.toString(); var num = 0; var re = /\/image:(\d+)/; var numarr = re.exec(url); if( numarr && numarr.length == 2 ) \{var num = numarr\[1\];\}; $('.galleryimages').galleria(\{show: num\});</script>
[end]
[end]
[end]
[if gallery_mount_type_arg_is "galleria1.2.9"]
[if gallery_tab]
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
[for gallery_tab]
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[if gallery_mount_theme_arg_is "transparent"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparent/galleria.transparent.js');</script>
[if not [winix_function_param_is "image"]]
<script type="text/javascript">Galleria.configure(\{showInfo:false\}); Galleria.run('.galleryimages');</script>
[else]
<script type="text/javascript">Galleria.configure(\{showInfo:false, show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[else]
[if gallery_mount_theme_arg_is "transparentinfo"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparentinfo/galleria.transparent.js');</script>
[if not [winix_function_param_is "image"]]
<script type="text/javascript">Galleria.configure(\{\}); Galleria.run('.galleryimages');</script>
[else]
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[else]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/classic/galleria.classic.js');</script>
[if not [winix_function_param_is "image"]]
<script type="text/javascript">Galleria.configure(\{\}); Galleria.run('.galleryimages');</script>
[else]
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[end]
[end]
[end]
[end]
[if gallery_mount_type_arg_is "galleriathumb"]
[if not [winix_function_param_is "image"]]
[if gallery_tab]
<ul class="galleryimages">
[for gallery_tab]
<li><a href="[doc_base_url][dir]-/image:[gallery_tab_index]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[end]
[else]
[if gallery_tab]
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
[for gallery_tab]
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[if gallery_mount_theme_arg_is "white"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/aino-galleria/themes/white/galleria.white.js');</script>
[else]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/aino-galleria/themes/classic/galleria.classic.js');</script>
[end]
<script type="text/javascript">$('.galleryimages').galleria(\{show_info:false, show: [winix_function_param_value "image"]\});</script>
[end]
[end]
[end]
[if gallery_mount_type_arg_is "galleriathumb1.2.9"]
[if not [winix_function_param_is "image"]]
[if gallery_tab]
<ul class="galleryimages">
[for gallery_tab]
<li><a href="[doc_base_url][dir]-/image:[gallery_tab_index]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[end]
[else]
[if gallery_tab]
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
[for gallery_tab]
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[if gallery_mount_theme_arg_is "transparent"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparent/galleria.transparent.js');</script>
<script type="text/javascript">Galleria.configure(\{showInfo:false, show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[else]
[if gallery_mount_theme_arg_is "transparentinfo"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparentinfo/galleria.transparent.js');</script>
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[end]
[end]
[end]
[end]
</div>

View File

@@ -0,0 +1,109 @@
<div class="winix">
<h1>Kadrowanie obrazów</h1>
[if item_is]
[if winix_function_param_is "thumb"]
<p>Kadruj miniaturę zdjęcia, obraz oryginalny (duży) nie zostanie zmodyfikowany.</p>.
[else]
[if winix_function_param_is "newthumb"]
<p>Zaznacz myszką kadr na zdjęciu, z tej części zostanie stworzona nowa miniatura, obraz oryginalny (duży) nie zostanie zmodyfikowany.</p>.
[else]
<p>Kadruj oryginalny obraz (miniatura nie zostanie zmodyfikowana).</p>.
[end]
[end]
[if any item_is item_filetype_is_image]
<script type="text/javascript">
var winix_jcrop;
</script>
<img src="[item_link][if winix_function_param_is "thumb"]/-/thumb[end]" alt="" id="winix_imgcropper">
<form id="winix_cropform" action="[item_link]/imgcrop[if winix_function_param_is "thumb"]/thumb[end][if winix_function_param_is "newthumb"]/newthumb[end]" method="post">
<input type="hidden" name="cropxtop" value="" id="winix_idcropxtop">
<input type="hidden" name="cropytop" value="" id="winix_idcropytop">
<input type="hidden" name="cropwidth" value="" id="winix_idcropwidth">
<input type="hidden" name="cropheight" value="" id="winix_idcropheight">
[if any_not [winix_function_param_is "thumb"] [winix_function_param_is "newthumb"]]
[if false]
<div class="winix_input_b">
<input type="checkbox" name="createthumbtoo" id="winix_createthumbtooid">
<label for="winix_createthumbtooid">Stwórz także nową miniaturę</label>
</div>
[end]
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input type="submit" value="Kadruj">
</form>
[else]
<p>To nie jest obrazek.</p>
[end]
<script type="text/javascript">
$('#winix_imgcropper').Jcrop(\{boxWidth: 700, boxHeight: 450\}, function()\{winix_jcrop = this;\});
$('form#winix_cropform').submit(function()\{
var c = winix_jcrop.tellSelect();
$('form#winix_cropform input#winix_idcropxtop').val(c.x);
$('form#winix_cropform input#winix_idcropytop').val(c.y);
$('form#winix_cropform input#winix_idcropwidth').val(c.w);
$('form#winix_cropform input#winix_idcropheight').val(c.h);
return c.w != 0 && c.h != 0;
\});
</script>
[else]
[if item_tab]
<ul class="winix_imgcrop_list">
[for item_tab]
<li>
<div class="winix_imgcrop_list_image">
<img src="[item_tab_link][if item_tab_has_thumb]/-/thumb[end]" alt="[item_tab_subject]">
</div>
<div class="winix_imgcrop_list_imageurl">
[item_tab_url]
</div>
<div class="winix_imgcrop_list_options">
<ul>
<li><a href="[item_tab_link]/imgcrop/postredirect:[filter fil_urlencode][doc_base_url][dir]imgcrop[end]">Kadruj zdjęcie</a></li>
<li><a href="[item_tab_link]/imgcrop/thumb/postredirect:[filter fil_urlencode][doc_base_url][dir]imgcrop[end]">Kadruj miniature</a></li>
<li><a href="[item_tab_link]/imgcrop/newthumb/postredirect:[filter fil_urlencode][doc_base_url][dir]imgcrop[end]">Kadruj i stwórz nową miniature</a></li>
</ul>
</div>
</li>
[end]
</ul>
[end]
[end]
</div>

View File

@@ -0,0 +1,53 @@
<div class="winix">
<h1>{ipban_header}</h1>
[if ipban_tab]
<table class="ipban_table">
<tr>
<th>{ipban_col_id}</th>
<th>{ipban_col_ip_address}</th>
<th>{ipban_col_login_failures}</th>
<th>{ipban_col_broken_cookie}</th>
<th>{ipban_session_hijacking}</th>
<th>{ipban_no_session_cookie}</th>
<th>{ipban_col_login_allowed}</th>
<th>{ipban_col_ban_level}</th>
<th>{ipban_col_active_flag}</th>
<th>{ipban_col_last_used}</th>
<th>{ipban_col_expires}</th>
<th>{ipban_col_remove}</th>
</tr>
[for ipban_tab]
<tr>
<td>[ipban_tab_id]</td>
<td>[ipban_tab_ip]</td>
<td>[ipban_tab_incorrect_login]</td>
<td>[ipban_tab_broken_encoded_cookie]</td>
<td>[ipban_tab_session_hijacking]</td>
<td>[ipban_tab_no_session_cookie]</td>
<td>[if ipban_tab_is_logging_allowed]{ipban_loggin_allowed}[else]{ipban_loggin_not_allowed}[end]</td>
<td>[ipban_tab_ban_level]</td>
<td>[if ipban_tab_has_active_flag]{ipban_has_active_flag}[end]</td>
<td>[ipban_tab_last_used]</td>
<td>[ipban_tab_expires]</td>
<td><a href="[doc_base_url][dir][if item_is][item_url]/[end]ipban/removeip:[ipban_tab_ip]">{ipban_remove_ip}</a></td>
</tr>
[end]
</table>
<p>
<a href="[doc_base_url][dir][if item_is][item_url]/[end]ipban/removeip:all">{ipban_remove_all_ip}</a>
</p>
[else]
<p>{ipban_ban_list_empty}</p>
[end]
</div>

17
winixd/html/fun_last.html Normal file
View File

@@ -0,0 +1,17 @@
<div class="winix">
<h1 class="simple">{last_header}</h1>
[if last_tab]
<table>
<tr><th>{last_tab_login}</th><th>{last_tab_ip}</th><th>{last_tab_login_date}</th><th>{last_tab_logout_date}</th></tr>
[for last_tab]
<tr><td>[last_tab_name]</td><td>[last_tab_ip]</td><td>[last_tab_start]</td><td>[last_tab_end]</td></tr>
[end]
</table>
[else]
<p>{last_none}</p>
[end]
</div>

38
winixd/html/fun_ln.html Normal file
View File

@@ -0,0 +1,38 @@
<div class="winix">
<h1>{ln_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir]ln">
<fieldset>
<legend>{form_ln_legend}</legend>
<p>{ln_info}: [dir]</p>
<p class="withnext">{suggested_url}</p>
<input class="edit" type="text" name="url" value="">
<p class="withnext">{ln_to}</p>
<input class="edit" type="text" name="linkto" value="[dir][if item_is][item_url][end]">
<p>
<label><input id="radiohard" type="radio" name="linktype" checked="checked" value="0">{ln_hardlink}</label>
<label><input id="radiosymb" type="radio" name="linktype" value="1">{ln_symlink}</label>
</p>
<p>
<label><input class="" type="checkbox" name="makeredirect">{ln_make_redirect}</label>
</p>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,36 @@
<div class="winix">
<h1>{locale_header}</h1>
[if user_has_correct_locale]
<p>{locale_your_locale}: [user_locale_name]</p>
[else]
<p>{locale_has_incorrect_id}</p>
[end]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]locale">
<fieldset>
<legend>{locale_form_legend}</legend>
<p class="withnext">{locale_select}:</p>
[# add to styles]
<select name="localeid" style="width: 250px;">
[for winix_locale_tab]
<option value="[winix_locale_tab_id]" [if cmp user_locale_id winix_locale_tab_id]selected="selected"[end]>[winix_locale_tab_name]</option>
[end]
</select>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,51 @@
<div class="winix">
<h1>{login_header}</h1>
[if user_logged]
<p>{logged_as_long}: [user_name]<br>
<a href="[doc_base_url][if dir_can_read_exec][dir][if any item_is item_can_read][item_url]/[end][else]/[end]logout">{logout}</a></p>
[else]
[if not ipban_is_login_allowed_from_this_ip]
<p>{login_cannot_login_from_this_ip}<br>
{login_cannot_login_available} [ipban_current_ip_expires_time]</p>
[else]
<form method="post" action="[login_path]login">
<div class="winix_input_b">
<input type="text" name="login">
</div>
<div class="winix_input_b">
<input type="password" name="password">
</div>
<div class="winix_input_b">
<input id="winix_login_rememberme_id" type="checkbox" name="rememberme">
<label for="winix_login_rememberme_id">{remember_me}</label>
</div>
[if login_should_use_captcha]
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</label>
<input id="winix_rebus_id" type="text" name="rebus">
</div>
[end]
<input type="submit" value="{button_login}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[end]
[end]
</div>

137
winixd/html/fun_ls.html Normal file
View File

@@ -0,0 +1,137 @@
<div class="winix">
[if winix_function_param_is "ckeditor_browse"]
<script type="text/javascript">function select(link) \{ window.opener.CKEDITOR.tools.callFunction([ls_ckeditor_funnum_browse], link); window.close(); \} </script>
<div id="winix_ls_browse_leftcolumn">
[if dir_childs_tab "with_parent"]
<h2>[for dir_tab]<a href="[doc_base_url][dir_tab_link]ls/ckeditor_browse/fullscreen/CKEditor:itemcontent/CKEditorFuncNum:[ls_ckeditor_funnum_browse]">[dir_tab_url]/</a>[end]</h2>
<ul>
[for dir_childs_tab "with_parent"]
<li>
[if dir_childs_is_parent]
[# make sure the name of the textarea in fun_ckeditor.html is called: itemcontent]
[# is it needed?]
<a href="[doc_base_url][dir_parent]ls/ckeditor_browse/fullscreen/CKEditor:itemcontent/CKEditorFuncNum:[ls_ckeditor_funnum_browse]">../</a>
[else]
<a href="[doc_base_url][dir][dir_childs_tab_url]/ls/ckeditor_browse/fullscreen/CKEditor:itemcontent/CKEditorFuncNum:[ls_ckeditor_funnum_browse]">[dir_childs_tab_url]/</a>
[end]
</li>
[end]
</ul>
[end]
</div>
<div id="winix_ls_browse_rightcolumn">
[if item_tab]
<h2>{ls_pictures_in_dir} [dir]</h2>
<ul>
[for item_tab]
<li><a href="javascript:select('[item_tab_link]')"><img src="[item_tab_link]/-/thumb" alt="[item_tab_subject]" height="120"></a></li>
[end]
</ul>
[else]
<h2>{ls_no_picture}</h2>
[end]
</div>
[else]
<h1>{ls_header}</h1>
[if not item_is]
[if winix_function_param_is "l"]
[# loading dir childs table with a parent directory]
[# now the parameter can be passed directly to if-one]
[dir_childs_tab "with_parent"]
[if one dir_childs_tab item_tab]
<table>
[for dir_childs_tab]
<tr>
<td>d</td>
<td>[dir_childs_tab_privileges]</td>
<td>[dir_childs_tab_user]</td>
<td>[dir_childs_tab_group]</td>
<td>
[if dir_childs_is_parent]
<a href="[doc_base_url][dir_parent_without_slash][if winix_function_param_is "dirls"]/ls/l/dirls[end]">../</a>
[else]
<a href="[doc_base_url][dir][dir_childs_tab_url][if winix_function_param_is "dirls"]/ls/l/dirls[end]">[dir_childs_tab_url]/</a>
[end]
</td>
</tr>
[end]
[for item_tab]
<tr>
<td>[if item_tab_type_is_symlink]l[else][if item_tab_has_static_file]s[else]-[end][end]</td>
<td>[item_tab_privileges]</td>
<td>[item_tab_user]</td>
<td>[item_tab_group]</td>
<td><a href="[doc_base_url][dir][item_tab_url]">[item_tab_url]</a>[if item_tab_type_is_symlink] -> [item_tab_link_to][end]</td>
</tr>
[end]
</table>
[end]
[else]
[# loading dir childs table with a parent directory]
[dir_childs_tab "with_parent"]
[if dir_childs_tab]
<ul>
[for dir_childs_tab]
<li>
[if dir_childs_is_parent]
<a href="[doc_base_url][dir_parent_without_slash][if winix_function_param_is "dirls"]/ls/dirls[end]">../</a>
[else]
<a href="[doc_base_url][dir][dir_childs_tab_url][if winix_function_param_is "dirls"]/ls/dirls[end]">[dir_childs_tab_url]/</a>
[end]
</li>
[end]
</ul>
[end]
[if item_tab]
<ul>
[for item_tab]
<li><a href="[doc_base_url][dir][item_tab_url]">[item_tab_url]</a></li>
[end]
</ul>
[end]
[end]
[else]
<ul>
<li><a href="[doc_base_url][dir][item_url]">[item_url]</a></li>
</ul>
[end]
[end]
</div>

32
winixd/html/fun_man.html Normal file
View File

@@ -0,0 +1,32 @@
<div class="winix">
<h1>{man_header}</h1>
<h2>{man_winix_funcions}</h2>
<table>
[for man_winixfun_tab]
<tr>
<td>[man_winixfun_tab_index]</td>
<td>[man_winixfun_tab_name]</td>
</tr>
[end]
</table>
<h2>{man_ezc_functions}</h2>
<table>
[for man_ezcfun_tab]
<tr>
<td>[man_ezcfun_tab_index]</td>
<td>[man_ezcfun_tab_name]</td>
</tr>
[end]
</table>
</div>

62
winixd/html/fun_meta.html Normal file
View File

@@ -0,0 +1,62 @@
<div class="winix">
[if winix_function_param_is "a"]
<h1>{meta_admin_header}</h1>
[if item_is]
<form method="post" action="[doc_base_url][dir][item_url]/meta/a">
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[item_admin_meta_str]</textarea>
<input class="submit" type="submit" value="{change}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[else]
<form method="post" action="[doc_base_url][dir]meta/a">
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[dir_last_admin_meta_str]</textarea>
<input class="submit" type="submit" value="{change}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[end]
[else]
<h1>{meta_header}</h1>
[if item_is]
<form method="post" action="[doc_base_url][dir][item_url]/meta">
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[item_meta_str]</textarea>
<input class="submit" type="submit" value="{change}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[else]
<form method="post" action="[doc_base_url][dir]meta">
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[dir_last_meta_str]</textarea>
<input class="submit" type="submit" value="{change}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[end]
[end]
</div>

View File

@@ -0,0 +1,25 @@
<div class="winix">
<h1>{mkdir_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir]mkdir">
<fieldset>
<legend>{mkdir_form_legend}</legend>
<p class="withnext">{title}</p>
<input class="edit" type="text" name="subject" value="">
<p class="withnext">{suggested_url}</p>
<input class="edit" type="text" name="url" value="">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{add}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,55 @@
<div class="winix">
<h1>{mount_header}</h1>
<h2>{mount_current}:</h2>
<table class="winix_mountpoints">
<tr>
<th>{mount_type}</th>
<th>{mount_dir}</th>
<th>{mount_fs}</th>
<th>{mount_parameters}</th>
</tr>
<tr>
<td>[mount_cur_type]</td>
<td>[mount_cur_dir]</td>
<td>[mount_cur_fs]</td>
<td>[mount_cur_parlist]</td>
</tr>
</table>
<h2>{mount_table}:</h2>
[if mount_tab]
<table class="winix_mountpoints">
<tr>
<th>{mount_type}</th>
<th>{mount_dir}</th>
<th>{mount_fs}</th>
<th>{mount_parameters}</th>
</tr>
[for mount_tab]
<tr>
<td>[mount_tab_type]</td>
<td>[mount_tab_dir]</td>
<td>[mount_tab_fs]</td>
<td>[mount_tab_parlist]</td>
</tr>
[end]
</table>
[end]
</div>

33
winixd/html/fun_mv.html Normal file
View File

@@ -0,0 +1,33 @@
<div class="winix">
<h1>{mv_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]mv">
<fieldset>
<legend>{mv_form_legend}</legend>
<p>
[if item_is]{mv_page} [item_url]:[else]{mv_dir} [dir][end]
</p>
<p class="withnext">{suggested_url}</p>
<input class="edit" type="text" name="dst_path" value="[dir_without_slash][if item_is]/[item_url][end]">
[if not item_is]
<label><input type="checkbox" name="c"[if winix_function_param_is "c"]checked="checked"[end]>{mv_only_content}</label>
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{move}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,62 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]nicedit">
<fieldset>
<legend>{form_emacs_legend}</legend>
[if mount_type_is "cms"]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if any [mount_type_is "thread"] [thread_mount_arg_is "subject"]]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if mount_type_is "cms"]<p class="withnext">{form_emacs_content_cms}</p>[end]
[if mount_type_is "thread"]<p class="withnext">{form_emacs_content_thread}</p>[end]
[if mount_type_is "ticket"]<p class="withnext">{form_emacs_content_ticket}</p>[end]
<textarea class="multitext" rows="[if mount_type_is "cms"]30[else]10[end]" cols="60" name="itemcontent" id="nicarea">[item_content]</textarea>
<input type="hidden" name="contenttype" value="2">
<script type="text/javascript">
new nicEditor(\{fullPanel:true, iconsPath:'[doc_base_url_common]/nicedit/nicEditorIcons.gif', uploadURI:'[doc_base_url][dir]upload/' \}).panelInstance('nicarea');
</script>
[if winix_function_param_is "full"]
[else]
[end]
[if not user_logged]
<p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="[if item_is]{change}[else]{add}[end]">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,71 @@
<div class="winix">
<h1>{passwd_header}</h1>
[if winix_function_param_is "resetpassword"]
<form id="additem" method="post" action="[doc_base_url][dir]passwd/resetpassword">
<fieldset>
<legend>{passwd_form_legend}</legend>
<input type="hidden" name="login" value="[passwd_resetpass_login]">
<input type="hidden" name="code" value="[passwd_resetpass_code]">
<p class="withnext">{passwd_new_password}:</p>
<input class="edit" type="password" name="passwordnew" value="">
<p class="withnext">{passwd_confirm_new_password}:</p>
<input class="edit" type="password" name="passwordconfirm" value="">
<input class="submit" type="submit" value="{passwd_submit}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</fieldset>
</form>
[else]
<form method="post" action="[doc_base_url][dir]passwd">
[if user_super_user]
<div class="winix_input_a">
<label for="winix_users_id">{passwd_login}:</label>
<select name="login" id="winix_users_id">
[for user_tab]
<option [if user_tab_is_current]selected[end]>[user_tab_name]</option>
[end]
</div>
</select>
[else]
<div class="winix_input_a">
<label for="winix_current_pass_id">{passwd_current_password}:</label>
<input id="winix_current_pass_id" type="password" name="passwordcur" value="">
</div>
[end]
<div class="winix_input_a">
<label for="winix_pass_new_id">{passwd_new_password}:</label>
<input id="winix_pass_new_id" type="password" name="passwordnew" value="">
</div>
<div class="winix_input_a">
<label for="winix_pass_new_confirm_id">{passwd_confirm_new_password}:</label>
<input id="winix_pass_new_confirm_id" type="password" name="passwordconfirm" value="">
</div>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input type="submit" value="{passwd_submit}">
</form>
[end]
</div>

131
winixd/html/fun_priv.html Normal file
View File

@@ -0,0 +1,131 @@
<div class="winix">
[# this template is for following functions: priv, chmod, chown]
<h1>{priv_header}</h1>
[if not [winix_function_param_is "r"]]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end][winix_function]">
<fieldset>
<legend>{priv_form_legend}</legend>
<table class="withoutborder">
[if priv_show_form_chown]
<tr><th>{user}:</th><td>
<select name="user" class="users">
[for priv_user_tab]
<option[if priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option>
[end]
</select>
</td></tr>
<tr><th>{group}: </th><td>
<select name="group" class="groups">
[for priv_group_tab]
<option[if priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option>
[end]
</select>
</td></tr>
[end]
[if priv_show_form_chmod]
<tr><th>{permissions}:</th><td><input class="privileges" type="text" name="privileges" value="[priv_privileges]"></td></tr>
[end]
</table>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</fieldset>
</form>
[else]
<form id="additem" method="post" action="[doc_base_url][dir][winix_function]/r">
<fieldset>
<legend>{priv_form_legend}</legend>
<p class="withnext">{priv_change_in_dir}: [dir]</p>
<h2>{priv_for_all_files}:</h2>
<table class="withoutborder">
[if priv_show_form_chown]
<tr><th>{user}:</th><td>
<select name="userfile" class="users">
[for priv_user_tab]
<option[if priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option>
[end]
</select>
</td></tr>
<tr><th>{group}: </th><td>
<select name="groupfile" class="groups">
[for priv_group_tab]
<option[if priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option>
[end]
</select>
</td></tr>
[end]
[if priv_show_form_chmod]
<tr><th>{permissions}:</th><td><input class="privileges" type="text" name="privilegesfile" value="[priv_privileges_for_files]"></td></tr>
[end]
</table>
<h2>{priv_for_all_dirs}:</h2>
<table class="withoutborder">
[if priv_show_form_chown]
<tr><th>{user}:</th><td>
<select name="userdir" class="users">
[for priv_user_tab]
<option[if priv_user_tab_isdefault] selected[end]>[priv_user_tab_name]</option>
[end]
</select>
</td></tr>
<tr><th>{group}: </th><td>
<select name="groupdir" class="groups">
[for priv_group_tab]
<option[if priv_group_tab_isdefault] selected[end]>[priv_group_tab_name]</option>
[end]
</select>
</td></tr>
[end]
[if priv_show_form_chmod]
<tr><th>{permissions}:</th><td><input class="privileges" type="text" name="privilegesdir" value="[priv_privileges_for_dirs]"></td></tr>
[end]
</table>
<label><input class="check" type="checkbox" name="changesubdirs">{priv_change_all}</label>
<label><input class="check" type="checkbox" name="changecurrentdir">{priv_change_current_dir}: [dir_without_slash]</label>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</fieldset>
</form>
[end]
</div>

31
winixd/html/fun_pw.html Normal file
View File

@@ -0,0 +1,31 @@
<div class="winix">
<h1>Pw</h1>
[if user_tab]
<table class="tablec">
<tr>
<th>{pw_table_no}</th>
<th>{pw_table_login}</th>
<th>{pw_table_is_root}</th>
<th>{pw_table_is_active}</th>
<th>{pw_table_is_suspended}</th>
<th>{pw_table_is_banned}</th>
</tr>
[for user_tab]
<tr class="[if index "odd"]roweven[else]rowodd[end]">
<td>[user_tab_index]</td>
<td>[user_tab_name]</td>
<td>[if user_tab_is_super_user]{pw_table_yes}[end]</td>
<td>[if user_tab_is_active]{pw_table_yes}[end]</td>
<td>[if user_tab_is_suspended]{pw_table_yes}[end]</td>
<td>[if user_tab_is_blocked]{pw_table_yes}[end]</td>
</tr>
[end]
</table>
[end]
</div>

View File

@@ -0,0 +1,4 @@
[include "slog.html"]

View File

@@ -0,0 +1,30 @@
<div class="winix">
<h1>{reload_header}</h1>
<p>{reload_select}:</p>
<ul>
<li><a href="[doc_base_url][dir]reload/templates">{reload_templates}</a></li>
[if winix_has_plugin "ticket"]
<li><a href="[doc_base_url][dir]reload/tickets">{reload_tickets}</a></li>
[end]
[if winix_has_plugin "group"]
<li><a href="[doc_base_url][dir]reload/group">{reload_group}</a></li>
[end]
[if winix_has_plugin "export"]
<li><a href="[doc_base_url][dir]reload/export">{reload_export}</a></li>
[end]
[if winix_has_plugin "menu"]
<li><a href="[doc_base_url][dir]reload/menu">{reload_menu}</a></li>
[end]
</ul>
</div>

View File

@@ -0,0 +1,61 @@
<div class="winix">
<h1>{thread_header_reply}</h1>
<form method="post" action="[doc_base_url][dir][item_url]/reply">
[if thread_mount_arg_is "subject"]
<div class="winix_input_a">
<label for="">{title}:</label>
<input type="text" name="subject" value="">
</div>
<div class="winix_input_a">
<label for="">{suggested_url}:</label>
<input type="text" name="url" value="">
</div>
[end]
<div class="winix_input_a">
[if mount_type_is "thread"]<label for="winix_content_id">{form_emacs_content_thread}</label>[end]
<textarea id="winix_content_id" rows="10" cols="60" name="itemcontent"></textarea>
</div>
<div class="winix_input_a">
<label for="">{form_emacs_content_type}</label>
<select name="contenttype">
<option value="0">{form_emacs_content_type_text}</option>
<option selected value="1">{form_emacs_content_type_formatted_text}</option>
[if user_can_use_html]<option value="2">{form_emacs_content_type_html}</option>[end]
[if user_can_use_bbcode]<option value="3">{form_emacs_content_type_bbcode}</option>[end]
[if user_can_use_raw]<option value="4">{form_emacs_content_type_raw}</option>[end]
</select>
</div>
[if not user_logged]
<div class="winix_input_a">
<label for="">{nick}:</label>
<input type="text" name="guestname" value="">
</div>
<div class="winix_input_a">
<label for="">{rebus_how_is_it} [rebus_question]?</p>
<input type="text" name="rebus">
</div>
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input type="submit" value="{add}">
</form>
</div>

45
winixd/html/fun_rm.html Normal file
View File

@@ -0,0 +1,45 @@
<div class="winix">
<h1>{rm_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]rm[if not item_is]/r[end]">
<fieldset>
<legend>{rm_form_legend}</legend>
<p>
[if item_is]
[if item_type_is_symlink]
{rm_symlink}: [dir][item_url]
[else]
{rm_file}: [dir][item_url]
[end]
[else]
[if dir_is_root]
{rm_root}
[else]
{rm_dir}: [dir_without_slash]
[end]
[end]
</p>
[if not item_is]
<p>
<label><input type="checkbox" name="c" [if winix_function_param_is "c"]checked="checked"[end]>{rm_only_content}</label>
</p>
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{rm_submit}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,36 @@
<div class="winix">
<h1>{rmuser_header}</h1>
[if user_logged]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]rmuser">
<fieldset>
<legend>{rmuser_legend}</legend>
[if user_super_user]
<p class="withnext">{rmuser_selectuser}:</p>
<select name="userid">
[for user_tab]
<option value="[user_tab_id]">[user_tab_name]</option>
[end]
</select>
[else]
<p>{rmuser_removecurrent}</p>
<input type="hidden" value="[user_id]">
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input type="submit" value="{rmuser_submit}">
</fieldset>
</form>
[end]
</div>

22
winixd/html/fun_run.html Normal file
View File

@@ -0,0 +1,22 @@
<div>
[if mount_page_arg_is "subject"]
[if mount_page_arg_is "info"]
<h1 class="withinfo">
[else]
<h1>
[end]
[item_subject]
</h1>
[end]
[if mount_page_arg_is "info"]
[include "item_info.html"]
[end]
[item_run]
</div>

View File

@@ -0,0 +1,32 @@
<div class="winix">
[if mount_page_arg_is "subject"]<h1[if mount_page_arg_is "info"] class="withinfo"[end]>[dir_last_subject]</h1>[end]
[if mount_page_arg_is "info"][include "dir_last_info.html"][end]
[if thread_can_create]
<div class="winix_itemoptions_b">
<ul>
<li><a href="[doc_base_url][dir]createthread" rel="nofollow">{thread_create_new}</a></li>
</ul>
</div>
[end]
[if thread_sort_tab]
<table class="winix_forum">
<tr><th>{thread_tab_title}</th><th>{thread_tab_author}</th><th>{thread_tab_replies}</th><th>{thread_tab_last_post}</th></tr>
[for thread_sort_tab]
<tr>
<td><a href="[doc_base_url][dir][thread_sort_tab_url]">[thread_sort_tab_subject]</a></td> [# dodac sprawdzanie subject empty]
<td class="smallfont">[thread_sort_tab_user]</td><td class="smallfont">[thread_sort_tab_replies]</td>
<td class="smallfont">[thread_sort_tab_last_item_date_modification_nice] ([thread_sort_tab_last_item_user])</td>
</tr>
[end]
</table>
[end]
</div>

View File

@@ -0,0 +1,62 @@
<div class="winix">
[if mount_page_arg_is "subject"]<h1[if mount_page_arg_is "info"] class="withinfo"[end]>[dir_last_subject]</h1>[end]
[if mount_page_arg_is "info"][include "dir_last_info.html"][end]
[if ticket_can_create]
<div class="winix_itemoptions_b">
<ul>
<li><a href="[doc_base_url][dir]createticket" rel="nofollow">{ticket_create_new}</a></li>
</ul>
</div>
[end]
[if tickets_tab]
<table class="winix_tickets_tab">
<tr>
<th>{tickets_header_name}</th>
[for ticket_tab]
[if any_not [ticket_tab_type_is "images"] [ticket_tab_type_is "files"]]
<th>[filter fil_firstup][ticket_tab_param_name][end]</th>
[end]
[end]
[if winix_has_plugin "thread"]
<th>{thread_tab_author}</th>
<th>{thread_tab_replies}</th>
<th>{thread_tab_last_post}</th>
[end]
</tr>
[for tickets_tab]
<tr>
<td class="winix_tickets_tab_title"><a href="[doc_base_url][dir][tickets_tab_url]">[if not tickets_tab_subject_empty][tickets_tab_subject][else]&lt;[tickets_tab_url]&gt;[end]</a></td>
[for tickets_tab_conf_tab]
[if any_not [tickets_tab_conf_tab_type_is "images"] [tickets_tab_conf_tab_type_is "files"]]
[if tickets_tab_conf_tab_type_is "progress"]
<td><img src="[doc_base_url_common]/{ticket_progress_image_path}/progress_[tickets_tab_conf_tab_progress_image_number].gif" alt="progress [tickets_tab_conf_tab_value]%"></td>
[else]
<td>[tickets_tab_conf_tab_value]</td>
[end]
[end]
[end]
[if winix_has_plugin "thread"]
<td>[thread_sort_tab_user]</td>
<td>[if thread_sort_tab_has_thread][thread_sort_tab_replies][end]</td>
<td>[if thread_sort_tab_has_thread][thread_sort_tab_last_item_date_modification_nice] ([thread_sort_tab_last_item_user])[end]</td>
[end]
</tr>
[end]
</table>
[end]
</div>

54
winixd/html/fun_sort.html Normal file
View File

@@ -0,0 +1,54 @@
<div class="winix">
<h1>{sort_header}</h1>
[if item_is]
<form class="winix_sortable_form" action="[doc_base_url][dir][item_url]/sort" method="post">
<div class="winix_input_b">
<label for="">{sort_current_sortindex}:</p>
<input type="text" name="sortindex" value="[item_sort]">
</div>
<input type="submit" value="{change}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[else]
<p>{sort_info_multi}</p>
[if item_tab]
<form class="winix_sortable_form" action="[doc_base_url][dir]sort" method="post">
<ul id="winix_sort_items">
[for item_tab]
<li id="winix_sort_item_[item_tab_index]">
<input type="text" name="sort[item_tab_id]" value="[item_tab_sort]">
[# is it correct? may give this 'if' only to /-/thumb param? ]
[if item_tab_has_thumb]<img src="[item_tab_link]/-/thumb" alt="[item_tab_subject]">[end]
[item_tab_url] [if not [is item_tab_subject ""]]<span class="winix_sort_item_title">({sort_item_subject}: [item_tab_subject])</span>[end]
</li>
[end]
</ul>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input type="submit" value="{change}">
</form>
[end]
[end]
</div>

28
winixd/html/fun_stat.html Normal file
View File

@@ -0,0 +1,28 @@
<div class="winix">
<h1 class="simple">{stat_header}</h1>
<table class="withoutborder">
<tr><th>{stat_item_type}:</th> <td>
[if stat_item_type_is_file]{stat_item_type_file}[end]
[if stat_item_type_is_static_file]{stat_item_type_static_file}[end]
[if stat_item_type_is_dir]{stat_item_type_dir}[end]
</td></tr>
<tr><th>{stat_item_inode}:</th> <td>[stat_item_inode]</td></tr>
<tr><th>{stat_item_user}:</th> <td>[stat_item_user]</td></tr>
<tr><th>{stat_item_group}:</th> <td>[stat_item_group]</td></tr>
<tr><th>{stat_item_privileges}:</th> <td>[stat_item_privileges]</td></tr>
<tr><th>{stat_item_date_creation}:</th><td>[stat_item_date_creation]</td></tr>
<tr><th>{stat_item_date_modification}:</th><td>[stat_item_date_modification]</td></tr>
<tr><th>{stat_item_template}:</th><td>
[if stat_item_is_template_from_mount_point]{stat_template_from_mount_point}[else][stat_item_template][end]
</td></tr>
</table>
</div>

View File

@@ -0,0 +1,23 @@
<div class="winix">
<h1>{subject_header}</h1>
<form method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]subject">
<div class="winix_input_a">
<label for="winix_title_id">{title}</label>
<input id="winix_title_id" type="text" name="subject" value="[if item_is][item_subject][else][dir_last_subject][end]">
</div>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</form>
</div>

View File

@@ -0,0 +1,73 @@
<div class="winix">
<h1>{template_header}</h1>
<p>
[if item_is]
{template_info_file}:
[if item_has_html_template]
[item_html_template]
[else]
{template_from_mount_point}
[if mount_has_html_template]
([mount_first_html_template])
[else]
([template_index])
[end]
[end]
[else]
{template_info_dir}:
[if dir_last_has_html_template]
[dir_last_html_template]
[else]
{template_from_mount_point}
[if mount_has_html_template]
([mount_first_html_template])
[else]
([template_index])
[end]
[end]
[end]
</p>
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]template">
<fieldset>
<legend>{template_form_legend}</legend>
{template_form_info}:
<select name="template" class="template">
[# the first should be an empty string (value="") which means: a first template from the mount point]
<option value="-1">({template_form_from_mount_point})</option>
[for template_tab]
<option value="[template_tab_index]"[if template_tab_isdefault] selected[end]>[template_tab_file_name]</option>
[end]
</select>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,45 @@
<div class="winix">
[if mount_page_arg_is "subject"]<h1[if mount_page_arg_is "info"] class="winix_withinfo"[end]>[item_subject]</h1>[end]
[if mount_page_arg_is "info"][include "item_info.html"][end]
[if thread_can_reply]
<div class="winix_itemoptions_b">
<ul>
<li><a href="[doc_base_url][dir][item_url]/reply" rel="nofollow">{thread_reply_in_this_thread}</a></li>
</ul>
</div>
[end]
[if not [thread_mount_arg_is "sort_desc"]]
<div class="winix_threadbox">
[if item_can_write]<a class="winix_threadedit" href="[item_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="winix_withinfo"[end]>[item_subject]</h2>[end]
[if thread_mount_arg_is "info"][include "item_info.html"][end]
[item_print_content]
</div>
[end]
[for thread_sort_tab]
<div class="winix_threadbox[if index "even"] winix_threadboxcolor[end]">
[if thread_sort_tab_can_write]<a class="winix_threadedit" href="[thread_sort_tab_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="winix_withinfo"[end]>[thread_sort_tab_subject]</h2>[end]
[if thread_mount_arg_is "info"][include "thread_sort_tab_info.html"][end]
[thread_sort_tab_print_content]
</div>
[end]
[if thread_mount_arg_is "sort_desc"]
<div class="winix_threadbox">
[if item_can_write]<a class="winix_threadedit" href="[item_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="winix_withinfo"[end]>[item_subject]</h2>[end]
[if thread_mount_arg_is "info"][include "item_info.html"][end]
[item_print_content]
</div>
[end]
</div>

View File

@@ -0,0 +1,70 @@
<div class="winix">
[if mount_page_arg_is "subject"]<h1[if mount_page_arg_is "info"] class="withinfo"[end]>[item_subject]</h1>[end]
[if mount_page_arg_is "info"][include "item_info.html"][end]
<div class="winix_ticket">
[if ticket_can_edit]<p class="winix_ticket_edit"><a href="[doc_base_url][dir][item_url]/editticket" rel="nofollow">\[{edit}\]</a></p>[end]
<table>
[for ticket_tab]
[if ticket_tab_has_value]
<tr>
<th>[filter fil_firstup][ticket_tab_param_name]:[end]</th>
<td>
[if ticket_tab_type_is "images"]
[for ticket_tab_file_tab]
<a href="[doc_base_url][ticket_tab_file_tab_path]" rel="lightbox\[a\]">
<img src="[doc_base_url][ticket_tab_file_tab_path]/-/thumb" alt="[ticket_tab_file_tab_path]" height="150">
</a>
[end]
[end]
[if ticket_tab_type_is "files"]
[if ticket_tab_file_tab]
<ul>
[for ticket_tab_file_tab]
<li><a href="[doc_base_url][ticket_tab_file_tab_path]/download">[ticket_tab_file_tab_path]</a></li>
[end]
</ul>
[end]
[end]
[if any_not [ticket_tab_type_is "images"] [ticket_tab_type_is "files"]]
[ticket_tab_value]
[end]
</td>
</tr>
[end]
[end]
</table>
[item_print_content]
</div>
[if winix_has_plugin "thread"]
[if thread_can_reply]
<ul class="winix_itemoptions_b">
<li><a href="[doc_base_url][dir][item_url]/reply" rel="nofollow">{thread_reply_in_this_thread}</a></li>
</ul>
[end]
[for thread_sort_tab]
<div class="threadbox[if index "odd"] threadboxcolor[end]">
[if thread_sort_tab_can_write]<a class="threadedit" href="[thread_sort_tab_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="withinfo"[end]>[thread_sort_tab_subject]</h2>[end]
[if thread_mount_arg_is "info"][include "thread_sort_tab_info.html"][end]
[thread_sort_tab_print_content]
</div>
[end]
[end]
</div>

View File

@@ -0,0 +1,35 @@
<div class="winix">
<h1>{timezone_header}</h1>
[if user_has_correct_time_zone]
<p>{timezone_your_zone}: [user_time_zone_name] (UTC[user_time_zone_offset_hour_min])</p>
[else]
<p>{timezone_has_incorrect_id}</p>
[end]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]timezone">
<fieldset>
<legend>{timezone_form_legend}</legend>
<p class="withnext">{timezone_select}:</p>
[# add to styles]
<select name="timezoneid" style="width: 250px;">
[for winix_tz_tab]
<option value="[winix_tz_tab_id]" [if cmp user_time_zone_id winix_tz_tab_id]selected="selected"[end]>UTC[winix_tz_tab_offset_hour_min] [winix_tz_tab_name]</option>
[end]
</select>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,53 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]tinymce">
<fieldset>
<legend>{form_emacs_legend}</legend>
[if mount_type_is "cms"]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if any [mount_type_is "thread"] [thread_mount_arg_is "subject"]]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if mount_type_is "cms"]<p class="withnext">{form_emacs_content_cms}</p>[end]
[if mount_type_is "thread"]<p class="withnext">{form_emacs_content_thread}</p>[end]
[if mount_type_is "ticket"]<p class="withnext">{form_emacs_content_ticket}</p>[end]
<textarea class="multitext" rows="[if mount_type_is "cms"]30[else]10[end]" cols="60" name="itemcontent">[item_content]</textarea>
<input type="hidden" name="contenttype" value="2">
[if not user_logged]
<p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="[if item_is]{change}[else]{add}[end]">
</fieldset>
</form>
</div>

View File

@@ -0,0 +1,21 @@
<div class="winix">
<h1>{uname_header}</h1>
<p>Winix [sys_ver_major].[sys_ver_minor].[sys_ver_revision]</p>
[if sys_plugin_tab]
{uname_available_plugins}:
<ul>
[for sys_plugin_tab]
<li>[if sys_plugin_tab_has_name][sys_plugin_tab_name][else]&lt;{uname_plugin_unknown}&gt;[end]</li>
[end]
</ul>
[end]
</div>

150
winixd/html/fun_upload.html Normal file
View File

@@ -0,0 +1,150 @@
[if winix_function_param_is "ckeditor_upload"]
<script type="text/javascript">window.parent.CKEDITOR.tools.callFunction([upload_ckeditor_funnum], '[item_link]');</script>
[end]
[if any_not [winix_function_param_is "ckeditor_upload"] [winix_function_param_is "jquery_upload"]]
<div class="winix">
<h1>{upload_header}</h1>
[# the code below are copied from common/fileupload/jquery-ui.html]
[# The file upload form used as target for the file upload widget]
<form id="fileupload" action="[doc_base_url][dir]/upload" method="POST" enctype="multipart/form-data">
[# The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload]
<div class="fileupload-buttonbar">
<div class="fileupload-buttons">
[# The fileinput-button span is used to style the file input field as button]
<span class="fileinput-button">
<span>{upload_button_add_files}</span>
<input type="file" name="files\[\]" multiple>
</span>
<button type="submit" class="start">{upload_button_start_upload}</button>
<button type="reset" class="cancel">{upload_button_cancel_upload}</button>
<button type="button" class="delete">{upload_button_delete}</button>
<input type="checkbox" class="toggle">
[# The global file processing state]
<span class="fileupload-process"></span>
</div>
[# The global progress state]
<div class="fileupload-progress fade" style="display:none">
[# The global progress bar]
<div class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100"></div>
[# The extended global progress state]
<div class="progress-extended">&nbsp;</div>
</div>
</div>
[# The table listing the files available for upload/download]
<table role="presentation"><tbody class="files"></tbody></table>
</form>
[# The blueimp Gallery widget]
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-filter=":even">
<div class="slides"></div>
<h3 class="title"></h3>
<a class="prev"></a>
<a class="next"></a>
<a class="close">×</a>
<a class="play-pause"></a>
<ol class="indicator"></ol>
</div>
[# The template to display files available for upload]
<script id="template-upload" type="text/x-tmpl">
\{% for (var i=0, file; file=o.files\[i\]; i++) \{ %\}
<tr class="template-upload fade">
<td>
<span class="preview"></span>
</td>
<td>
<p class="name">\{%=file.name%\}</p>
<strong class="error"></strong>
</td>
<td>
<p class="size">{upload_button_processing}</p>
<div class="progress"></div>
</td>
<td>
\{% if (!i && !o.options.autoUpload) \{ %\}
<button class="start" disabled>{upload_button_start}</button>
\{% \} %\}
\{% if (!i) \{ %\}
<button class="cancel">{upload_button_cancel}</button>
\{% \} %\}
</td>
</tr>
\{% \} %\}</script>
[# The template to display files available for download]
<script id="template-download" type="text/x-tmpl">
\{% for (var i=0, file; file=o.files\[i\]; i++) \{ %\}
<tr class="template-download fade">
<td>
<span class="preview">
\{% if (file.thumbnailUrl) \{ %\}
<a href="\{%=file.url%\}" title="\{%=file.name%\}" download="\{%=file.name%\}" data-gallery><img src="\{%=file.thumbnailUrl%\}"></a>
\{% \} %\}
</span>
</td>
<td>
<p class="name">
<a href="\{%=file.url%\}" title="\{%=file.name%\}" download="\{%=file.name%\}" \{%=file.thumbnailUrl?'data-gallery':''%\}>\{%=file.name%\}</a>
</p>
\{% if (file.error) \{ %\}
<div><span class="error">{upload_error}</span> \{%=file.error%\}</div>
\{% \} %\}
</td>
<td>
<span class="size">\{%=o.formatFileSize(file.size)%\}</span>
</td>
<td>
<button class="delete" data-type="\{%=file.deleteType%\}" data-url="\{%=file.deleteUrl%\}"\{% if (file.deleteWithCredentials) \{ %\} data-xhr-fields='\{"withCredentials":true\}'\{% \} %\}>{upload_button_delete}</button>
<input type="checkbox" name="delete" value="1" class="toggle">
</td>
</tr>
\{% \} %\}</script>
<script type="text/javascript">
$('#fileupload button.start').css('display', 'none');
$('#fileupload').fileupload(\{
"url": "[doc_base_url][dir]upload/jquery_upload",
"autoUpload": true
\});
$('#fileupload').fileupload(
'option',
'redirect',
window.location.href.replace(
/\/\[^\/\]*$/,
'/cors/result.html?%s'
));
$("div.winix #fileupload button.cancel").css('display','inline');
[# loading existing files]
[# copied from common/fileupload/js/main.js]
$('#fileupload').addClass('fileupload-processing');
$.ajax(\{
[# // Uncomment the following to send cross-domain cookies:]
[# //xhrFields: \{withCredentials: true\},]
url: $('#fileupload').fileupload('option', 'url'),
dataType: 'json',
context: $('#fileupload')\[0\]
\}).always(function () \{
$(this).removeClass('fileupload-processing');
\}).done(function (result) \{
$(this).fileupload('option', 'done')
.call(this, $.Event('done'), \{result: result\});
\});</script>
</div>
[end]

View File

@@ -0,0 +1,21 @@
<div class="winix">
<h1>{uptime_header}</h1>
<p>{uptime_current_time}: [winix_cur_time]<br>
{uptime_up}:
[if uptime_more_than_one_day]
[uptime_days] {uptime_days}
[else]
[uptime_hours]
[end]
<br>
{uptime_how_many_sessions}: [winix_how_many_sessions]<br>
{uptime_users_logged}: [winix_users_logged]<br>
{load_avg}: [winix_loadavg_now], [winix_loadavg_1], [winix_loadavg_5], [winix_loadavg_15]<br>
{req_per_sec}: [winix_req_per_sec_now], [winix_req_per_sec_1], [winix_req_per_sec_5], [winix_req_per_sec_15]
</p>
</div>

55
winixd/html/fun_vim.html Normal file
View File

@@ -0,0 +1,55 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]vim">
<fieldset>
<legend>{form_emacs_legend}</legend>
[if mount_type_is "cms"]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if any [mount_type_is "thread"] [thread_mount_arg_is "subject"]]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if mount_type_is "cms"]<p class="withnext">{form_emacs_content_cms}</p>[end]
[if mount_type_is "thread"]<p class="withnext">{form_emacs_content_thread}</p>[end]
[if mount_type_is "ticket"]<p class="withnext">{form_emacs_content_ticket}</p>[end]
<textarea class="multitext" rows="[if mount_type_is "cms"]30[else]10[end]" cols="60" name="itemcontent">[item_content]</textarea>
<input type="hidden" name="contenttype" value="2">
[if winix_function_param_is "full"]
[else]
[end]
[if not user_logged]
<p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="[if item_is]{change}[else]{add}[end]">
</fieldset>
</form>
</div>

19
winixd/html/fun_who.html Normal file
View File

@@ -0,0 +1,19 @@
<div class="winix">
<h1>{who_header}</h1>
[if who_tab]
<table class="who">
<tr><th>{who_tab_index}</th><th>{user}</th><th>{who_tab_start}</th><th>{who_tab_last_active}</th></tr>
[for who_tab]
<tr><td>[who_tab_lp]</td><td>[who_tab_user]</td><td>[who_tab_time]</td><td>[who_tab_last_time]</td></tr>
[end]
</table>
[else]
<p>{who_none}</p>
[end]
</div>

24
winixd/html/index.html Normal file
View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
[# minimalistic template]
<html lang="{language}">
<head>
<meta charset="UTF-8">
<title>[doc_title]</title>
[include "index_head_functions_add.html"]
</head>
<body>
<div>
[include "slog.html"]
[# each winix function has div.winix in its template defined -- only functions: cat and run don't have div.winix]
[# so you can easly use 'content' with your own template]
[# and when using other winix functions you automatically get proper styling]
[content]
</div>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
[# minimalistic template]
<html lang="{language}">
<head>
<meta charset="UTF-8">
<title>[doc_title]</title>
[include "index_head_functions_add.html"]
</head>
<body>
<div>
[include "slog.html"]
[# each winix function has div.winix in its template defined -- only functions: cat and run don't have div.winix]
[# so you can easly use 'content' with your own template]
[# and when using other winix functions you automatically get proper styling]
[content]
</div>
</body>
</html>

View File

@@ -0,0 +1,331 @@
[# other stuff needed by a specific function]
[if one [winix_function_is "adduser"]
[winix_function_is "chmod"]
[winix_function_is "chown"]
[winix_function_is "ckeditor"]
[winix_function_is "cp"]
[winix_function_is "default"]
[winix_function_is "download"]
[winix_function_is "emacs"]
[winix_function_is "env"]
[winix_function_is "imgcrop"]
[winix_function_is "ipban"]
[winix_function_is "last"]
[winix_function_is "ln"]
[winix_function_is "locale"]
[winix_function_is "login"]
[winix_function_is "logout"]
[winix_function_is "ls"]
[winix_function_is "man"]
[winix_function_is "meta"]
[winix_function_is "mkdir"]
[winix_function_is "mount"]
[winix_function_is "mv"]
[winix_function_is "nicedit"]
[winix_function_is "node"]
[winix_function_is "passwd"]
[winix_function_is "priv"]
[winix_function_is "pw"]
[winix_function_is "reload"]
[winix_function_is "rm"]
[winix_function_is "rmuser"]
[winix_function_is "sort"]
[winix_function_is "stat"]
[winix_function_is "subject"]
[winix_function_is "template"]
[winix_function_is "timezone"]
[winix_function_is "tinymce"]
[winix_function_is "uname"]
[winix_function_is "upload"]
[winix_function_is "uptime"]
[winix_function_is "vim"]
[winix_function_is "who"]]
<link rel="stylesheet" href="[doc_base_url_common]/winix/winix.css" type="text/css">
[end]
[if winix_function_is "emacs"]
<script type="text/javascript" src="[doc_base_url_common]/codemirror-5.1/lib/codemirror.js"></script>
<link rel="stylesheet" href="[doc_base_url_common]/codemirror-5.1/lib/codemirror.css" type="text/css">
<script src="[doc_base_url_common]/codemirror-5.1/mode/css/css.js"></script>
<script src="[doc_base_url_common]/codemirror-5.1/mode/javascript/javascript.js"></script>
<script src="[doc_base_url_common]/codemirror-5.1/mode/xml/xml.js"></script>
<script src="[doc_base_url_common]/codemirror-5.1/mode/htmlmixed/htmlmixed.js"></script>
<!--<link rel="stylesheet" href="[doc_base_url_common]/codemirror-5.1/theme/base16-light.css" type="text/css">-->
<script src="[doc_base_url_common]/codemirror-5.1/addon/display/fullscreen.js"></script>
<link rel="stylesheet" href="[doc_base_url_common]/codemirror-5.1/addon/display/fullscreen.css" type="text/css">
[if false]
<script src="[doc_base_url_common]/codemirror-5.1/addon/search/search.js"></script>
<link rel="stylesheet" href="[doc_base_url_common]/codemirror-5.1/addon/search/matchesonscrollbar.css" type="text/css">
[end]
<script src="[doc_base_url_common]/codemirror-5.1/addon/fold/xml-fold.js"></script>
<script src="[doc_base_url_common]/codemirror-5.1/addon/edit/matchtags.js"></script>
<script src="[doc_base_url_common]/codemirror-5.1/addon/selection/active-line.js"></script>
<style>
.CodeMirror-matchingtag \{
font-weight: bold;
background: none;
\}
.CodeMirror-activeline-background \{
background: #f3f3f3;
\}
.CodeMirror \{
border: 1px solid #dedede;
\}
</style>
<script type="text/javascript">
var winix_code_mirror_editor;
function winix_initialize_editor()
\{
var text_area = document.getElementById("winix_content_id");
if( text_area )
\{
winix_code_mirror_editor = CodeMirror.fromTextArea(text_area, \{
mode: "htmlmixed",
theme: "default",
indentUnit: 4,
smartIndent: true,
tabSize: 4,
indentWithTabs: true,
extraKeys: \{
"F11": function(cm) \{ cm.setOption("fullScreen", !cm.getOption("fullScreen")); \},
"Esc": function(cm) \{ if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false); \}
\},
lineNumbers: true,
lineWiseCopyCut: false,
dragDrop: false,
matchTags: true,
styleActiveLine: true
\});
\}
\}
[if false]
this will probably be used to change the mode in the fly
winix_code_mirror_editor.setOption("mode", "");
before saving (update button by ajax) this method should be used:
cm.save()
Copy the content of the editor into the textarea.
[end]
if( window.addEventListener )
window.addEventListener("load", winix_initialize_editor, false);
else
if( window.attachEvent )
window.attachEvent("onload", winix_initialize_editor);
</script>
[end]
[if winix_function_is "ckeditor"]
<script type="text/javascript" src="[doc_base_url_common]/ckeditor/ckeditor.js"></script>
[end]
[if winix_function_is "tinymce"]
<!--<script type="text/javascript">document.domain = "www.slimaczek.pl";</script>-->
<script type="text/javascript" src="[doc_base_url]/common/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="[doc_base_url]/var/tinymce.js"></script>
[end]
[if winix_function_is "nicedit"]
<script type="text/javascript" src="[doc_base_url_common]/nicedit/nicEdit.js"></script>
[end]
[if winix_function_is "vim"]
[# this editor doesn't work on different domains by default, solution: http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=731&p=2507#p2504 ]
[# you should add one file to winix: wymiframe.html ]
<script type="text/javascript" src="[doc_base_url_common]/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="[doc_base_url_common]/wymeditor/jquery.wymeditor.min.js"></script>
<script type="text/javascript" src="[doc_base_url_common]/wymeditor/lang/en.js"></script>
<script type="text/javascript" src="[doc_base_url_common]/wymeditor/skins/default/skin.js"></script>
<link rel="stylesheet" type="text/css" href="[doc_base_url_common]/wymeditor/skins/default/skin.css">
<script type="text/javascript">jQuery(function() \{ jQuery("textarea").wymeditor(\{ basePath: "[doc_base_url_common]/wymeditor/", iframeBasePath: "[doc_base_url]/var/", updateSelector : "form", updateEvent: 'submit' \}); \});</script>
[end]
[if winix_function_is "ticket"]
[# !! dodac lightboxa tylko jesli tickety zawieraja obrazki ]
<!--
[# warning: prototype doesn't work with jquery in clock tickets (in client panel)]
<link rel="stylesheet" href="[doc_base_url_common]/lightbox/lightbox.css" type="text/css" media="screen">
<script src="[doc_base_url_common]/lightbox/js/prototype.js" type="text/javascript"></script>
<script src="[doc_base_url_common]/lightbox/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="[doc_base_url_common]/lightbox/js/lightbox.js" type="text/javascript"></script>
-->
[end]
[if winix_function_is "gallery"]
[if one gallery_has_not_mount_type [gallery_mount_type_arg_is "lightbox"]]
<link rel="stylesheet" href="[doc_base_url_common]/lightbox/lightbox.css" type="text/css" media="screen">
<script src="[doc_base_url_common]/lightbox/js/prototype.js" type="text/javascript"></script>
<script src="[doc_base_url_common]/lightbox/js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="[doc_base_url_common]/lightbox/js/lightbox.js" type="text/javascript"></script>
[end]
[if one [gallery_mount_type_arg_is "galleria"] [gallery_mount_type_arg_is "galleriathumb"]]
<script type="text/javascript" src="[doc_base_url_common]/jquery-1.4.4.min.js"></script>
<script src="[doc_base_url_common]/aino-galleria/galleria-1.2.2.min.js" type="text/javascript"></script>
[end]
[if one [gallery_mount_type_arg_is "galleria1.2.9"] [gallery_mount_type_arg_is "galleriathumb1.2.9"]]
<script type="text/javascript" src="[doc_base_url_common]/jquery-1.9.1.min.js"></script>
<script src="[doc_base_url_common]/galleria/galleria-1.2.9.min.js" type="text/javascript"></script>
[end]
[end]
[if winix_function_is "upload"]
[# http://blueimp.github.io/jQuery-File-Upload/jquery-ui.html]
[# https://github.com/blueimp/jQuery-File-Upload]
[# we are using the *jQuery UI version* of the plugin]
[# Force latest IE rendering engine or ChromeFrame if installed]
<!--\[if IE\]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!\[endif\]-->
[# jQuery UI styles]
[# original http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/dark-hive/jquery-ui.css]
<link rel="stylesheet" href="[doc_base_url_common]/jquery-ui-1.10.4.custom/css/smoothness/jquery-ui-1.10.4.custom.min.css" id="theme">
[if false]
<!-- Demo styles -->
<link rel="stylesheet" href="[doc_base_url_common]/fileupload/css/demo.css">
<!--\[if lte IE 8\]>
<link rel="stylesheet" href="[doc_base_url_common]/fileupload/css/demo-ie8.css">
<!\[endif\]-->
[end]
[# blueimp Gallery styles]
[# original http://blueimp.github.io/Gallery/css/blueimp-gallery.min.css]
<link rel="stylesheet" href="[doc_base_url_common]/gallery-2.15.1/css/blueimp-gallery.min.css">
[# CSS to style the file input field as button and adjust the Bootstrap progress bars]
<link rel="stylesheet" href="[doc_base_url_common]/fileupload/css/jquery.fileupload.css">
<link rel="stylesheet" href="[doc_base_url_common]/fileupload/css/jquery.fileupload-ui.css">
[# CSS adjustments for browsers with JavaScript disabled]
<noscript><link rel="stylesheet" href="[doc_base_url_common]/fileupload/css/jquery.fileupload-noscript.css"></noscript>
<noscript><link rel="stylesheet" href="[doc_base_url_common]/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
[# those below can be moved to the bottom of the page (outside of <head>]
[# original //ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js]
<script src="[doc_base_url_common]/jquery-1.11.0.min.js"></script>
[# original //ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js]
<script src="[doc_base_url_common]/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.min.js"></script>
[# The Templates plugin is included to render the upload/download listings]
[# original http://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js]
<script src="[doc_base_url_common]/fileupload/others/tmpl.min.js"></script>
[# The Load Image plugin is included for the preview images and image resizing functionality]
[# original http://blueimp.github.io/JavaScript-Load-Image/js/load-image.min.js]
<script src="[doc_base_url_common]/fileupload/others/load-image.min.js"></script>
[# The Canvas to Blob plugin is included for image resizing functionality]
[# original http://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js]
<script src="[doc_base_url_common]/fileupload/others/canvas-to-blob.min.js"></script>
[# blueimp Gallery script]
[# original http://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js]
<script src="[doc_base_url_common]/gallery-2.15.1/js/jquery.blueimp-gallery.min.js"></script>
[# The Iframe Transport is required for browsers without support for XHR file uploads]
<script src="[doc_base_url_common]/fileupload/js/jquery.iframe-transport.js"></script>
[# The basic File Upload plugin]
<script src="[doc_base_url_common]/fileupload/js/jquery.fileupload.js"></script>
[# The File Upload processing plugin]
<script src="[doc_base_url_common]/fileupload/js/jquery.fileupload-process.js"></script>
[# The File Upload image preview & resize plugin]
<script src="[doc_base_url_common]/fileupload/js/jquery.fileupload-image.js"></script>
[# The File Upload audio preview plugin]
<script src="[doc_base_url_common]/fileupload/js/jquery.fileupload-audio.js"></script>
[# The File Upload video preview plugin]
<script src="[doc_base_url_common]/fileupload/js/jquery.fileupload-video.js"></script>
[# The File Upload validation plugin]
<script src="[doc_base_url_common]/fileupload/js/jquery.fileupload-validate.js"></script>
[# The File Upload user interface plugin]
<script src="[doc_base_url_common]/fileupload/js/jquery.fileupload-ui.js"></script>
[# The File Upload jQuery UI plugin]
<script src="[doc_base_url_common]/fileupload/js/jquery.fileupload-jquery-ui.js"></script>
[if false]
[# code from fileupload/js/main.js we are using in fun_upload.html (at the bottom)]
<!-- The main application script -->
<script src="[doc_base_url_common]/fileupload/js/main.js"></script>
[end]
[# The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9]
<!--\[if (gte IE 8)&(lt IE 10)\]>
<script src="[doc_base_url_common]/fileupload/js/cors/jquery.xdr-transport.js"></script>
<!\[endif\]-->
[end]
[if winix_function_is "sort"]
[if not item_is]
<script type="text/javascript" src="[doc_base_url_common]/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="[doc_base_url_common]/jquery-ui-1.8.13/js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="[doc_base_url_common]/sort.js"></script>
[end]
[end]
[if winix_function_is "imgcrop"]
<script type="text/javascript" src="[doc_base_url_common]/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="[doc_base_url_common]/jcrop-0.9.12/js/jquery.Jcrop.js"></script>
<link type="text/css" rel="stylesheet" href="[doc_base_url_common]/jcrop-0.9.12/css/jquery.Jcrop.css">
[end]
[if false]
[# temporarily blocked]
[if winix_has_plugin "stats"]
[include "stats_info.html"]
[end]
[end]

View File

@@ -0,0 +1,5 @@
<p class="winix_iteminfo">
{added_by}: [item_user], [item_date_creation_nice][if not item_dates_equal],
{last_modified}[if item_users_different] {by}: [item_modification_user],[else]:[end]
[item_date_modification_nice][end]
</p>

View File

@@ -0,0 +1,39 @@
[if not [winix_function_param_is "fullscreen"]]
[if dir_can_write item_can_write]
<div class="winix_itemoptions_a">
[if dir_can_write]
<h2>{add_page}</h2>
<ul>
<li><a href="[doc_base_url][dir]emacs">{admin_emacs_add}</a></li>
[if user_can_use_html]
<li><a href="[doc_base_url][dir]ckeditor">{admin_ckeditor_add}</a></li>
<li><a href="[doc_base_url][dir]nicedit">{admin_nicedit_add}</a></li>
<li><a href="[doc_base_url][dir]tinymce">{admin_tinymce_add}</a></li>
[end]
</ul>
[end]
[if item_is item_can_write]
<h2>{edit_page}</h2>
<ul>
<li><a href="[doc_base_url][dir][item_url]/emacs">{admin_emacs_edit}</a></li>
[if user_can_use_html]
<li><a href="[doc_base_url][dir][item_url]/ckeditor">{admin_ckeditor_edit}</a></li>
<li><a href="[doc_base_url][dir][item_url]/nicedit">{admin_nicedit_edit}</a></li>
<li><a href="[doc_base_url][dir][item_url]/tinymce">{admin_tinymce_edit}</a></li>
[end]
</ul>
[end]
<h2>{admin_options}:</h2>
<ul>
<li><a href="[doc_base_url][dir]ls">{admin_ls}</a></li>
[if dir_can_write]<li><a href="[doc_base_url][dir]mkdir">{admin_mkdir}</a></li>[end]
[if dir_can_write]<li><a href="[doc_base_url][dir]upload">{admin_upload}</a></li>[end]
[if not item_is]<li><a href="[doc_base_url][dir]sort">{admin_sort}</a></li>[end]
[if any item_is item_can_remove]<li><a href="[doc_base_url][dir][item_url]/rm">{admin_rm}</a></li>[end]
</ul>
</div>
[end]
[end]

View File

@@ -0,0 +1,8 @@
<p class="[if index "odd"]winix_itemtabinfo[else][if thread_mount_arg_is "subject"]winix_itemtabinfo[else]winix_itemtabinfo2[end][end]">
{added_by}: [item_tab_user], [item_tab_date_creation_nice][if not item_tab_dates_equal],
{last_modified}[if item_tab_users_different] {by}: [item_tab_modification_user],[else]:[end]
[item_tab_date_modification_nice]
[end]
</p>

30
winixd/html/slog.html Normal file
View File

@@ -0,0 +1,30 @@
[if slog_tab]
<table class="winix_slog">
[for slog_tab]
<tr>
<th class="[if slog_tab_is_error]winix_slogerror[end][if slog_tab_is_warning]winix_slogwarning[end][if slog_tab_is_info]winix_sloginfo[end]">
[if slog_tab_is_info]
{slog_info}:
[end]
[if slog_tab_is_warning]
{slog_warning}:
[end]
[if slog_tab_is_error]
{slog_error}:
[end]
</th>
<td>
[slog_tab_print]
</td>
</tr>
[end]
</table>
[end]

View File

@@ -0,0 +1,17 @@
[if winix_has_plugin "stats"]
<!--
Statistics since: [stats_from],
global: all: [stats_all],
unique: [stats_unique],
Google: [stats_google],
Yahoo: [stats_yahoo],
Bing: [stats_bing],
this page:
all: [stats_item_all],
Google: [stats_item_google],
Yahoo: [stats_item_yahoo],
Bing: [stats_item_bing]
-->
[end]

View File

@@ -0,0 +1,8 @@
<p class="[if index "even"]winix_itemtabinfo[else][if thread_mount_arg_is "subject"]winix_itemtabinfo[else]winix_itemtabinfo2[end][end]">
{added_by}: [thread_sort_tab_user], [thread_sort_tab_date_creation_nice][if not thread_sort_tab_dates_equal],
{last_modified}[if thread_sort_tab_users_different] {by}: [thread_sort_tab_modification_user],[else]:[end]
[thread_sort_tab_date_modification_nice]
[end]
</p>

623
winixd/locale/en Normal file
View File

@@ -0,0 +1,623 @@
winix_locale_id = "0"
locale_name = "english"
language = en
charset = UTF-8
logged_as = logged as
logged_as_long = You are logged as
display_guest_name = guest
unknown = unknown
syntax_error_in_line = Syntax error in line:
this_ip_is_banned_until = We are sorry but your IP address is banned until to:
account_not_activated = This account is not activated yet.
account_suspended = This account is temporarily suspended
account_banned = This account has been banned
account_activated = Your account has been activated
incorrect_activation_code = Incorrect activation code
account_already_activated = This account is already activated
account_cannot_be_activated = This account cannot be activated, please contact with the system administrator
account_email_sent = An email with an activation link has been sent to you
export_header = Export
export_transer_file_info = Press Export to transfer the file to an external ftp server
export_transer_dir_info = Press Export to transfer the directory to an external ftp server
export_checkbox_static_file_too = "Export static files too (images etc.)"
code_expired = The code has expired
password_cannot_be_changed = The password cannot be changed, please contact with the system administrator
incorrect_change_password_code = Incorrect code for changing your password
service_unavailable = We are sorry, this service is temporarily unavailable
email_sent_to = An email has been sent to:
logout = logout
remember_me = Remember me
home_page = Home page
button_login = Login
load_avg = load averages
req_per_sec = Requests per second
added_by = Added by
last_modified = Last modified
by = by
error_404 = Error 404
error_404_msg = We are sory but there is no such a page in our service.
internal_error = Internal error, check system log for more details
was_errors = We are sory but there were some problems with the operation.
error_code = Error code
access_denied = Permission denied
access_denied_msg = We are sory but you don't have access to the page.
download = download
cat_image_url = Image url
cat_image_thumb_url = Thumbnail url
cat_file_url = File url
create_thread_header = Create thread
form_thread_legend = Thread form
button_thread_submit = Create thread
url = Url
suggested_url = Suggested url
short_url = Short url
title = Title
nick = Nick
change = Change
edit = Edit
add = Add
move = Move
copy = Copy
user = User
group = Group
permissions = Permissions
yes = Yes
no = No
add_page = Add page
edit_page = Edit page
rebus_how_is_it = Rebus: How is it
edit_ticket_header = Edit ticket
create_ticket_header = Create a new ticket
form_ticket_type = Ticket type
form_ticket_status = Status
form_ticket_priority = Priority
form_ticket_category = Category
form_ticket_expected = Expected in
form_ticket_progress = "Progress (0-100)"
form_ticket_create_submit = Create a new ticket
form_ticket_edit_submit = Edit a ticket
env_header = Environment variables for a user
form_env_legend = Environment variables form
env_change_env_for_user = Change environment variables for user
env_change_admin_env_for_user = Change admin environment variables for user
env_change_user = Change user
default_header = Default item in a directory
default_make_redirect = Make redirect
form_default_legend = Default item form
ln_header = Link
ln_info = Create a link in directory
ln_to = Link pointing to
ln_hardlink = hardlink
ln_symlink = symbolic link
ln_make_redirect = "Make redirect (only for symbolic links)"
form_ln_legend = Link form
form_emacs_content_cms = Content
form_emacs_content_thread = Post
form_emacs_content_ticket = Info
form_emacs_content_type = Message type
form_emacs_content_type_text = text
form_emacs_content_type_formatted_text = formatted text
form_emacs_content_type_html = html
form_emacs_content_type_bbcode = bbcode
form_emacs_content_type_raw = raw
last_header = Last logged users
last_tab_login = Login
last_tab_ip = IP
last_tab_login_date = Login time
last_tab_logout_date = Logout time
last_none = There is no anything information.
ls_header = Directory listing
ls_pictures_in_dir = Pictures in directory
ls_no_picture = There are not any pictures in this directory
ipban_header = IP Banned
ipban_col_id = Id
ipban_col_ip_address = IP address
ipban_col_login_failures = Login failures
ipban_col_broken_cookie = Broken cookies
ipban_session_hijacking = Session hijacking
ipban_no_session_cookie = No session cookie
ipban_col_login_allowed = Login allowed
ipban_col_ban_level = Ban level
ipban_col_active_flag = Active flag
ipban_col_last_used = Last used
ipban_col_expires = Expires
ipban_col_remove = Remove
ipban_loggin_allowed = yes
ipban_loggin_not_allowed = no
ipban_has_active_flag = yes
ipban_remove_ip = remove
ipban_remove_all_ip = Remove all IP's from the list
ipban_ban_list_empty = There are not any IP addresses banned at the moment.
ipban_your_ip_is_banned = Your IP address is banned on this server until to:
man_header = Man
man_winix_funcions = Winix functions
man_ezc_functions = EZC templates functions
meta_header = Meta
meta_admin_header = Admin meta
mkdir_header = Make directory
mkdir_form_legend = Make directory form
html_lang_attr_value = "en"
language_orphans = ()
passwd_header = Passwd
passwd_login = Select a user
passwd_current_password = Current password
passwd_new_password = New password
passwd_confirm_new_password = Confirm new password
passwd_submit = Change
passwd_err_bad_current_password = Incorrect current password.
passwd_password_changed = The password has been changed
priv_header = Permissions
priv_form_legend = Permissions
priv_change_in_dir = Change permissions for all items in the following directory
priv_for_all_files = For all files to
priv_for_all_dirs = For all directories to
priv_change_all = Change subdirectories as well
priv_change_current_dir = Change also the current directory
pw_header = Users
pw_table_no = No
pw_table_login = Login
pw_table_is_root = Is Root
pw_table_is_active = Is active
pw_table_is_suspended = Is suspended
pw_table_is_banned = Is banned
pw_table_yes = yes
pw_table_no = no
pw_password_changed = Your password has been changed
reload_header = Reload
reload_select = Choose an item to reload
reload_templates = html templates
reload_tickets = tickets config files
reload_group = groups config files
reload_export = "export directories (FTP)"
reload_menu = plugin menu cache
rm_header = Remove
rm_form_legend = Remove form
rm_file = Do you really want to remove file
rm_symlink = Do you really want to remove symlink
rm_dir = Do you really want to remove directory
rm_only_content = Remove only the content of the directory
rm_root = You cannot remove the root directory, you are only allowed to delete the content of the directory
rm_submit = Remove
rm_cannot_create_static_path = I cannot create a path to a static file
rm_cannot_remove_static_file = I cannot remove a static file
rm_permission_denied_to = Permission denied to remove
rm_directory_not_empty = directory not empty
rm_use_r_option = This is a directory, use 'r' parameter to remove it
rm_cannot_remove_root_dir = You cannot remove the root directory
rm_content_use_r_option = Content of a directory can be removed only with 'r' parameter
rmuser_header = Remove user
rmuser_legend = Remove user form
rmuser_selectuser = Select a user
rmuser_submit = Remove
rmuser_removecurrent = Are you really want to remove your account from our service?
thread_create_new = Create a new thread
thread_tab_title = Thread title
thread_tab_author = Author
thread_tab_replies = Rep.
thread_tab_last_post = Last post
thread_reply_in_this_thread = Reply in this thread
thread_header_reply = Reply
ticket_progress_image_path = ticket_progress
ticket_create_new = Create a new ticket
tickets_header_name = Ticket
ticket_info_type = Type
ticket_info_status = Status
ticket_info_priority = Priority
ticket_info_category = Category
ticket_info_expected = Expected in
ticket_info_progress = Progress
ticket_reply_in_this_thread = Replay in this thread
ticket_value_not_set = this ticket doesn't have such a value yet
ticket_delete_file = Delete
template_header = Template
template_info_file = Current html template for this file
template_info_dir = Current html template for this directory
template_from_mount_point = is taken from the mount point
template_form_legend = Template form
template_form_info = Select a new template
template_form_from_mount_point = from the mount point
upload_header = Files manager
upload_button_add_files = Add files...
upload_button_start = Start
upload_button_cancel = Cancel
upload_button_start_upload = Start upload
upload_button_cancel_upload = Cancel upload
upload_button_delete = Delete
upload_button_processing = Processing...
upload_button_download = Download
upload_error = Error:
who_header = Sessions
who_tab_index = Ind.
who_tab_start = Start
who_tab_last_active = Last active
who_none = There is no any sessions.
admin_options = Other administrative options
admin_ls = "List directory (ls)"
admin_mkdir = "Add directory (mkdir)"
admin_emacs_add = "Add page (emacs)"
admin_emacs_edit = "Edit page (emacs)"
admin_ckeditor_add = "Add page (ckeditor)"
admin_ckeditor_edit = "Edit page (ckeditor)"
admin_nicedit_add = "Add page (nicedit)"
admin_nicedit_edit = "Edit page (nicedit)"
admin_tinymce_add = "Add page (tinymce)"
admin_tinymce_edit = "Edit page (tinymce)"
admin_rm = "Remove page (rm)"
admin_upload = "File manager (upload)"
admin_sort = "Sort items (sort)"
locale_header = Locale
locale_your_locale = Current language
locale_has_incorrect_id = You don't have a correct language set
locale_form_legend = Locale form
locale_select = Select language
login_header = Login
login_cannot_login_from_this_ip = We are sorry but you cannot login from this IP address.
#We are sorry but there were too many incorrect login attempts from your IP address.
login_cannot_login_available = The login process will be available since:
uptime_header = Uptime
uptime_current_time = current time
uptime_up = system running for
uptime_how_many_sessions = all sessions
uptime_users_logged = logged users
uptime_days = days
adduser_header_add = Add a user
adduser_header_register = Register
adduser_form_legend = Register user form
adduser_login = Login
adduser_password = Password
adduser_confirm_password = Confirm password
adduser_email = You can also provide your email address. If you ever forget your password we will be able send you the password back.
adduser_need_email = You have to provide your email address.
adduser_need_email2 = We send you an email with an activation link
adduser_submit = Add user
register_user_submit = Register
adduser_err_login_empty = Provide a login please.
adduser_err_login_incorrect_chars = We are sorry but the login consists of prohibited letters.
adduser_err_user_exists = We are sorry, but that user is already registered, check other login!
adduser_err_passwords_different = Passwords are different!
adduser_err_password_too_small = A password should consist of at least
adduser_err_password_too_small2 = characters.
adduser_err_login_too_big = Login cannot be longer than
adduser_err_login_too_big2 = characters
adduser_err_password_too_big = Password cannot be longer than
adduser_err_password_too_big2 = characters
adduser_err_email_too_big = Email cannot be longer than
adduser_err_email_too_big2 = characters
adduser_auto_activate = Automatically activate this account
adduser_err_email_incorrect = This email is not correct
mount_header = Mount points
mount_type = Mount point type
mount_dir = Directory
mount_fs = File system
mount_parameters = Parameters
mount_table = Table with all mount points
mount_current = Current mount point
mv_header = Move
mv_form_legend = Move form
mv_page = Move page
mv_dir = Move directory
mv_only_content = Move only content of the directory
mv_cant_move_root_dir = the root directory cannot be moved anywhere
mv_permission_denied_to = Permission denied to
mv_incorrect_path = Incorrent path
mv_dir_can_be_moved_to_dir = A directory can be moved only to an other directory
mv_dir_content_can_be_moved_to_dir = Directory content can be moved only to an other directory
mv_cannot_move_to_inside = A directory cannot be moved to inside it
mv_incorrect_dst_path = Incorrect destination path
mv_incorrect_dir = Incorrect directory
timezone_header = Time Zone
timezone_form_legend = Time Zone form
timezone_select = Select your time zone
timezone_your_zone = Your current time zone is
timezone_has_incorrect_id = You don't have a correct time zone set
cp_header = Copy
cp_form_legend = Copy form
cp_page = Copy page
cp_dir = Copy directory
cp_only_content = Copy only content of the directory
cp_remove_defaults = Remove 'default' attribute from copied directories
cp_preserve_attr = Preserve attributes: user, group, times
cp_follow_symlinks = Follow symlinks
slog_warning = Warning
slog_error = Error
slog_info = Info
unknown_filesystem = Unknown filesystem
no_such_dir = There is not such a directory
unknown_mount_type = There is not such a mount type
unknown_mount_param = Unknown mount point parameter
skipped = skipped
skipped_static_mount = Skipped static mount point
mount_exists = This mount point already exists
slog_turn_over = Session's log turned over due to size greater than
sort_header = Sort
sort_current_sortindex = Current sort index
sort_info_multi = Set an order of items by using the mouse.
sort_item_subject = Subject:
stat_header = Stat
stat_item_type = type
stat_item_type_file = file
stat_item_type_dir = directory
stat_item_type_static_file = static file
stat_item_inode = inode
stat_item_user = user
stat_item_group = group
stat_item_privileges = privileges
stat_item_date_creation = date creation
stat_item_date_modification = date modification
stat_item_template = template
stat_template_from_mount_point = from the mount point
subject_header = Edit subject
uname_header = Uname
uname_available_plugins = Available plugins
uname_plugin_unknown = Plugin has not set its name
# notifications
notify_new = News
notify_change = Changes
notify_reply = Reply
notify_confirm_account = Confirm your account
notify_reset_password = Reset your password
notify_from_name = winix notifications
notify_from_email = dontreply@winix.org
notify_content_type = text/plain; charset="UTF-8"
notify_header = Welcome
notify_msg1 = We would like to inform you that
notify_msg2 = someone created a new thread:
notify_msg2b = someone created a new ticket:
notify_msg3 = someone replied in a thread:
notify_msg4 = someone has changed its post:
notify_msg5 = a post has been deleted from a thread:
notify_msg6 = a new page has been added:
notify_msg7 = a page has been modified:
notify_msg7b = a ticket has been modified:
notify_msg8 = a page has been deleted:
notify_msg9 = We invite you to read.
notify_msg9b = Have a good day. Bye.
notify_msg10 = This email is sent to you because you are in the process of creating a new account in our service.
notify_msg11 = In order to activate your account click on the link below:
notify_msg12 = If you did not request an account in our service just ignore the email.
notify_msg13 = This email is sent to you because you are requested to change your password.
notify_msg14 = In order to set a new password please visit following page:
notify_msg15 = If you did not request to change the password just ignore the email.
notify_footer1 = http://www.winix.org
notify_footer2 = This message has been sent automatically - do not answer please.
notify_footer3 = If you do not want to receive such messages you can switch them off
notify_footer4 = in your user control panel.
# those errors are taken automatically by [winix_err_msg_from_locales]
# IMPROVE ME now they are not used, and should be moved to slog
winix_err_3 = Incorrect directory.
winix_err_18 = You are suspected to be a spammer, you cannot send anything without logging first.
winix_err_19 = Solve the rebus please!
winix_err_25 = Passwords are different!
winix_err_26 = A password should consist of at least five characters.
winix_err_27 = We are sorry, but that user is already registered, check other login!
winix_err_28 = Provide a login please.
winix_err_29 = The mount points are different.
tz_-12:00 = International Date Line West
tz_-11:00 = Coordinated Universal Time-11
tz_-10:00 = Hawaii
tz_-09:00 = Alaska
tz_-08:00 = Baja California
tz_-08:00b = Pacific Time \(US & Canada\)
tz_-07:00 = Arizona
tz_-07:00b = Chihuahua, La Paz, Mazatlan
tz_-07:00c = Mountain Time \(US & Canada\)
tz_-06:00 = Central America
tz_-06:00b = Central Time \(US & Canada\)
tz_-06:00c = Guadalajara, Mexico City, Monterrey
tz_-06:00d = Saskatchewan
tz_-05:00 = Bogota, Lima, Quito
tz_-05:00b = Eastern Time \(US & Canada\)
tz_-05:00c = Indiana \(East\)
tz_-04:30 = Caracas
tz_-04:00 = Asuncion
tz_-04:00b = Atlantic Time \(Canada\)
tz_-04:00c = Cuiaba
tz_-04:00d = Georgetown, La Paz, Manaus, San Juan
tz_-04:00e = Santiago
tz_-03:30 = Newfoundland
tz_-03:00 = Brasilia
tz_-03:00b = Buenos Aires
tz_-03:00c = Cayenne, Fortaleza
tz_-03:00d = Greenland
tz_-03:00e = Montevideo
tz_-03:00f = Salvador
tz_-02:00 = Coordinated Universal Time-02
tz_-02:00b = Mid-Atlantic
tz_-01:00 = Azores
tz_-01:00b = Cape Verde Is.
tz_00:00 = Casablanca
tz_00:00b = Coordinated Universal Time
tz_00:00c = Dublin, Edinburgh, Lisbon, London
tz_00:00d = Monrovia, Reykjavik
tz_+01:00 = Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
tz_+01:00b = Belgrade, Bratislava, Budapest, Ljubljana, Prague
tz_+01:00c = Brussels, Copenhagen, Madrid, Paris
tz_+01:00d = Sarajevo, Skopje, Warsaw, Zagreb
tz_+01:00e = West Central Africa
tz_+01:00f = Windhoek
tz_+02:00 = Amman
tz_+02:00b = Athens, Bucharest
tz_+02:00c = Beirut
tz_+02:00d = Cairo
tz_+02:00e = Damascus
tz_+02:00f = Harare, Pretoria
tz_+02:00g = Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
tz_+02:00h = Istanbul
tz_+02:00i = Jerusalem
tz_+02:00j = Nicosia
tz_+03:00 = Baghdad
tz_+03:00b = Kaliningrad, Minsk
tz_+03:00c = Kuwait, Riyadh
tz_+03:00d = Nairobi
tz_+03:30 = Tehran
tz_+04:00 = Abu Dhabi, Muscat
tz_+04:00b = Baku
tz_+04:00c = Moscow, St. Petersburg, Volgograd
tz_+04:00d = Port Louis
tz_+04:00e = Tbilisi
tz_+04:00f = Yerevan
tz_+04:30 = Kabul
tz_+05:00 = Islamabad, Karachi
tz_+05:00b = Tashkent
tz_+05:30 = Chennai, Kolkata, Mumbai, New Delhi
tz_+05:30b = Sri Jayawardenepura
tz_+05:45 = Kathmandu
tz_+06:00 = Astana
tz_+06:00b = Dhaka
tz_+06:00c = Ekaterinburg
tz_+06:30 = Yangon \(Rangoon\)
tz_+07:00 = Bangkok, Hanoi, Jakarta
tz_+07:00b = Novosibirsk
tz_+08:00 = Beijing, Chongqing, Hong Kong, Urumqi
tz_+08:00b = Krasnoyarsk
tz_+08:00c = Kuala Lumpur, Singapore
tz_+08:00d = Perth
tz_+08:00e = Taipei
tz_+08:00f = Ulaanbaatar
tz_+09:00 = Irkutsk
tz_+09:00b = Osaka, Sapporo, Tokyo
tz_+09:00c = Seoul
tz_+09:30 = Adelaide
tz_+09:30b = Darwin
tz_+10:00 = Brisbane
tz_+10:00b = Canberra, Melbourne, Sydney
tz_+10:00c = Guam, Port Moresby
tz_+10:00d = Hobart
tz_+10:00e = Yakutsk
tz_+11:00 = Solomon Is., New Caledonia
tz_+11:00b = Vladivostok
tz_+12:00 = Auckland, Wellington
tz_+12:00b = Coordinated Universal Time+12
tz_+12:00c = Fiji
tz_+12:00d = Magadan
tz_+13:00 = Nuku'alofa
tz_+13:00b = Samoa

640
winixd/locale/pl Normal file
View File

@@ -0,0 +1,640 @@
winix_locale_id = "1"
locale_name = "polski"
language = pl
charset = UTF-8
logged_as = zalogowany jako
logged_as_long = Aktualnie jesteś zalogowany jako
display_guest_name = gość
unknown = nie znany
syntax_error_in_line = Błąd składni w linii:
this_ip_is_banned_until = Przepraszamy ale twój adres IP jest zablokowany aż do:
account_not_activated = To konto nie jest jeszcze aktywowane
account_suspended = To konto jest tymczasowo zablokowane
account_banned = To konto zostało wyłączone
account_activated = Twoje konto zostało aktywowane
incorrect_activation_code = Nieprawidłowy kod aktywacyjny
account_already_activated = To konto jest już aktywowane
account_cannot_be_activated = To konto nie może być aktywowane, proszę skontaktować się z administratorem
account_email_sent = Wysłaliśmy Tobie email z linkiem aktywacyjnym
export_header = Export
export_transer_file_info = Wciśnij przycisk Export aby wysłać ten plik na zewnętrzny serwer ftp
export_transer_dir_info = Wciśnij przycisk Export aby wysłać podany katalog na zewnętrzny serwer ftp
export_checkbox_static_file_too = "Wyślij także pliki statyczne (zdjęcia itp.)"
code_expired = Ten kod stracił już swoją ważność
password_cannot_be_changed = Niestety nie możemy zmienić hasła dla tego konta, proszę skontaktować się z administratorem
incorrect_change_password_code = Nieprawidłowy kod do zmiany hasła
service_unavailable = Przepraszamy, serwis tymczasowo niedostępny
email_sent_to = Wiadomość została wysłana do:
logout = wyloguj
remember_me = Zapamiętaj mnie
home_page = Strona główna
button_login = Loguj
load_avg = średnie obciążenie
req_per_sec = wywołań na sekundę
added_by = Dodane przez
last_modified = ostatnio modyfikowany
by = przez
error_404 = Błąd 404
error_404_msg = Przykro nam ale podanej strony nie ma w naszym serwisie.
internal_error = Błąd wewnętrzny, po więcej szczegółów sprawdź dziennik systemowy
was_errors = Przepraszamy ale wystąpiły problemy z wykonaniem tej operacji.
error_code = Kod błędu
access_denied = Brak dostępu
access_denied_msg = Przykro nam ale nie masz dostępu do tej części serwisu.
download = Ściągnij plik
cat_image_url = Adres obrazka
cat_image_thumb_url = Adres miniatury
cat_file_url = Adres pliku
create_thread_header = Załóż wątek
form_thread_legend = Wypełnij wszystkie pozycje formularza
button_thread_submit = Załóż wątek
url = Url
suggested_url = Sugerowany url
short_url = Krótki url
title = Tytuł
nick = Nick
change = Zmień
edit = Edytuj
add = Dodaj
move = Przenieś
copy = Kopiuj
user = Użytkownik
group = Grupa
permissions = Uprawnienia
yes = Tak
no = Nie
add_page = Dodaj stronę
edit_page = Edytuj stronę
rebus_how_is_it = Rebus: Ile to jest
edit_ticket_header = Edytuj zgłoszenie
create_ticket_header = Nowe zgłoszenie
form_ticket_type = Rodzaj zgłoszenia
form_ticket_status = Status
form_ticket_priority = Priorytet
form_ticket_category = Kategoria
form_ticket_expected = Oczekiwany w
form_ticket_progress = "Postęp prac (0-100)"
form_ticket_create_submit = Załóż zgłoszenie
form_ticket_edit_submit = Edytuj zgłoszenie
env_header = Zmienne środowiskowe
form_env_legend = Formularz zmiany zmiennych środowiskowych dla użytkownika
env_change_env_for_user = Zmień zmienne środowiskowe dla użytkownika
env_change_admin_env_for_user = Zmień zmienne środowiskowe administracyjne dla użytkownika
env_change_user = Zmień użytkownika
default_header = Domyślna pozycja w katalogu
default_make_redirect = Wykonaj przekierowanie
form_default_legend = Formularz zmiany pozycji domyślnej
ln_header = Link
ln_info = Stwórz link w katalogu
ln_to = Link wskazujący na
ln_hardlink = hard link
ln_symlink = link symboliczny
ln_make_redirect = "Wykonaj przekierowanie (jedynie dla linków symbolicznych)"
form_ln_legend = Formularz zmiany linku
form_emacs_content_cms = Zawartość:
form_emacs_content_thread = Post:
form_emacs_content_ticket = Opis:
form_emacs_content_type = Rodzaj wiadomości:
form_emacs_content_type_text = text
form_emacs_content_type_formatted_text = sformatowany text
form_emacs_content_type_html = html
form_emacs_content_type_bbcode = bbcode
form_emacs_content_type_raw = surowa postać
last_header = Ostatnio logowani użytkownicy
last_tab_login = Login
last_tab_ip = Adres IP
last_tab_login_date = Czas zalogowania
last_tab_logout_date = Czas wylogowania
last_none = Nie ma dostępnych żadnych informacji.
ls_header = Zawartość katalogu
ls_pictures_in_dir = Obrazy w katalogu
ls_no_picture = W tym katalogu nie ma żadnego obrazu
ipban_header = Lista zbanowanych adresów IP
ipban_col_id = L.p.
ipban_col_ip_address = Adres IP
ipban_col_login_failures = Nieprawidłowe logowania
ipban_col_broken_cookie = Popsute ciastka
ipban_session_hijacking = Podszywanie pod inną sesje
ipban_no_session_cookie = Brak ciastka sesyjnego
ipban_col_login_allowed = Możliwe logowanie
ipban_col_ban_level = Rodzaj banu
ipban_col_active_flag = Flaga active
ipban_col_last_used = Ostatnio używany
ipban_col_expires = Wygasa
ipban_col_remove = Usuń
ipban_loggin_allowed = tak
ipban_loggin_not_allowed = nie
ipban_has_active_flag = tak
ipban_remove_ip = usuń
ipban_remove_all_ip = Usuń wszystkie adresy IP z listy
ipban_ban_list_empty = W tej chwili nie ma żadnych zbanowanych adresów IP.
ipban_your_ip_is_banned = Twój adres IP jest zablokowany aż do:
meta_header = Meta
meta_admin_header = Admin meta
man_header = Man
man_winix_funcions = Funkcje systemu winix
man_ezc_functions = Funkcje szablonów EZC
mkdir_header = Stwórz katalog
mkdir_form_legend = Wypełnij wszystkie pozycje formularza
html_lang_attr_value = "pl"
# current limitation: winix is not allowed to convert polish capital letters to lower case
# so we need to give both versions (small and capital letters)
language_orphans = ( "(np.", "a", "al.", "ale", "aż", "aŻ", "bo", "bp", "by", "co", "cz.", "czy", "dn.",
"doc.", "dr", "dyr.", "dz.", "do", "ds.", "fot.", "go", "godz.", "i",
"ich", "im.", "inż.", "inŻ.", "iż", "iŻ", "ja", "je", "jej", "jest", "już", "juŻ", "ją",
"jĄ", "ks.", "ku", "li", "m.in.", "mgr", "mi", "na", "nie", "np.", "nr",
"o", "od", "os.", "ów", "Ów", "po", "prof.", "s.", "są", "sĄ", "ta",
"to", "tu", "tą", "tĄ", "tel.", "tę", "tĘ", "u", "ul.", "w", "we", "wg",
"woj.", "wy", "z", "za", "ze", "że", "Że" )
# orphans for SK i CZ (winix for those languages are not translated yet)
# ("a", "i", "k", "o", "s", "u", "v", "z")
passwd_header = Zmień swoje hasło
passwd_login = Wybierz użytkownika
passwd_current_password = Podaj obecne hasło
passwd_new_password = Podaj nowe hasło
passwd_confirm_new_password = Potwierdź nowe hasło
passwd_submit = Zmień
passwd_err_bad_current_password = Podałeś nieprawidłowe bieżące hasło.
passwd_password_changed = Hasło zostało zmienione
priv_header = Zmień uprawnienia dostępu
priv_form_legend = Uprawnienia
priv_change_in_dir = Zmień hurtowo uprawnienia w katalogu
priv_for_all_files = Dla wszystkich plików na
priv_for_all_dirs = Dla wszystkich katalogów na
priv_change_all = Zmień także w podkatalogach
priv_change_current_dir = Zmień także sam katalog bieżący
pw_header = Użytkownicy
pw_table_no = L.p.
pw_table_login = Login
pw_table_is_root = Root
pw_table_is_active = Aktywny
pw_table_is_suspended = Wstrzymany
pw_table_is_banned = Zbanowany
pw_table_yes = tak
pw_table_no = nie
pw_password_changed = Twoje hasło zostało zmienione
reload_header = Przeładuj
reload_select = Wybierz pozycję
reload_templates = szablony html
reload_tickets = pliki konfiguracyjne ticketów
reload_group = pliki konfiguracyjne grup
reload_export = "katalogi exportu (FTP)"
reload_menu = cache pluginu 'menu'
rm_header = Usuń
rm_form_legend = Formularz usuwania
rm_file = Czy napewno usunąć plik
rm_symlink = Czy napewno usunąć symlink
rm_dir = Czy napewno usunąć katalog
rm_only_content = Usuń jedynie zawartość katalogu
rm_root = Nie możesz skasować katalogu głównego, możesz jedynie usunąć jego zawartość
rm_submit = Usuń
rm_cannot_create_static_path = Nie mogę utworzyć ścieżki do pliku statycznego
rm_cannot_remove_static_file = Nie mogę usunąć pliku statycznego
rm_permission_denied_to = Brak dostępu do usunięcia
rm_directory_not_empty = katalog nie jest pusty
rm_use_r_option = To jest katalog, aby go usunąć musisz użyć parametru 'r'
rm_cannot_remove_root_dir = Nie możesz usunąć głównego katalogu
rm_content_use_r_option = Zawartość katalogu może zostać usunięta tylko z użyciem parametru 'r'
rmuser_header = Usuń użytkownika
rmuser_legend = Formularz usunięcia użytkownika
rmuser_selectuser = Wybierz użytkownika
rmuser_submit = Usuń
rmuser_removecurrent = Naprawdę chcesz usunąć swoje konto z naszego serwisu?
thread_create_new = Załóż nowy wątek
thread_tab_title = Tytuł wątku
thread_tab_author = Autor
thread_tab_replies = Odp.
thread_tab_last_post = Ostatni post
thread_reply_in_this_thread = Odpowiedz w tym wątku
thread_header_reply = Odpowiedz w wątku
ticket_progress_image_path = ticket_progress
ticket_create_new = Załóż nowe zgłoszenie
tickets_header_name = Zgłoszenie
ticket_info_type = Rodzaj zgłoszenia
ticket_info_status = Status
ticket_info_priority = Piorytet
ticket_info_category = Kategoria
ticket_info_expected = Oczekiwany w
ticket_info_progress = Postęp prac
ticket_reply_in_this_thread = Odpowiedz w tym wątku
ticket_value_not_set = to zgłoszenie nie ma jeszcze ustawionej tej wartości
ticket_delete_file = Usuń
template_header = Szablon
template_info_file = Bieżący szablon dla tego pliku
template_info_dir = Bieżący szablon dla tego katalogu
template_from_mount_point = jest brany z punktu montowania
template_form_legend = Formularz zmiany szablonu
template_form_info = Wybierz nowy szablon
template_form_from_mount_point = z punktu montowania
upload_header = Menedżer plików
upload_button_add_files = Dodaj pliki...
upload_button_start = Wysyłaj
upload_button_cancel = Anuluj
upload_button_start_upload = Wysyłaj
upload_button_cancel_upload = Przerwij wysyłanie
upload_button_delete = Usuń
upload_button_processing = Wysyłanie...
upload_button_download = Ściągnij
upload_error = Błąd:
who_header = Lista sesji
who_tab_index = L.p.
who_tab_start = Start
who_tab_last_active = Ostatnio aktywny
who_none = Nie ma żadnych dostępnych sesji.
admin_options = Inne opcje administracyjne
admin_ls = "Pokaż zawartość katalogu (ls)"
admin_mkdir = "Dodaj katalog (mkdir)"
admin_emacs_add = "Dodaj stronę (emacs)"
admin_emacs_edit = "Edytuj stronę (emacs)"
admin_ckeditor_add = "Dodaj stronę (ckeditor)"
admin_ckeditor_edit = "Edytuj stronę (ckeditor)"
admin_nicedit_add = "Dodaj stronę (nicedit)"
admin_nicedit_edit = "Edytuj stronę (nicedit)"
admin_tinymce_add = "Dodaj stronę (tinymce)"
admin_tinymce_edit = "Edytuj stronę (tinymce)"
admin_rm = "Usuń stronę (rm)"
admin_upload = "Menedżer plików (upload)"
admin_sort = "Sortuj elementy (sort)"
locale_header = Ustawienia językowe
locale_your_locale = Bieżący język
locale_has_incorrect_id = Nie masz prawidłowo ustawionego bieżącego języka
locale_form_legend = Formularz ustawienia języka
locale_select = Wybierz język
login_header = Logowanie
login_cannot_login_from_this_ip = Przepraszamy ale nie możesz się zalogować z tego adresu IP.
#Przepraszamy ale z twojego adresu IP było zbyt wiele prób nieprawidłowego logowania.
login_cannot_login_available = Ponowne logowanie będzie możliwe dopiero od:
uptime_header = Czas pracy systemu
uptime_current_time = aktualna godzina
uptime_up = system uruchomiony przez
uptime_how_many_sessions = wszystkich sesji
uptime_users_logged = zalogowanych użytkowników
uptime_days = dni
adduser_header_add = Dodaj użytkownika
adduser_header_register = Zarejestruj się
adduser_form_legend = Formularz rejestracji nowego użytkownika
adduser_login = Login
adduser_password = Hasło
adduser_confirm_password = Potwierdź hasło
adduser_email = Możesz także podać swój email. Jeśli zapomnisz kiedyś hasła to hasło zostanie wysłane na podany email
adduser_need_email = Wymagamy abyś podał nam swój adres email,
adduser_need_email2 = na ten adres wyślemy wiadomość z linkiem aktywacyjnym
adduser_submit = Dodaj użytkownika
register_user_submit = Rejestruj
adduser_err_login_empty = Proszę podać login.
adduser_err_login_incorrect_chars = Niestety ale podany login składa się z nieprawidłowych znaków!
adduser_err_user_exists = Przykro nam, podany identyfikator użytkownika jest już zajęty, proszę podać inny login!
adduser_err_passwords_different = Podane hasła różnią się od siebie!
adduser_err_password_too_small = "Zbyt krótkie hasło (Musi być conajmniej"
adduser_err_password_too_small2 = "znaków)"
adduser_err_login_too_big = Login nie może być większy niż
adduser_err_login_too_big2 = znaków
adduser_err_password_too_big = Hasło nie może być większe niż
adduser_err_password_too_big2 = znaków
adduser_err_email_too_big = Adres email nie może być większy niż
adduser_err_email_too_big2 = znaków
adduser_auto_activate = Automatically activate this account
adduser_err_email_incorrect = Podany email jest nieprawidłowy
mount_header = Punkty montowania
mount_type = Rodzaj punktu montowania
mount_dir = Katalog
mount_fs = System plików
mount_parameters = Parametry
mount_table = Tabela wszystkich punktów montowania
mount_current = Bieżący punkt montowania
mv_header = Przenieś
mv_form_legend = Formularz zmiany
mv_page = Przenieś stronę
mv_dir = Przenieś katalog
mv_only_content = Przenieś tylko zawartość katalogu
mv_cant_move_root_dir = Katalog główny nie może być przeniesiony
mv_permission_denied_to = Brak dostępu do
mv_incorrect_path = Nieprawidłowa ścieżka
mv_dir_can_be_moved_to_dir = Katalog może zostać przeniesiony tylko do innego katalogu
mv_dir_content_can_be_moved_to_dir = Zawartość katalogu może zostać przeniesiona tylko do innego katalogu
mv_cannot_move_to_inside = Nie mogę przenieść katalogu do jego środka
mv_incorrect_dst_path = Nieprawidłowa ścieżka docelowa
mv_incorrect_dir = Nieprawidłowy katalog
timezone_header = Strefa czasowa
timezone_form_legend = Formularz wyboru strefy czasowej
timezone_select = Wybierz swoją strefę czasową
timezone_your_zone = Twoja aktualna strefa czasowa to
timezone_has_incorrect_id = Nie masz prawidłowo ustawionej strefy czasowej
cp_header = Kopiuj
cp_form_legend = Formularz kopiowania
cp_page = Kopiuj stronę
cp_dir = Kopiuj katalog
cp_only_content = Kopiuj tylko zawartość katalogu
cp_remove_defaults = Usuń atrybut 'default' z kopiowanych katalogów
cp_preserve_attr = Zachowaj atrybuty: użytkownik, grupa, czas
cp_follow_symlinks = Podążaj za linkami symbolicznymi
slog_warning = Ostrzeżenie
slog_error = Błąd
slog_info = Informacja
unknown_filesystem = Nieznany system plików
no_such_dir = Nie ma takiego katalogu
unknown_mount_type = Nieprawidłowy rodzaj punktu montowania
unknown_mount_param = Nieprawidłowy parametr dla punktu montowania
skipped = pominięte
skipped_static_mount = "Pominięto statyczny (static) punkt montowania"
mount_exists = Ten punkt montowania jest już zdefiniowany
slog_turn_over = Log sesji wyczyszczony w związku z przekroczeniem wielkości
sort_header = Sortuj
sort_current_sortindex = Bieżący indeks sortowania
sort_info_multi = Ustaw kolejność elementów przeciągając je przy pomocy myszki.
sort_item_subject = Tytuł:
stat_header = Stat
stat_item_type = typ
stat_item_type_file = plik
stat_item_type_dir = katalog
stat_item_type_static_file = plik statyczny
stat_item_inode = inode
stat_item_user = użytkownik
stat_item_group = grupa
stat_item_privileges = uprawnienia
stat_item_date_creation = data stworzenia
stat_item_date_modification = data modyfikacji
stat_item_template = template
stat_template_from_mount_point = z punktu montowania
subject_header = Zmień tytuł
uname_header = Nazwa systemu
uname_available_plugins = Dostępne pluginy
uname_plugin_unknown = Plugin nie ustawił swojej nazwy
# notifications
# subjects should be coded in a special way: http://tools.ietf.org/html/rfc2047
# we don't use it at the moment
notify_new = Coś nowego
notify_change = Zmiany
notify_reply = Odpowiedź
notify_confirm_account = Potwierdź swoje konto
notify_reset_password = Ustaw swoje hasło
notify_from_name = winix notifications
notify_from_email = dontreply@winix.org
notify_content_type = text/plain; charset="UTF-8"
notify_header = Witamy
notify_msg1 = Chcielibyśmy powiadomić że właśnie
notify_msg2 = ktoś rozpoczął nowy wątek:
notify_msg2b = ktoś założył nowy ticket:
notify_msg3 = ktoś odpowiedział w wątku:
notify_msg4 = ktoś zmienił swoją odpowiedź w wątku:
notify_msg5 = czyjaś odpowiedź została skasowana z wątku:
notify_msg6 = pojawiła się nowa pozycja do poczytania:
notify_msg7 = zmieniono coś na:
notify_msg7b = zmieniony został ticket:
notify_msg8 = skasowano następującą pozycję:
notify_msg9 = Życzymy miłego dnia i zapraszamy do lektury.
notify_msg9b = ""
notify_msg10 = Otrzymujesz ten email dlatego że jesteś w trakcie procesu zakładania konta w naszym serwisie.
notify_msg11 = W celu aktywowania konta prosimy o odwiedzenie poniższego linku:
notify_msg12 = Jeśli jednak otrzymałeś ten email przez przypadek prosimy o zignorowanie go.
notify_msg13 = Otrzymujesz ten email dlatego że poprosiłeś o ponowne ustawienie swojego hasła w naszym serwisie.
notify_msg14 = W celu ustawienia nowego hasła prosimy o wejście na poniższą stronę:
notify_msg15 = Jeśli jednak nie prosiłeś o zmianę hasła to poprostu zignoruj ten email.
notify_footer1 = http://www.winix.org
notify_footer2 = Ta wiadomość została wysłana automatycznie - prosimy na nią nie odpowiadać.
notify_footer3 = Jeśli nie chcesz dostawać więcej takich wiadomości możesz je wyłączyć
notify_footer4 = w swoim panelu użytkownika.
# those errors are taken automatically by [winix_err_msg_from_locales]
winix_err_3 = Nieprawidłowy katalog.
winix_err_18 = Jesteś podejrzany jako spamer, nie możesz nic wysłać do czasu zalogowania się!
winix_err_19 = Proszę rozwiązać rebus!
winix_err_25 = Podane hasła różnią się od siebie!
winix_err_26 = Hasło powinno składać się z co najmniej pięciu znaków.
winix_err_27 = Przykro nam, podany identyfikator użytkownika jest już zajęty, proszę podać inny login!
winix_err_28 = Proszę podać login.
winix_err_29 = Punkty montowania różnią się od siebie.
tz_-12:00 = Międzynarodowa linia zmiany daty - Zachód
tz_-11:00 = Uniwersalny czas koordynowany - 11
tz_-10:00 = Hawaje
tz_-09:00 = Alaska
tz_-08:00 = Kalifornia Dolna
tz_-08:00b = Czas pacyficzny \(Stany Zjednoczone i Kanada\)
tz_-07:00 = Arizona
tz_-07:00b = Chihuahua, La Paz, Mazatlan
tz_-07:00c = Stany Zjednoczone i Kanada \(czas górski\)
tz_-06:00 = Ameryka Środkowa
tz_-06:00b = Stany Zjednoczone i Kanada \(czas środkowy\)
tz_-06:00c = Guadalajara, Mexico City, Monterrey
tz_-06:00d = Saskatchewan
tz_-05:00 = Bogota, Lima, Quito
tz_-05:00b = Stany Zjednoczone i Kanada \(czas wschodni\)
tz_-05:00c = Indiana \(Wschód\)
tz_-04:30 = Caracas
tz_-04:00 = Asuncion
tz_-04:00b = Czas atlantycki \(Kanada\)
tz_-04:00c = Cuiaba
tz_-04:00d = Georgetown, La Paz, Manaus, San Juan
tz_-04:00e = Santiago
tz_-03:30 = Nowa Fundlandia
tz_-03:00 = Brazylia
tz_-03:00b = Buenos Aires
tz_-03:00c = Kajenna, Fortaleza
tz_-03:00d = Grenlandia
tz_-03:00e = Montevideo
tz_-03:00f = Salwador
tz_-02:00 = Uniwersalny czas koordynowany - 02
tz_-02:00b = Środkowy Atlantyk
tz_-01:00 = Azory
tz_-01:00b = Wyspy Zielonego Przylądka
tz_00:00 = Casablanca
tz_00:00b = Czas uniwersalny Greenwich
tz_00:00c = Dublin, Edynburg, Lizbona, Londyn
tz_00:00d = Monrowia, Rejklawik
tz_+01:00 = Amsterdam, Berlin, Berno, Rzym, Sztokholm, Wiedeń
tz_+01:00b = Belgrad, Bratysława, Budapeszt, Ljubljana, Praga
tz_+01:00c = Bruksela, Kopenhaga, Madryt, Paryż
tz_+01:00d = Sarajewo, Skopie, Warszawa, Zagrzeb
tz_+01:00e = Afryka Środkowozachodnia
tz_+01:00f = Windhoek
tz_+02:00 = Amman
tz_+02:00b = Ateny, Bukareszt
tz_+02:00c = Bejrut
tz_+02:00d = Kair
tz_+02:00e = Damaszek
tz_+02:00f = Harare, Pretoria
tz_+02:00g = Helsinki, Kijów, Ryga, Sofia, Talin, Wilno
tz_+02:00h = Stambuł
tz_+02:00i = Jerozolima
tz_+02:00j = Nikozja
tz_+03:00 = Bagdad
tz_+03:00b = Kaliningrad, Mińsk
tz_+03:00c = Kuwejt, Riad
tz_+03:00d = Nairobi
tz_+03:30 = Teheran
tz_+04:00 = Abu Dabi, Maskat
tz_+04:00b = Baku
tz_+04:00c = Moskwa, Sankt Petersburg, Wołgograd
tz_+04:00d = Port Louis
tz_+04:00e = Tbilisi
tz_+04:00f = Erywań
tz_+04:30 = Kabul
tz_+05:00 = Islamabad, Karaczi
tz_+05:00b = Taszkient
tz_+05:30 = Chennai, Kalkuta, Bombaj, Nowe Delhi
tz_+05:30b = Sri Jayawardenepura
tz_+05:45 = Katmandu
tz_+06:00 = Astana
tz_+06:00b = Dhaka
tz_+06:00c = Yekaterynburg
tz_+06:30 = Rangun
tz_+07:00 = Bangkok, Hanoi, Dżakarta
tz_+07:00b = Nowosybirsk
tz_+08:00 = Pekin, Chongqing, Hongkong, Urumqi
tz_+08:00b = Krasnojarsk
tz_+08:00c = Kuala Lumpur, Singapur
tz_+08:00d = Perth
tz_+08:00e = Tajpej
tz_+08:00f = Ułan Bator
tz_+09:00 = Irkuck
tz_+09:00b = Osaka, Sapporo, Tokio
tz_+09:00c = Seoul
tz_+09:30 = Adelajda
tz_+09:30b = Darwin
tz_+10:00 = Brisbane
tz_+10:00b = Canberra, Melbourne, Sydney
tz_+10:00c = Guam, Port Moresby
tz_+10:00d = Hobart
tz_+10:00e = Jakuck
tz_+11:00 = Wyspy Salomona, Nowa Kaledonia
tz_+11:00b = Władywostok
tz_+12:00 = Auckland, Wellington
tz_+12:00b = Uniwersalny czas koordynowany + 12
tz_+12:00c = Fidżi
tz_+12:00d = Magadan
tz_+13:00 = Nuku'alofa
tz_+13:00b = Samoa

21
winixd/locale/substitute Normal file
View File

@@ -0,0 +1,21 @@
# these tables are used to change url characters
# one character from 'url_original' table at a specific position
# will be translated to one character from 'url_changeto' at the same position
url_original = "ąćęłńóśźżĄĆĘŁŃÓŚŹŻ"
url_changeto = "acelnoszzacelnoszz"
# these tables are used to change from small to capital letters
# ASCII characters (a-z, A-Z) are tested beforehand
# so these tables are not used for such characters
smallleters = "ąćęłńóśźż"
capitalics = "ĄĆĘŁŃÓŚŹŻ"
# ASCII characters (a-z, A-Z) are tested beforehand
# so this table are not used for such characters
sort = ( "ąa1", "ćc1", "ęe1", "łl1", "ńn1", "óo1", "śs1", "źz1", "żz2",
"ĄA1", "ĆC1", "ĘE1", "ŁL1", "ŃN1", "ÓO1", "ŚS1", "ŹZ1", "ŻZ2" )

19
winixd/main/Makefile Normal file
View File

@@ -0,0 +1,19 @@
include Makefile.o.dep
all: $(o)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) $<
depend:
makedepend -Y. $(CXXWINIXINCLUDEFLAGS) -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
clean:
rm -f *.o
include Makefile.dep

88
winixd/main/Makefile.dep Normal file
View File

@@ -0,0 +1,88 @@
# DO NOT DELETE
main.o: ../../winix/core/log.h ../../winix/core/textstream.h
main.o: ../../winix/core/misc.h ../../winix/core/item.h
main.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
main.o: ../../pikotools/date/date.h ../../winix/core/requesttypes.h
main.o: ../../pikotools/textstream/textstream.h
main.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
main.o: ../../pikotools/membuffer/membuffer.h
main.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
main.o: ../../winix/core/winix_const.h ../../winix/core/logmanipulators.h
main.o: ../../winix/core/slog.h ../../winix/core/cur.h
main.o: ../../winix/core/request.h ../../winix/core/error.h
main.o: ../../winix/core/config.h ../../pikotools/space/spaceparser.h
main.o: ../../pikotools/space/space.h ../../winix/core/htmlfilter.h
main.o: ../../winix/templates/htmltextstream.h ../../winix/core/textstream.h
main.o: ../../pikotools/space/spacetojson.h ../../ezc/src/outstreams.h
main.o: ../../winix/core/session.h ../../winix/core/user.h
main.o: ../../winix/core/plugindata.h ../../winix/core/rebus.h
main.o: ../../winix/core/ipban.h ../../winix/core/mount.h
main.o: ../../winix/templates/locale.h ../../winix/core/slog.h
main.o: ../../winix/core/app.h ../../winix/core/system.h
main.o: ../../winix/core/job.h ../../winix/core/basethread.h
main.o: ../../winix/core/synchro.h ../../winix/core/dirs.h
main.o: ../../winix/core/dircontainer.h ../../winix/db/db.h
main.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
main.o: ../../winix/db/dbtextstream.h ../../winix/core/error.h
main.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
main.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
main.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
main.o: ../../winix/core/ugcontainer.h ../../winix/core/log.h
main.o: ../../winix/notify/notify.h ../../winix/notify/notifypool.h
main.o: ../../winix/templates/patterns.h ../../winix/templates/locale.h
main.o: ../../winix/templates/localefilter.h ../../ezc/src/ezc.h
main.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
main.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
main.o: ../../ezc/src/funinfo.h ../../ezc/src/objects.h
main.o: ../../ezc/src/pattern.h ../../ezc/src/patternparser.h
main.o: ../../winix/notify/notifythread.h ../../winix/core/basethread.h
main.o: ../../winix/notify/templatesnotify.h ../../winix/core/config.h
main.o: ../../winix/core/users.h ../../winix/core/ugcontainer.h
main.o: ../../winix/core/lastcontainer.h ../../winix/core/mounts.h
main.o: ../../winix/core/mountparser.h ../../winix/core/crypt.h
main.o: ../../winix/core/run.h ../../winix/core/users.h
main.o: ../../winix/core/groups.h ../../winix/core/group.h
main.o: ../../winix/core/loadavg.h ../../winix/core/image.h
main.o: ../../winix/core/threadmanager.h ../../winix/core/timezones.h
main.o: ../../winix/core/timezone.h ../../winix/core/sessionmanager.h
main.o: ../../winix/core/sessioncontainer.h ../../winix/core/ipbancontainer.h
main.o: ../../winix/core/sessionidmanager.h ../../tito/src/base64.h
main.o: ../../tito/src/aes.h ../../winix/functions/functions.h
main.o: ../../winix/functions/functionbase.h ../../winix/core/request.h
main.o: ../../winix/core/system.h ../../winix/core/synchro.h
main.o: ../../winix/functions/functionparser.h ../../winix/core/cur.h
main.o: ../../winix/functions/account.h ../../winix/functions/adduser.h
main.o: ../../winix/functions/cat.h ../../winix/functions/chmod.h
main.o: ../../winix/functions/privchanger.h ../../winix/functions/chown.h
main.o: ../../winix/functions/ckeditor.h ../../winix/functions/cp.h
main.o: ../../winix/functions/default.h ../../winix/functions/download.h
main.o: ../../winix/functions/emacs.h ../../winix/functions/env.h
main.o: ../../winix/functions/imgcrop.h ../../winix/functions/last.h
main.o: ../../winix/functions/login.h ../../winix/functions/logout.h
main.o: ../../winix/functions/ln.h ../../winix/functions/ls.h
main.o: ../../winix/functions/man.h ../../winix/functions/meta.h
main.o: ../../winix/functions/mkdir.h ../../winix/functions/mv.h
main.o: ../../winix/functions/nicedit.h ../../winix/functions/node.h
main.o: ../../winix/functions/passwd.h ../../winix/functions/priv.h
main.o: ../../winix/functions/pw.h ../../winix/functions/reload.h
main.o: ../../winix/functions/rm.h ../../winix/functions/rmuser.h
main.o: ../../winix/functions/sort.h ../../winix/functions/specialdefault.h
main.o: ../../winix/functions/stat.h ../../winix/functions/subject.h
main.o: ../../winix/functions/template.h ../../winix/functions/tinymce.h
main.o: ../../winix/functions/uname.h ../../winix/functions/upload.h
main.o: ../../winix/functions/uptime.h ../../winix/functions/who.h
main.o: ../../winix/functions/vim.h ../../winix/core/htmlfilter.h
main.o: ../../winix/templates/templates.h
main.o: ../../winix/templates/patterncacher.h
main.o: ../../winix/templates/indexpatterns.h
main.o: ../../winix/templates/patterns.h
main.o: ../../winix/templates/changepatterns.h
main.o: ../../winix/templates/htmltextstream.h
main.o: ../../winix/core/sessionmanager.h ../../winix/core/compress.h
main.o: ../../winix/core/postparser.h ../../winix/core/httpsimpleparser.h
main.o: ../../winix/core/plugin.h ../../winix/core/pluginmsg.h
main.o: ../../winix/core/cookieparser.h ../../winix/core/postmultiparser.h
main.o: ../../winix/core/acceptencodingparser.h
main.o: ../../winix/core/acceptbaseparser.h ../../winix/core/plugin.h
main.o: ../../winix/core/version.h

View File

@@ -0,0 +1 @@
o = main.o

250
winixd/main/main.cpp Normal file
View File

@@ -0,0 +1,250 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <fstream>
#include <sys/param.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include "core/log.h"
#include "core/slog.h"
#include "core/app.h"
#include "core/plugin.h"
#include "core/version.h"
#include "utf8/utf8.h"
namespace Winix
{
Log log;
Log nlog; // notify log (used by a notification thread)
SLog slog; // session logger
Plugin plugin;
/*
application object
*/
App app;
void print_syntax()
{
std::cout << "Syntax:" << std::endl;
std::cout << " winix config_file" << std::endl;
}
void CreateNewDescriptor(int des_dst, int flags)
{
int descriptor;
descriptor = open("/dev/null", flags | O_NOCTTY);
if( descriptor != -1 )
{
dup2(descriptor, des_dst);
if( descriptor != des_dst )
close(descriptor);
}
}
void CloseDescriptors()
{
close(0);
close(1);
close(2);
app.stdout_is_closed = true;
CreateNewDescriptor(0, O_RDONLY);
CreateNewDescriptor(1, O_WRONLY);
CreateNewDescriptor(2, O_WRONLY);
}
void LogInfo(LogManipulators log_level, const char * msg, bool put_version, const char * msg2)
{
log << log_level;
log.PrintDate(PT::Date(std::time(0)), app.config.log_time_zone_id);
log << ' ' << msg;
if( put_version )
{
log << ' ' << WINIX_VER_MAJOR
<< '.' << WINIX_VER_MINOR
<< '.' << WINIX_VER_REVISION;
}
log << ' ' << msg2 << logend;
}
void SavePidFile()
{
if( !app.config.pid_file.empty() )
{
std::string file_name;
PT::WideToUTF8(app.config.pid_file, file_name);
std::ofstream file(file_name);
if( !file )
{
log << log1 << "I cannot save the pid to a file: " << app.config.pid_file << logend;
}
else
{
file << getpid() << "\n";
file.close();
log << log3 << "Process pid saved to: " << app.config.pid_file << logend;
}
}
}
void RemovePidFile()
{
if( !app.config.pid_file.empty() )
{
std::string file_name;
PT::WideToUTF8(app.config.pid_file, file_name);
unlink(file_name.c_str());
}
}
} // namespace Winix
int main(int argv, char ** argc)
{
using Winix::app;
std::srand(std::time(0));
if( argv != 2 )
{
Winix::print_syntax();
return 1;
}
app.system.system_start = time(0);
if( !PT::UTF8ToWide(argc[1], app.config.config_file) )
{
std::wcout << "An incorrect UTF-8 path of the config file" << std::endl;
return 6;
}
if( !app.config.ReadConfig(true, false) ) /* errors to stdout, stdout in not closed */
return 2;
if( app.stdout_is_closed || app.config.demonize )
app.config.log_stdout = false;
if( !app.config.log_stdout )
Winix::CloseDescriptors();
if( app.config.demonize && !app.Demonize() )
return 4;
Winix::log.SetTimeZones(&app.system.time_zones);
Winix::log.Init(app.config.log_level, app.config.log_save_each_line, app.config.log_file,
app.config.log_stdout, app.config.log_request);
Winix::nlog.Init(app.config.log_level, true, app.config.log_notify_file, false, 1);
Winix::LogInfo(Winix::log3, "booting Winix", true, "");
if( !app.InitFCGI() )
return 5;
if( !app.DropPrivileges() )
return 3;
app.LogUserGroups();
Winix::log << Winix::log3 << "base_url: " << app.config.base_url << Winix::logend;
Winix::SavePidFile();
// load plugins before loading sessions - session_manager.LoadSessions()
// because some of the plugins can init its own sessions dates
Winix::plugin.LoadPlugins(app.config.plugins_dir, app.config.plugin_file);
// app.Init() starts other threads as well (they will be waiting on the lock)
if( !app.Init() )
{
Winix::RemovePidFile();
return 1;
}
app.StartThreads();
// now we have more threads, we should use Lock() and Unlock()
// saving all starting logs
app.Lock();
Winix::LogInfo(Winix::log1, "Winix", true, "started");
Winix::log << Winix::logsave;
app.Unlock();
// main loop
app.Start();
app.Lock();
Winix::plugin.Call((Winix::Session*)0, WINIX_CLOSE);
app.Close();
// now all sessions are cleared
app.Unlock();
app.WaitForThreads();
// now all others threads are terminated
Winix::LogInfo(Winix::log1, "Winix", true, "stopped");
Winix::RemovePidFile();
return 0;
}

19
winixd/notify/Makefile Normal file
View File

@@ -0,0 +1,19 @@
include Makefile.o.dep
all: $(o)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) $<
depend:
makedepend -Y. $(CXXWINIXINCLUDEFLAGS) -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
clean:
rm -f *.o
include Makefile.dep

234
winixd/notify/Makefile.dep Normal file
View File

@@ -0,0 +1,234 @@
# DO NOT DELETE
notify.o: notify.h notifypool.h ../../winix/templates/locale.h
notify.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
notify.o: ../../pikotools/textstream/types.h
notify.o: ../../pikotools/textstream/textstream.h
notify.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
notify.o: ../../pikotools/convert/convert.h
notify.o: ../../pikotools/convert/inttostr.h
notify.o: ../../pikotools/membuffer/membuffer.h
notify.o: ../../pikotools/textstream/types.h ../../winix/templates/patterns.h
notify.o: ../../winix/templates/locale.h ../../winix/templates/localefilter.h
notify.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
notify.o: ../../ezc/src/blocks.h ../../ezc/src/item.h ../../ezc/src/cache.h
notify.o: ../../ezc/src/functions.h ../../pikotools/utf8/utf8.h
notify.o: ../../ezc/src/funinfo.h ../../ezc/src/objects.h
notify.o: ../../ezc/src/pattern.h ../../ezc/src/outstreams.h
notify.o: ../../ezc/src/patternparser.h ../../winix/templates/misc.h
notify.o: ../../winix/templates/htmltextstream.h
notify.o: ../../winix/core/textstream.h notifythread.h
notify.o: ../../winix/core/basethread.h ../../winix/core/synchro.h
notify.o: templatesnotify.h ../../winix/core/config.h
notify.o: ../../winix/core/htmlfilter.h ../../winix/core/users.h
notify.o: ../../winix/core/user.h ../../winix/core/ugcontainer.h
notify.o: ../../winix/core/log.h ../../winix/core/textstream.h
notify.o: ../../winix/core/logmanipulators.h ../../winix/core/slog.h
notify.o: ../../winix/core/cur.h ../../winix/core/request.h
notify.o: ../../winix/core/requesttypes.h ../../winix/core/error.h
notify.o: ../../winix/core/config.h ../../winix/templates/htmltextstream.h
notify.o: ../../pikotools/space/spacetojson.h ../../winix/core/session.h
notify.o: ../../winix/core/plugindata.h ../../winix/core/rebus.h
notify.o: ../../winix/core/ipban.h ../../winix/core/mount.h
notify.o: ../../winix/core/lastcontainer.h ../../winix/db/db.h
notify.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
notify.o: ../../winix/db/dbtextstream.h ../../winix/core/error.h
notify.o: ../../winix/db/dbitemquery.h ../../winix/core/item.h
notify.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
notify.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
notify.o: ../../winix/core/ugcontainer.h ../../winix/templates/templates.h
notify.o: ../../winix/templates/patterncacher.h
notify.o: ../../winix/templates/indexpatterns.h
notify.o: ../../winix/templates/patterns.h
notify.o: ../../winix/templates/changepatterns.h ../../winix/core/cur.h
notify.o: ../../winix/core/system.h ../../winix/core/job.h
notify.o: ../../winix/core/basethread.h ../../winix/core/dirs.h
notify.o: ../../winix/core/dircontainer.h ../../winix/notify/notify.h
notify.o: ../../winix/core/mounts.h ../../winix/core/mountparser.h
notify.o: ../../winix/core/crypt.h ../../winix/core/run.h
notify.o: ../../winix/core/users.h ../../winix/core/groups.h
notify.o: ../../winix/core/group.h ../../winix/core/loadavg.h
notify.o: ../../winix/core/image.h ../../winix/core/threadmanager.h
notify.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
notify.o: ../../winix/core/sessionmanager.h
notify.o: ../../winix/core/sessioncontainer.h
notify.o: ../../winix/core/ipbancontainer.h ../../winix/core/system.h
notify.o: ../../winix/core/sessionidmanager.h ../../tito/src/base64.h
notify.o: ../../tito/src/aes.h ../../winix/core/htmlfilter.h
notify.o: ../../winix/core/request.h ../../winix/core/dirs.h
notify.o: ../../winix/core/plugin.h ../../winix/core/pluginmsg.h
notify.o: ../../winix/core/sessionmanager.h ../../winix/functions/functions.h
notify.o: ../../winix/functions/functionbase.h ../../winix/core/synchro.h
notify.o: ../../winix/functions/functionparser.h
notify.o: ../../winix/functions/account.h ../../winix/functions/adduser.h
notify.o: ../../winix/functions/cat.h ../../winix/functions/chmod.h
notify.o: ../../winix/functions/privchanger.h ../../winix/functions/chown.h
notify.o: ../../winix/functions/ckeditor.h ../../winix/functions/cp.h
notify.o: ../../winix/functions/default.h ../../winix/functions/download.h
notify.o: ../../winix/functions/emacs.h ../../winix/functions/env.h
notify.o: ../../winix/functions/imgcrop.h ../../winix/functions/last.h
notify.o: ../../winix/functions/login.h ../../winix/functions/logout.h
notify.o: ../../winix/functions/ln.h ../../winix/functions/ls.h
notify.o: ../../winix/functions/man.h ../../winix/functions/meta.h
notify.o: ../../winix/functions/mkdir.h ../../winix/functions/mv.h
notify.o: ../../winix/functions/nicedit.h ../../winix/functions/node.h
notify.o: ../../winix/functions/passwd.h ../../winix/functions/priv.h
notify.o: ../../winix/functions/pw.h ../../winix/functions/reload.h
notify.o: ../../winix/functions/rm.h ../../winix/functions/rmuser.h
notify.o: ../../winix/functions/sort.h ../../winix/functions/specialdefault.h
notify.o: ../../winix/functions/stat.h ../../winix/functions/subject.h
notify.o: ../../winix/functions/template.h ../../winix/functions/tinymce.h
notify.o: ../../winix/functions/uname.h ../../winix/functions/upload.h
notify.o: ../../winix/functions/uptime.h ../../winix/functions/who.h
notify.o: ../../winix/functions/vim.h
notifypool.o: notifypool.h ../../winix/templates/locale.h
notifypool.o: ../../pikotools/space/spaceparser.h
notifypool.o: ../../pikotools/space/space.h
notifypool.o: ../../pikotools/textstream/types.h
notifypool.o: ../../pikotools/textstream/textstream.h
notifypool.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
notifypool.o: ../../pikotools/convert/convert.h
notifypool.o: ../../pikotools/convert/inttostr.h
notifypool.o: ../../pikotools/membuffer/membuffer.h
notifypool.o: ../../pikotools/textstream/types.h
notifythread.o: notifythread.h ../../winix/core/basethread.h
notifythread.o: ../../winix/core/synchro.h templatesnotify.h
notifythread.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
notifythread.o: ../../ezc/src/blocks.h ../../ezc/src/item.h
notifythread.o: ../../ezc/src/cache.h ../../ezc/src/functions.h
notifythread.o: ../../pikotools/utf8/utf8.h ../../ezc/src/funinfo.h
notifythread.o: ../../ezc/src/objects.h ../../ezc/src/pattern.h
notifythread.o: ../../ezc/src/outstreams.h ../../ezc/src/patternparser.h
notifythread.o: ../../winix/core/textstream.h ../../winix/templates/misc.h
notifythread.o: ../../winix/templates/localefilter.h
notifythread.o: ../../winix/templates/locale.h
notifythread.o: ../../winix/templates/htmltextstream.h
notifythread.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
notifythread.o: ../../pikotools/textstream/textstream.h
notifythread.o: ../../pikotools/convert/convert.h
notifythread.o: ../../pikotools/convert/inttostr.h
notifythread.o: ../../pikotools/membuffer/membuffer.h
notifythread.o: ../../pikotools/textstream/types.h notifypool.h
notifythread.o: ../../winix/templates/locale.h
notifythread.o: ../../pikotools/space/spaceparser.h
notifythread.o: ../../pikotools/space/space.h
notifythread.o: ../../pikotools/textstream/types.h ../../winix/core/config.h
notifythread.o: ../../winix/core/htmlfilter.h ../../winix/core/users.h
notifythread.o: ../../winix/core/user.h ../../winix/core/ugcontainer.h
notifythread.o: ../../winix/core/log.h ../../winix/core/textstream.h
notifythread.o: ../../winix/core/logmanipulators.h ../../winix/core/slog.h
notifythread.o: ../../winix/core/cur.h ../../winix/core/request.h
notifythread.o: ../../winix/core/requesttypes.h ../../winix/core/error.h
notifythread.o: ../../winix/core/config.h
notifythread.o: ../../winix/templates/htmltextstream.h
notifythread.o: ../../pikotools/space/spacetojson.h
notifythread.o: ../../winix/core/session.h ../../winix/core/plugindata.h
notifythread.o: ../../winix/core/rebus.h ../../winix/core/ipban.h
notifythread.o: ../../winix/core/mount.h ../../winix/core/lastcontainer.h
notifythread.o: ../../winix/db/db.h ../../winix/db/dbbase.h
notifythread.o: ../../winix/db/dbconn.h ../../winix/db/dbtextstream.h
notifythread.o: ../../winix/core/error.h ../../winix/db/dbitemquery.h
notifythread.o: ../../winix/core/item.h ../../winix/db/dbitemcolumns.h
notifythread.o: ../../winix/core/user.h ../../winix/core/group.h
notifythread.o: ../../winix/core/dircontainer.h
notifythread.o: ../../winix/core/ugcontainer.h
notifythread.o: ../../winix/templates/patterns.h
templatesnotify.o: templatesnotify.h ../../ezc/src/ezc.h
templatesnotify.o: ../../ezc/src/generator.h ../../ezc/src/blocks.h
templatesnotify.o: ../../ezc/src/item.h ../../ezc/src/cache.h
templatesnotify.o: ../../ezc/src/functions.h ../../pikotools/utf8/utf8.h
templatesnotify.o: ../../ezc/src/funinfo.h ../../ezc/src/objects.h
templatesnotify.o: ../../ezc/src/pattern.h ../../ezc/src/outstreams.h
templatesnotify.o: ../../ezc/src/patternparser.h
templatesnotify.o: ../../winix/core/textstream.h ../../winix/templates/misc.h
templatesnotify.o: ../../winix/templates/localefilter.h
templatesnotify.o: ../../winix/templates/locale.h
templatesnotify.o: ../../winix/templates/htmltextstream.h
templatesnotify.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
templatesnotify.o: ../../pikotools/textstream/textstream.h
templatesnotify.o: ../../pikotools/convert/convert.h
templatesnotify.o: ../../pikotools/convert/inttostr.h
templatesnotify.o: ../../pikotools/membuffer/membuffer.h
templatesnotify.o: ../../pikotools/textstream/types.h notifypool.h
templatesnotify.o: ../../winix/templates/locale.h
templatesnotify.o: ../../pikotools/space/spaceparser.h
templatesnotify.o: ../../pikotools/space/space.h
templatesnotify.o: ../../pikotools/textstream/types.h
templatesnotify.o: ../../winix/core/plugin.h ../../winix/core/pluginmsg.h
templatesnotify.o: ../../winix/core/log.h ../../winix/core/textstream.h
templatesnotify.o: ../../winix/core/logmanipulators.h ../../winix/core/slog.h
templatesnotify.o: ../../winix/core/cur.h ../../winix/core/request.h
templatesnotify.o: ../../winix/core/requesttypes.h ../../winix/core/error.h
templatesnotify.o: ../../winix/core/config.h
templatesnotify.o: ../../winix/templates/htmltextstream.h
templatesnotify.o: ../../pikotools/space/spacetojson.h
templatesnotify.o: ../../winix/core/session.h ../../winix/core/user.h
templatesnotify.o: ../../winix/core/plugindata.h ../../winix/core/rebus.h
templatesnotify.o: ../../winix/core/ipban.h ../../winix/core/mount.h
templatesnotify.o: ../../winix/core/system.h
templatesnotify.o: ../../winix/core/sessionmanager.h
templatesnotify.o: ../../winix/core/synchro.h
templatesnotify.o: ../../winix/functions/functions.h
templatesnotify.o: ../../winix/functions/functionbase.h
templatesnotify.o: ../../winix/core/item.h ../../winix/db/db.h
templatesnotify.o: ../../winix/db/dbbase.h ../../winix/db/dbconn.h
templatesnotify.o: ../../winix/db/dbtextstream.h ../../winix/core/error.h
templatesnotify.o: ../../winix/db/dbitemquery.h
templatesnotify.o: ../../winix/db/dbitemcolumns.h ../../winix/core/user.h
templatesnotify.o: ../../winix/core/group.h ../../winix/core/dircontainer.h
templatesnotify.o: ../../winix/core/ugcontainer.h ../../winix/core/request.h
templatesnotify.o: ../../winix/core/config.h ../../winix/core/htmlfilter.h
templatesnotify.o: ../../winix/core/system.h ../../winix/core/job.h
templatesnotify.o: ../../winix/core/basethread.h ../../winix/core/dirs.h
templatesnotify.o: ../../winix/core/dircontainer.h
templatesnotify.o: ../../winix/notify/notify.h ../../winix/core/mounts.h
templatesnotify.o: ../../winix/core/mountparser.h ../../winix/core/crypt.h
templatesnotify.o: ../../winix/core/run.h ../../winix/core/users.h
templatesnotify.o: ../../winix/core/groups.h ../../winix/core/group.h
templatesnotify.o: ../../winix/core/ugcontainer.h ../../winix/core/loadavg.h
templatesnotify.o: ../../winix/core/image.h ../../winix/core/threadmanager.h
templatesnotify.o: ../../winix/core/timezones.h ../../winix/core/timezone.h
templatesnotify.o: ../../winix/core/synchro.h
templatesnotify.o: ../../winix/functions/functionparser.h
templatesnotify.o: ../../winix/core/cur.h ../../winix/functions/account.h
templatesnotify.o: ../../winix/functions/adduser.h
templatesnotify.o: ../../winix/functions/cat.h ../../winix/functions/chmod.h
templatesnotify.o: ../../winix/functions/privchanger.h
templatesnotify.o: ../../winix/functions/chown.h
templatesnotify.o: ../../winix/functions/ckeditor.h
templatesnotify.o: ../../winix/functions/cp.h ../../winix/functions/default.h
templatesnotify.o: ../../winix/functions/download.h
templatesnotify.o: ../../winix/functions/emacs.h ../../winix/functions/env.h
templatesnotify.o: ../../winix/functions/imgcrop.h
templatesnotify.o: ../../winix/functions/last.h ../../winix/functions/login.h
templatesnotify.o: ../../winix/functions/logout.h ../../winix/functions/ln.h
templatesnotify.o: ../../winix/functions/ls.h ../../winix/functions/man.h
templatesnotify.o: ../../winix/functions/meta.h ../../winix/functions/mkdir.h
templatesnotify.o: ../../winix/functions/mv.h ../../winix/functions/nicedit.h
templatesnotify.o: ../../winix/functions/node.h
templatesnotify.o: ../../winix/functions/passwd.h
templatesnotify.o: ../../winix/functions/priv.h ../../winix/functions/pw.h
templatesnotify.o: ../../winix/functions/reload.h ../../winix/functions/rm.h
templatesnotify.o: ../../winix/functions/rmuser.h
templatesnotify.o: ../../winix/functions/sort.h
templatesnotify.o: ../../winix/functions/specialdefault.h
templatesnotify.o: ../../winix/functions/stat.h
templatesnotify.o: ../../winix/functions/subject.h
templatesnotify.o: ../../winix/functions/template.h
templatesnotify.o: ../../winix/functions/tinymce.h
templatesnotify.o: ../../winix/functions/uname.h
templatesnotify.o: ../../winix/functions/upload.h
templatesnotify.o: ../../winix/functions/uptime.h ../../winix/functions/who.h
templatesnotify.o: ../../winix/functions/vim.h ../../winix/core/htmlfilter.h
templatesnotify.o: ../../winix/templates/templates.h
templatesnotify.o: ../../winix/templates/patterncacher.h
templatesnotify.o: ../../winix/templates/indexpatterns.h
templatesnotify.o: ../../winix/templates/patterns.h
templatesnotify.o: ../../winix/templates/changepatterns.h
templatesnotify.o: ../../winix/core/sessionmanager.h
templatesnotify.o: ../../winix/core/sessioncontainer.h
templatesnotify.o: ../../winix/core/ipbancontainer.h
templatesnotify.o: ../../winix/core/lastcontainer.h
templatesnotify.o: ../../winix/core/sessionidmanager.h
templatesnotify.o: ../../tito/src/base64.h ../../tito/src/aes.h
templatesnotify.o: ../../winix/core/misc.h ../../winix/core/winix_const.h

View File

@@ -0,0 +1 @@
o = notify.o notifypool.o notifythread.o templatesnotify.o

226
winixd/notify/notify.cpp Normal file
View File

@@ -0,0 +1,226 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "notify.h"
#include "templates/templates.h"
#include "core/request.h"
#include "core/config.h"
#include "core/users.h"
#include "core/dirs.h"
#include "core/plugin.h"
namespace Winix
{
Notify::Notify()
{
}
void Notify::SetCur(Cur * pcur)
{
cur = pcur;
}
void Notify::SetConfig(Config * pconfig)
{
config = pconfig;
}
void Notify::SetUsers(Users * pusers)
{
users = pusers;
}
void Notify::SetDirs(Dirs * pdirs)
{
dirs = pdirs;
}
void Notify::SetThreadManager(ThreadManager * pmanager)
{
thread_manager = pmanager;
}
void Notify::Init()
{
notify_thread.SetConfig(config);
notify_thread.SetUsers(users);
notify_thread.SetNotifyPool(&notify_pool);
notify_thread.SetPatterns(&patterns);
thread_manager->Add(&notify_thread, L"notifications");
patterns.SetDirectories(config->txt_templates_dir, config->txt_templates_dir_default);
patterns.SetLocale(&TemplatesFunctions::locale);
patterns.SetLocaleFilter(&TemplatesFunctions::locale_filter);
notify_template_cms = AddTemplate(L"notify_email_cms.txt");
notify_template_activate_account = AddTemplate(L"notify_confirm_account.txt");
notify_template_reset_password = AddTemplate(L"notify_reset_password.txt");
plugin.Call((Session*)0, WINIX_NOTIFY_ADD_TEMPLATE);
}
void Notify::ReadTemplates()
{
patterns.Reload();
notify_thread.PatternsChanged();
}
void Notify::ItemChanged(int notify_code, const Item & item)
{
if( notify_code == 0 )
return;
msg.Clear();
msg.code = notify_code;
msg.template_index = notify_template_cms;
CreateItemLink(item, msg.item_link, msg.dir_link);
ItemChanged(msg);
}
// raw form
void Notify::ItemChanged(const NotifyMsg & msg)
{
notify_pool.Add(msg);
notify_thread.WakeUpThread(); // we are in the first locked thread
}
void Notify::ActivateAccount(const std::wstring & name, const std::wstring & email, long code)
{
msg.Clear();
msg.code = WINIX_NOTIFY_CODE_CONFIRM_ACCOUNT;
msg.name = name;
msg.email = email;
msg.lang = config->locale_default_id;
msg.activate_code = code;
msg.template_index = notify_template_activate_account;
CreateActivateLink(name, code, msg.item_link);
notify_pool.Add(msg);
notify_thread.WakeUpThread(); // we are in the first locked thread
}
void Notify::ResetPassword(const std::wstring & name, const std::wstring & email, long code)
{
msg.Clear();
msg.code = WINIX_NOTIFY_CODE_RESET_PASSWORD;
msg.name = name;
msg.email = email;
msg.lang = config->locale_default_id; // !! IMPROVE ME a better language can be chose (the same as the user has)
msg.activate_code = code;
msg.template_index = notify_template_reset_password;
CreateResetPasswordLink(name, code, msg.item_link);
notify_pool.Add(msg);
notify_thread.WakeUpThread(); // we are in the first locked thread
}
size_t Notify::AddTemplate(const std::wstring & file_name)
{
return patterns.Add(file_name, false);
}
void Notify::CreateItemLink(const Item & item, std::wstring & item_link, std::wstring & dir_link)
{
tmp_path.clear();
if( item.type == Item::dir )
{
dirs->MakePath(item.id, tmp_path);
item_link = config->url_proto;
item_link += config->base_url; // !! IMPROVE ME what about subdomains?
item_link += tmp_path;
dir_link = item_link;
}
else
{
dirs->MakePath(item.parent_id, tmp_path);
item_link = config->url_proto;
item_link += config->base_url; // !! IMPROVE ME what about subdomains?
item_link += tmp_path;
dir_link = item_link;
item_link += item.url;
}
}
void Notify::CreateActivateLink(const std::wstring & name, long code, std::wstring & link)
{
wchar_t buff[50];
link = config->url_proto;
link += config->base_url;// !! IMPROVE ME what about subdomains?
link += L"/account/activate/login:";
UrlEncode(name, link, false);
link += L"/code:";
Toa(code, buff, sizeof(buff)/sizeof(wchar_t));
link += buff;
}
void Notify::CreateResetPasswordLink(const std::wstring & name, long code, std::wstring & link)
{
wchar_t buff[50];
link = config->url_proto;
link += config->base_url;// !! IMPROVE ME what about subdomains?
link += L"/passwd/resetpassword/login:";
UrlEncode(name, link, false);
link += L"/code:";
Toa(code, buff, sizeof(buff)/sizeof(wchar_t));
link += buff;
}
} // namespace Winix

106
winixd/notify/notify.h Normal file
View File

@@ -0,0 +1,106 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_notify_notify
#define headerfile_winix_notify_notify
#include <vector>
#include <string>
#include "notifypool.h"
#include "templates/patterns.h"
#include "notifythread.h"
namespace Winix
{
struct Request;
class Config;
class Users;
class Dirs;
class ThreadManager;
class Notify
{
public:
Notify();
void SetCur(Cur * pcur);
void SetConfig(Config * pconfig);
void SetUsers(Users * pusers);
void SetDirs(Dirs * pdirs);
void SetThreadManager(ThreadManager * pmanager);
void Init();
size_t AddTemplate(const std::wstring & file_name);
void ReadTemplates();
void ItemChanged(int notify_code, const Item & item);
void ItemChanged(const NotifyMsg & msg);
void ActivateAccount(const std::wstring & name, const std::wstring & email, long code);
void ResetPassword(const std::wstring & name, const std::wstring & email, long code);
private:
Cur * cur;
Config * config;
Dirs * dirs;
Users * users;
ThreadManager * thread_manager;
NotifyThread notify_thread;
NotifyMsg msg;
NotifyPool notify_pool;
std::wstring tmp_path;
size_t notify_template_cms;
size_t notify_template_activate_account;
size_t notify_template_reset_password;
Patterns patterns;
void CreateItemLink(const Item & item, std::wstring & link, std::wstring & dir_link);
void CreateActivateLink(const std::wstring & name, long code, std::wstring & link);
void CreateResetPasswordLink(const std::wstring & name, long code, std::wstring & link);
};
} // namespace Winix
#endif

View File

@@ -0,0 +1,75 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "notifypool.h"
namespace Winix
{
bool NotifyPool::Empty() const
{
return notify_pool.empty();
}
size_t NotifyPool::Size() const
{
return notify_pool.size(); // it has O(n)
}
NotifyMsg & NotifyPool::GetFirst()
{
return *notify_pool.begin();
}
void NotifyPool::DeleteFirst()
{
if( notify_pool.empty() )
return;
notify_pool.erase(notify_pool.begin());
}
void NotifyPool::Add(const NotifyMsg & msg)
{
notify_pool.insert(notify_pool.end(), msg);
}
} // namespace Winix

123
winixd/notify/notifypool.h Normal file
View File

@@ -0,0 +1,123 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2010-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_notify_notifypool
#define headerfile_winix_notify_notifypool
#include <list>
#include <string>
#include "templates/locale.h"
namespace Winix
{
#define WINIX_NOTIFY_CODE_ADD 1
#define WINIX_NOTIFY_CODE_EDIT 2
#define WINIX_NOTIFY_CODE_DELETE 4
#define WINIX_NOTIFY_CODE_REPLY 8
#define WINIX_NOTIFY_CODE_CONFIRM_ACCOUNT 16
#define WINIX_NOTIFY_CODE_RESET_PASSWORD 32
// !! IMPROVE ME
// may now we can use PT::Space instead of NotifyMsg?
struct NotifyMsg
{
int code;
std::wstring item_link; // link to a file or a dir (can be the same as dir_link if the item is a directory)
std::wstring dir_link; // link to a dir
size_t template_index;
// used in account activations
// we send one email directly to one user
std::wstring email;
std::wstring name;
size_t lang;
long activate_code;
NotifyMsg()
{
Clear();
}
void Clear()
{
code = -1;
item_link.clear();
dir_link.clear();
template_index = 0;
email.clear();
name.clear();
lang = 0;
activate_code = 0;
}
};
// used by the second thread (and its templates)
struct NotifyUserMsg
{
std::wstring name;
std::wstring email;
size_t lang; // locale id (not an index)
};
class NotifyPool
{
public:
bool Empty() const;
size_t Size() const;
NotifyMsg & GetFirst();
void DeleteFirst();
void Add(const NotifyMsg & msg);
private:
std::list<NotifyMsg> notify_pool;
};
} // namespace Winix
#endif

View File

@@ -0,0 +1,301 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "notifythread.h"
namespace Winix
{
// first thread (objects are locked)
NotifyThread::NotifyThread()
{
patterns_changed = true;
}
// first thread (objects are locked)
void NotifyThread::SetConfig(Config * pconfig)
{
config = pconfig;
}
// first thread (objects are locked)
void NotifyThread::SetUsers(Users * pusers)
{
users = pusers;
}
// first thread (objects are locked)
void NotifyThread::SetNotifyPool(NotifyPool * pool)
{
notify_pool = pool;
}
// first thread (objects are locked)
void NotifyThread::SetPatterns(Patterns * pat)
{
pat_global = pat;
}
// first thread (objects are locked)
void NotifyThread::PatternsChanged()
{
patterns_changed = true;
}
// first thread (objects are locked)
bool NotifyThread::Init()
{
TemplatesNotifyFunctions::CreateFunctions();
return true;
}
// first thread (objects are locked)
bool NotifyThread::SignalReceived()
{
if( patterns_changed )
{
patterns = *pat_global;
patterns_changed = false;
}
return !notify_pool->Empty();
}
// second thread (objects are not locked)
// return true if there is something to send from the first queue (notify_pool)
bool NotifyThread::AddNextNotify()
{
Users::Iterator i;
bool res = false;
Lock();
if( !notify_pool->Empty() )
{
TemplatesNotifyFunctions::notify_msg = notify_pool->GetFirst();
notify_pool->DeleteFirst();
if( TemplatesNotifyFunctions::notify_msg.code == WINIX_NOTIFY_CODE_CONFIRM_ACCOUNT ||
TemplatesNotifyFunctions::notify_msg.code == WINIX_NOTIFY_CODE_RESET_PASSWORD )
{
msg.email = TemplatesNotifyFunctions::notify_msg.email;
msg.name = TemplatesNotifyFunctions::notify_msg.name;
msg.lang = TemplatesNotifyFunctions::notify_msg.lang;
notify_user.push_back(msg);
res = true;
}
else
{
for(i=users->Begin() ; i != users->End() ; ++i)
{
if( (i->notify & TemplatesNotifyFunctions::notify_msg.code) != 0 )
{
msg.name = i->name;
msg.email = i->email;
msg.lang = config->locale_default_id; // !! IMPROVE ME bedzie osobno dla kazdego uzytkownika
notify_user.push_back(msg);
res = true;
}
}
}
}
Unlock();
return res;
}
// second thread -- here we must use Lock() and Unlock() explicitly
void NotifyThread::Do()
{
NotifyUser::iterator i;
bool queue_end;
while( AddNextNotify() )
{
Lock();
i = notify_user.begin();
queue_end = notify_user.empty();
Unlock();
while( !queue_end )
{
Lock();
TemplatesNotifyFunctions::notify_user_msg = *i;
log << log3 << "NotifyThread: sending notification to: " << i->name << ", email: " << i->email << logend;
Unlock();
SendMail();
Lock();
WaitForSignalSleep(2); // automatically unlock and lock again when returns
bool stop = synchro->was_stop_signal;
Unlock();
if( stop )
return;
Lock();
notify_user.erase(i++);
queue_end = (i == notify_user.end());
Unlock();
}
}
}
// second thread
void NotifyThread::SendMail()
{
notify_stream.Clear();
size_t lang_id = TemplatesNotifyFunctions::notify_user_msg.lang;
size_t template_index = TemplatesNotifyFunctions::notify_msg.template_index;
Lock();
// 'patterns' object can use logger or other stuff so we use Lock() before
Ezc::Pattern * pat = patterns.Get(template_index, lang_id);
if( !pat )
log << log1 << "NotifyThread: I don't have a template with index: " << template_index
<< " and locale id: " << lang_id << logend;
Unlock();
if( pat )
{
generator.RecognizeSpecialChars(true);
generator.TrimWhite(true);
generator.SkipNewLine(true);
generator.SetFunctions(TemplatesNotifyFunctions::ezc_functions);
generator.SetPattern(*pat);
/*
* don't use cache
* 'pat' pattern is stored in 'patterns' object for all templates and by default
* all functions/blocks are cached, but we are in a second thread
* and cannot use such functions without locking
*
* IMPROVE ME
* blocks are parsed to the container from the main thread
* and we cannot just use it here (another thread)
* so may should we have our own 'patterns' object here?
*
*/
generator.CanUseCache(false);
generator.Generate(notify_stream);
SendMail(TemplatesNotifyFunctions::notify_user_msg.email, notify_stream.Str());
}
}
// second thread
void NotifyThread::SendMail(const std::wstring & email, const std::wstring & message)
{
nlog << log1 << PT::Date(std::time(0)) << ' ';
if( !ValidateEmail(email) )
{
nlog << log1 << "NotifyThread: email adress: " << email << " is not correct" << logend;
return;
}
sendmail_command = "sendmail ";
PT::WideToUTF8(email, sendmail_command, false);
FILE * sendmail = popen(sendmail_command.c_str(), "w");
if( !sendmail )
{
nlog << log1 << "NotifyThread: can't run sendmail" << logend;
return;
}
SendMail(sendmail, message);
pclose(sendmail);
nlog << log1 << "NotifyThread: email to: " << email << " has been sent" << logend << logsave;
}
// second thread
void NotifyThread::SendMail(FILE * sendmail, const std::wstring & message)
{
char buf[10];
size_t len;
for(size_t i=0 ; i<message.length() ; ++i)
{
if( message[i] == '\n' )
{
fprintf(sendmail, "\r\n");
}
else
{
len = PT::IntToUTF8(int(message[i]), buf, sizeof(buf) / sizeof(char));
for(size_t a=0 ; a<len ; ++a)
fputc(buf[a], sendmail);
}
}
}
} // namespace Winix

View File

@@ -0,0 +1,93 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_notify_notifythread
#define headerfile_winix_notify_notifythread
#include "core/basethread.h"
#include "templatesnotify.h"
#include "ezc.h"
#include "core/config.h"
#include "core/users.h"
#include "templates/patterns.h"
namespace Winix
{
// we have set following pointers: request, config, system (from BaseThread)
class NotifyThread : public BaseThread
{
public:
NotifyThread();
void SetConfig(Config * pconfig);
void SetUsers(Users * pusers);
void SetNotifyPool(NotifyPool * pool);
void SetPatterns(Patterns * pat);
void PatternsChanged();
private:
Config * config;
Users * users;
NotifyPool * notify_pool;
Patterns * pat_global;
NotifyUserMsg msg;
typedef std::list<NotifyUserMsg> NotifyUser;
NotifyUser notify_user;
std::string sendmail_command;
bool patterns_changed;
Patterns patterns;
TemplatesNotifyFunctions::NotifyStream notify_stream;
Ezc::Generator<TemplatesNotifyFunctions::NotifyStream> generator;
virtual bool Init();
virtual bool SignalReceived();
bool AddNextNotify();
virtual void Do();
void SendMail();
void SendMail(const std::wstring & email, const std::wstring & message);
void SendMail(FILE * sendmail, const std::wstring & message);
};
} // namespace Winix
#endif

View File

@@ -0,0 +1,150 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "templatesnotify.h"
#include "core/plugin.h"
#include "core/misc.h"
namespace Winix
{
namespace TemplatesNotifyFunctions
{
Ezc::Functions<NotifyStream> ezc_functions;
// you can use this pointer in template functions (will be always valid)
NotifyUserMsg notify_user_msg;
NotifyMsg notify_msg;
static std::string qencode_tmp;
void fil_qencode(Info & i)
{
// QEncode can be used in other threads
QEncode(i.in.Str(), qencode_tmp);
i.out << qencode_tmp;
}
void notify_add(Info & i)
{
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_ADD) != 0;
}
void notify_edit(Info & i)
{
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_EDIT) != 0;
}
void notify_delete(Info & i)
{
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_DELETE) != 0;
}
void notify_reply(Info & i)
{
i.res = (notify_msg.code & WINIX_NOTIFY_CODE_REPLY) != 0;
}
void notify_to_email(Info & i)
{
i.out << notify_user_msg.email;
}
void notify_to_name(Info & i)
{
i.out << notify_user_msg.name;
}
void notify_item_link(Info & i)
{
i.out << notify_msg.item_link;
}
void notify_dir_link(Info & i)
{
i.out << notify_msg.dir_link;
}
void CreateFunctions()
{
ezc_functions.Clear();
ezc_functions.Insert("fil_qencode", fil_qencode);
/*
* IMPROVE ME
* now we are able to read from a Space struct and these functions can be removed
* and we can use directly a Space struct
* (copy those functions here from normal templates)
*/
ezc_functions.Insert("notify_add", notify_add);
ezc_functions.Insert("notify_edit", notify_edit);
ezc_functions.Insert("notify_delete", notify_delete);
ezc_functions.Insert("notify_reply", notify_reply);
ezc_functions.Insert("notify_to_email", notify_to_email);
ezc_functions.Insert("notify_to_name", notify_to_name);
ezc_functions.Insert("notify_item_link", notify_item_link);
ezc_functions.Insert("notify_dir_link", notify_dir_link);
plugin.Call((Session*)0, WINIX_NOTIFY_TEMPLATES_CREATEFUNCTIONS, &ezc_functions);
}
} // namespace TemplatesNotifyFunctions
} // namespace Winix

View File

@@ -0,0 +1,62 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_notify_templatesnotify
#define headerfile_winix_notify_templatesnotify
#include "ezc.h"
#include "core/textstream.h"
#include "notifypool.h"
namespace Winix
{
namespace TemplatesNotifyFunctions
{
typedef TextStream<std::wstring> NotifyStream;
typedef Ezc::FunInfo<NotifyStream> Info;
extern NotifyUserMsg notify_user_msg;
extern NotifyMsg notify_msg;
extern Ezc::Functions<NotifyStream> ezc_functions;
void CreateFunctions();
}
} // namespace Winix
#endif

View File

@@ -0,0 +1,30 @@
include Makefile.o.dep
name = export.so
all: $(name)
# -lcurl is used when linking the main winix.so so we don't have to use it here
$(name): $(o)
$(CXX) -shared -Wl,-soname,$(name) -o $(name) $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) $(LDFLAGS) *.o
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) $<
depend:
makedepend -Y. $(CXXWINIXINCLUDEFLAGS) -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
clean:
rm -f *.o
rm -f *.so
rm -f $(name)
include Makefile.dep

View File

@@ -0,0 +1,264 @@
# DO NOT DELETE
edb.o: edb.h ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
edb.o: ../../../winix/db/dbtextstream.h ../../../winix/core/textstream.h
edb.o: ../../../winix/core/misc.h ../../../winix/core/item.h
edb.o: ../../../pikotools/space/space.h ../../../pikotools/textstream/types.h
edb.o: ../../../pikotools/date/date.h ../../../winix/core/requesttypes.h
edb.o: ../../../pikotools/textstream/textstream.h
edb.o: ../../../pikotools/convert/convert.h
edb.o: ../../../pikotools/convert/inttostr.h
edb.o: ../../../pikotools/membuffer/membuffer.h
edb.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
edb.o: ../../../winix/core/winix_const.h ../../../winix/core/error.h
edb.o: ../../../pikotools/space/spaceparser.h
edb.o: ../../../pikotools/space/space.h export.h ../../../winix/core/dirs.h
edb.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
edb.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
edb.o: ../../../winix/core/item.h ../../../winix/db/dbitemcolumns.h
edb.o: ../../../winix/core/user.h ../../../winix/core/group.h
edb.o: ../../../winix/core/dircontainer.h ../../../winix/core/ugcontainer.h
edb.o: ../../../winix/core/log.h ../../../winix/core/textstream.h
edb.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
edb.o: ../../../winix/core/cur.h ../../../winix/core/request.h
edb.o: ../../../winix/core/error.h ../../../winix/core/config.h
edb.o: ../../../winix/core/htmlfilter.h
edb.o: ../../../winix/templates/htmltextstream.h
edb.o: ../../../pikotools/space/spacetojson.h ../../../ezc/src/outstreams.h
edb.o: ../../../winix/core/session.h ../../../winix/core/user.h
edb.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
edb.o: ../../../winix/core/ipban.h ../../../winix/core/mount.h
edb.o: ../../../winix/templates/locale.h ../../../winix/notify/notify.h
edb.o: ../../../winix/notify/notifypool.h ../../../winix/templates/patterns.h
edb.o: ../../../winix/templates/locale.h
edb.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
edb.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
edb.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
edb.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
edb.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
edb.o: ../../../winix/notify/notifythread.h ../../../winix/core/basethread.h
edb.o: ../../../winix/core/synchro.h ../../../winix/notify/templatesnotify.h
edb.o: ../../../winix/core/config.h ../../../winix/core/users.h
edb.o: ../../../winix/core/ugcontainer.h ../../../winix/core/lastcontainer.h
edb.o: ../../../winix/core/log.h
exportinfo.o: ../../../winix/core/log.h exportinfo.h
exportinfo.o: ../../../winix/core/system.h ../../../winix/core/job.h
exportinfo.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
exportinfo.o: ../../../pikotools/space/space.h
exportinfo.o: ../../../pikotools/textstream/types.h
exportinfo.o: ../../../winix/core/dirs.h ../../../winix/core/item.h
exportinfo.o: ../../../pikotools/date/date.h
exportinfo.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
exportinfo.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
exportinfo.o: ../../../winix/core/item.h ../../../winix/db/dbitemcolumns.h
exportinfo.o: ../../../winix/core/user.h ../../../winix/core/group.h
exportinfo.o: ../../../winix/core/dircontainer.h
exportinfo.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
exportinfo.o: ../../../winix/core/textstream.h
exportinfo.o: ../../../winix/core/logmanipulators.h
exportinfo.o: ../../../pikotools/textstream/textstream.h
exportinfo.o: ../../../pikotools/convert/convert.h
exportinfo.o: ../../../pikotools/convert/inttostr.h
exportinfo.o: ../../../pikotools/membuffer/membuffer.h
exportinfo.o: ../../../pikotools/textstream/types.h
exportinfo.o: ../../../winix/core/slog.h ../../../winix/core/cur.h
exportinfo.o: ../../../winix/core/request.h
exportinfo.o: ../../../winix/core/requesttypes.h ../../../winix/core/error.h
exportinfo.o: ../../../winix/core/config.h
exportinfo.o: ../../../pikotools/space/spaceparser.h
exportinfo.o: ../../../pikotools/space/space.h
exportinfo.o: ../../../winix/core/htmlfilter.h
exportinfo.o: ../../../winix/templates/htmltextstream.h
exportinfo.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
exportinfo.o: ../../../pikotools/utf8/utf8.h
exportinfo.o: ../../../winix/core/winix_const.h
exportinfo.o: ../../../pikotools/space/spacetojson.h
exportinfo.o: ../../../ezc/src/outstreams.h ../../../winix/core/session.h
exportinfo.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
exportinfo.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
exportinfo.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
exportinfo.o: ../../../winix/notify/notify.h
exportinfo.o: ../../../winix/notify/notifypool.h
exportinfo.o: ../../../winix/templates/patterns.h
exportinfo.o: ../../../winix/templates/locale.h
exportinfo.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
exportinfo.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
exportinfo.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
exportinfo.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
exportinfo.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
exportinfo.o: ../../../winix/notify/notifythread.h
exportinfo.o: ../../../winix/core/basethread.h
exportinfo.o: ../../../winix/notify/templatesnotify.h
exportinfo.o: ../../../winix/core/config.h ../../../winix/core/users.h
exportinfo.o: ../../../winix/core/ugcontainer.h
exportinfo.o: ../../../winix/core/lastcontainer.h
exportinfo.o: ../../../winix/core/mounts.h ../../../winix/core/mountparser.h
exportinfo.o: ../../../winix/core/crypt.h ../../../winix/core/run.h
exportinfo.o: ../../../winix/core/users.h ../../../winix/core/groups.h
exportinfo.o: ../../../winix/core/group.h ../../../winix/core/loadavg.h
exportinfo.o: ../../../winix/core/image.h ../../../winix/core/threadmanager.h
exportinfo.o: ../../../winix/core/timezones.h ../../../winix/core/timezone.h
exportinfo.o: export.h edb.h ../../../winix/db/dbbase.h
exportinfo.o: ../../../winix/db/dbconn.h ../../../winix/db/dbtextstream.h
exportinfo.o: ../../../winix/core/error.h ../../../winix/core/dirs.h
exportinfo.o: message.h exportthread.h
exportthread.o: exportthread.h ../../../winix/core/basethread.h
exportthread.o: ../../../winix/core/synchro.h message.h
exportthread.o: ../../../winix/core/log.h ../../../winix/core/misc.h
exportthread.o: ../../../winix/core/item.h ../../../pikotools/space/space.h
exportthread.o: ../../../pikotools/textstream/types.h
exportthread.o: ../../../pikotools/date/date.h
exportthread.o: ../../../winix/core/requesttypes.h
exportthread.o: ../../../pikotools/textstream/textstream.h
exportthread.o: ../../../pikotools/convert/convert.h
exportthread.o: ../../../pikotools/convert/inttostr.h
exportthread.o: ../../../pikotools/membuffer/membuffer.h
exportthread.o: ../../../pikotools/textstream/types.h
exportthread.o: ../../../pikotools/utf8/utf8.h
exportthread.o: ../../../winix/core/winix_const.h
funexport.o: funexport.h ../../../winix/functions/functionbase.h
funexport.o: ../../../winix/core/item.h ../../../winix/db/db.h
funexport.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
funexport.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
funexport.o: ../../../pikotools/space/space.h
funexport.o: ../../../pikotools/textstream/types.h
funexport.o: ../../../pikotools/date/date.h ../../../winix/core/group.h
funexport.o: ../../../winix/core/dircontainer.h
funexport.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
funexport.o: ../../../winix/core/textstream.h
funexport.o: ../../../winix/core/logmanipulators.h
funexport.o: ../../../pikotools/textstream/textstream.h
funexport.o: ../../../pikotools/convert/convert.h
funexport.o: ../../../pikotools/convert/inttostr.h
funexport.o: ../../../pikotools/membuffer/membuffer.h
funexport.o: ../../../pikotools/textstream/types.h ../../../winix/core/slog.h
funexport.o: ../../../winix/core/cur.h ../../../winix/core/request.h
funexport.o: ../../../winix/core/requesttypes.h ../../../winix/core/item.h
funexport.o: ../../../winix/core/error.h ../../../winix/core/config.h
funexport.o: ../../../pikotools/space/spaceparser.h
funexport.o: ../../../pikotools/space/space.h
funexport.o: ../../../winix/core/htmlfilter.h
funexport.o: ../../../winix/templates/htmltextstream.h
funexport.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
funexport.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
funexport.o: ../../../pikotools/space/spacetojson.h
funexport.o: ../../../ezc/src/outstreams.h ../../../winix/core/session.h
funexport.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
funexport.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
funexport.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
funexport.o: ../../../winix/core/request.h ../../../winix/core/config.h
funexport.o: ../../../winix/core/system.h ../../../winix/core/job.h
funexport.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
funexport.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
funexport.o: ../../../winix/notify/notify.h
funexport.o: ../../../winix/notify/notifypool.h
funexport.o: ../../../winix/templates/patterns.h
funexport.o: ../../../winix/templates/locale.h
funexport.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
funexport.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
funexport.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
funexport.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
funexport.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
funexport.o: ../../../winix/notify/notifythread.h
funexport.o: ../../../winix/core/basethread.h
funexport.o: ../../../winix/notify/templatesnotify.h
funexport.o: ../../../winix/core/users.h ../../../winix/core/ugcontainer.h
funexport.o: ../../../winix/core/lastcontainer.h ../../../winix/core/mounts.h
funexport.o: ../../../winix/core/mountparser.h ../../../winix/core/crypt.h
funexport.o: ../../../winix/core/run.h ../../../winix/core/users.h
funexport.o: ../../../winix/core/groups.h ../../../winix/core/group.h
funexport.o: ../../../winix/core/loadavg.h ../../../winix/core/image.h
funexport.o: ../../../winix/core/threadmanager.h
funexport.o: ../../../winix/core/timezones.h ../../../winix/core/timezone.h
funexport.o: ../../../winix/core/synchro.h exportinfo.h export.h edb.h
funexport.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
funexport.o: ../../../winix/db/dbtextstream.h ../../../winix/core/error.h
funexport.o: ../../../winix/core/dirs.h message.h exportthread.h
init.o: ../../../winix/core/log.h ../../../winix/core/plugin.h
init.o: ../../../winix/core/pluginmsg.h ../../../winix/core/log.h
init.o: ../../../winix/core/textstream.h
init.o: ../../../winix/core/logmanipulators.h
init.o: ../../../pikotools/textstream/textstream.h
init.o: ../../../pikotools/space/space.h
init.o: ../../../pikotools/textstream/types.h ../../../pikotools/date/date.h
init.o: ../../../pikotools/convert/convert.h
init.o: ../../../pikotools/convert/inttostr.h
init.o: ../../../pikotools/membuffer/membuffer.h
init.o: ../../../pikotools/textstream/types.h ../../../winix/core/slog.h
init.o: ../../../winix/core/cur.h ../../../winix/core/request.h
init.o: ../../../winix/core/requesttypes.h ../../../winix/core/item.h
init.o: ../../../winix/core/error.h ../../../winix/core/config.h
init.o: ../../../pikotools/space/spaceparser.h
init.o: ../../../pikotools/space/space.h ../../../winix/core/htmlfilter.h
init.o: ../../../winix/templates/htmltextstream.h
init.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
init.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
init.o: ../../../pikotools/space/spacetojson.h ../../../ezc/src/outstreams.h
init.o: ../../../winix/core/session.h ../../../winix/core/user.h
init.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
init.o: ../../../winix/core/ipban.h ../../../winix/core/mount.h
init.o: ../../../winix/templates/locale.h ../../../winix/core/system.h
init.o: ../../../winix/core/job.h ../../../winix/core/basethread.h
init.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
init.o: ../../../winix/core/dircontainer.h ../../../winix/db/db.h
init.o: ../../../winix/db/dbbase.h ../../../winix/db/dbitemquery.h
init.o: ../../../winix/core/item.h ../../../winix/db/dbitemcolumns.h
init.o: ../../../winix/core/user.h ../../../winix/core/group.h
init.o: ../../../winix/core/dircontainer.h ../../../winix/core/ugcontainer.h
init.o: ../../../winix/notify/notify.h ../../../winix/notify/notifypool.h
init.o: ../../../winix/templates/patterns.h ../../../winix/templates/locale.h
init.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
init.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
init.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
init.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
init.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
init.o: ../../../winix/notify/notifythread.h ../../../winix/core/basethread.h
init.o: ../../../winix/notify/templatesnotify.h ../../../winix/core/config.h
init.o: ../../../winix/core/users.h ../../../winix/core/ugcontainer.h
init.o: ../../../winix/core/lastcontainer.h ../../../winix/core/mounts.h
init.o: ../../../winix/core/mountparser.h ../../../winix/core/crypt.h
init.o: ../../../winix/core/run.h ../../../winix/core/users.h
init.o: ../../../winix/core/groups.h ../../../winix/core/group.h
init.o: ../../../winix/core/loadavg.h ../../../winix/core/image.h
init.o: ../../../winix/core/threadmanager.h ../../../winix/core/timezones.h
init.o: ../../../winix/core/timezone.h ../../../winix/core/sessionmanager.h
init.o: ../../../winix/core/sessioncontainer.h
init.o: ../../../winix/core/ipbancontainer.h
init.o: ../../../winix/core/sessionidmanager.h ../../../tito/src/base64.h
init.o: ../../../tito/src/aes.h ../../../winix/functions/functions.h
init.o: ../../../winix/functions/functionbase.h ../../../winix/core/request.h
init.o: ../../../winix/core/system.h ../../../winix/core/synchro.h
init.o: ../../../winix/functions/functionparser.h ../../../winix/core/cur.h
init.o: ../../../winix/functions/account.h ../../../winix/functions/adduser.h
init.o: ../../../winix/functions/cat.h ../../../winix/functions/chmod.h
init.o: ../../../winix/functions/privchanger.h
init.o: ../../../winix/functions/chown.h ../../../winix/functions/ckeditor.h
init.o: ../../../winix/functions/cp.h ../../../winix/functions/default.h
init.o: ../../../winix/functions/download.h ../../../winix/functions/emacs.h
init.o: ../../../winix/functions/env.h ../../../winix/functions/imgcrop.h
init.o: ../../../winix/functions/last.h ../../../winix/functions/login.h
init.o: ../../../winix/functions/logout.h ../../../winix/functions/ln.h
init.o: ../../../winix/functions/ls.h ../../../winix/functions/man.h
init.o: ../../../winix/functions/meta.h ../../../winix/functions/mkdir.h
init.o: ../../../winix/functions/mv.h ../../../winix/functions/nicedit.h
init.o: ../../../winix/functions/node.h ../../../winix/functions/passwd.h
init.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
init.o: ../../../winix/functions/reload.h ../../../winix/functions/rm.h
init.o: ../../../winix/functions/rmuser.h ../../../winix/functions/sort.h
init.o: ../../../winix/functions/specialdefault.h
init.o: ../../../winix/functions/stat.h ../../../winix/functions/subject.h
init.o: ../../../winix/functions/template.h
init.o: ../../../winix/functions/tinymce.h ../../../winix/functions/uname.h
init.o: ../../../winix/functions/upload.h ../../../winix/functions/uptime.h
init.o: ../../../winix/functions/who.h ../../../winix/functions/vim.h
init.o: ../../../winix/core/htmlfilter.h ../../../winix/templates/templates.h
init.o: ../../../winix/templates/patterncacher.h
init.o: ../../../winix/templates/indexpatterns.h
init.o: ../../../winix/templates/patterns.h
init.o: ../../../winix/templates/changepatterns.h
init.o: ../../../winix/templates/htmltextstream.h
init.o: ../../../winix/core/sessionmanager.h exportthread.h message.h
init.o: exportinfo.h export.h edb.h ../../../winix/db/dbbase.h
init.o: ../../../winix/db/dbconn.h ../../../winix/db/dbtextstream.h
init.o: ../../../winix/core/error.h ../../../winix/core/dirs.h funexport.h
init.o: ../../../winix/functions/functionbase.h

View File

@@ -0,0 +1 @@
o = edb.o exportinfo.o exportthread.o funexport.o init.o

View File

@@ -0,0 +1,238 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "edb.h"
#include "core/log.h"
namespace Winix
{
namespace Export
{
void EDb::SetDirs(Dirs * pdirs)
{
dirs = pdirs;
}
void EDb::SetExportCols(PGresult * r)
{
cid = AssertColumn(r, "id");
cuser_id = AssertColumn(r, "user_id");
cdir = AssertColumn(r, "dir");
cftp_id = AssertColumn(r, "ftp_id");
cftp_dir = AssertColumn(r, "ftp_dir");
cname = AssertColumn(r, "name");
cserver = AssertColumn(r, "server");
clogin = AssertColumn(r, "login");
cpass = AssertColumn(r, "pass");
cpass_type = AssertColumn(r, "pass_type");
ccan_change_ftp_params = AssertColumn(r, "can_change_ftp_params");
ccan_change_dir = AssertColumn(r, "can_change_dir");
chttp_server = AssertColumn(r, "http_server");
}
void EDb::SetExportValues(PGresult * r, int row, Export & exp)
{
exp.Clear();
exp.id = AssertValueLong(r, row, cid);
exp.user_id = AssertValueLong(r, row, cuser_id);
exp.ftp_id = AssertValueLong(r, row, cftp_id);
exp.ftp_pass_type = AssertValueInt(r, row, cpass_type);
AssertValueWide(r, row, cdir, exp.dir);
AssertValueWide(r, row, cftp_dir, exp.ftp_dir);
AssertValueWide(r, row, cname, exp.ftp_name);
AssertValueWide(r, row, cserver, exp.ftp_server);
AssertValueWide(r, row, clogin, exp.ftp_login);
AssertValueWide(r, row, chttp_server, exp.http_server);
AssertValueWide(r, row, cpass, exp.ftp_pass);
exp.can_change_ftp_params = AssertValueBool(r, row, ccan_change_ftp_params);
exp.can_change_dir = AssertValueBool(r, row, ccan_change_dir);
}
bool EDb::GetExport(long user_id, std::vector<Export> & export_tab, bool clear_tab)
{
if( clear_tab )
export_tab.clear();
PGresult * r = 0;
bool result = true;
try
{
query.Clear();
query << R( "select export.id, user_id, dir, ftp_id, ftp_dir, can_change_ftp_params, can_change_dir, "
"http_server, name, server, login, pass, pass_type from plugins.export "
"left join plugins.export_ftp on ftp_id = export_ftp.id where user_id = ")
<< user_id
<< R(";");
r = AssertQuery(query);
AssertResult(r, PGRES_TUPLES_OK);
SetExportCols(r);
int rows = Rows(r);
for(int i=0 ; i<rows ; ++i)
{
SetExportValues(r, i, exp);
export_tab.push_back(exp);
}
}
catch(const Error &)
{
result = false;
}
ClearResult(r);
return result;
}
bool EDb::GetExport(long id, Export & exp)
{
exp.Clear();
PGresult * r = 0;
bool result = false;
try
{
query.Clear();
query << R( "select export.id, user_id, dir, ftp_id, ftp_dir, can_change_ftp_params, can_change_dir, "
"http_server, name, server, login, pass, pass_type from plugins.export "
"left join plugins.export_ftp on ftp_id = export_ftp.id where export.id = ")
<< id
<< R(";");
r = AssertQuery(query);
AssertResult(r, PGRES_TUPLES_OK);
SetExportCols(r);
if( Rows(r) == 1 )
{
SetExportValues(r, 0, exp);
result = true;
}
}
catch(const Error &)
{
}
ClearResult(r);
return result;
}
bool EDb::GetExportDirs(std::vector<ExportDir> & export_tab, bool clear_tab)
{
if( clear_tab )
export_tab.clear();
PGresult * r = 0;
bool result = true;
try
{
query.Clear();
query << R( "select export.id, dir from plugins.export;");
r = AssertQuery(query);
AssertResult(r, PGRES_TUPLES_OK);
int rows = Rows(r);
cid = AssertColumn(r, "id");
cdir = AssertColumn(r, "dir");
for(int i=0 ; i<rows ; ++i)
{
exp_dir.id = AssertValueLong(r, i, cid);
AssertValueWide(r, i, cdir, dir_temp);
Item * pdir = dirs->GetDir(dir_temp);
if( pdir )
{
exp_dir.dir_id = pdir->id;
export_tab.push_back(exp_dir);
}
else
{
slog << "There is not such a directory: " << dir_temp << " (skipping)" << logend;
}
}
}
catch(const Error &)
{
result = false;
}
ClearResult(r);
return result;
}
}
} // namespace Winix

View File

@@ -0,0 +1,95 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_export_edb
#define headerfile_winix_plugins_export_edb
#include <vector>
#include "db/dbbase.h"
#include "export.h"
#include "core/dirs.h"
namespace Winix
{
namespace Export
{
class EDb : public DbBase
{
public:
void SetDirs(Dirs * pdirs);
bool GetExport(long user_id, std::vector<Export> & export_tab, bool clear_tab = true);
bool GetExport(long id, Export & exp);
bool GetExportDirs(std::vector<ExportDir> & export_tab, bool clear_tab = true);
private:
Dirs * dirs;
Export exp;
ExportDir exp_dir;
DbTextStream query;
std::wstring dir_temp;
int cid;
int cuser_id;
int cdir;
int cftp_id;
int cftp_dir;
int cname;
int cserver;
int clogin;
int cpass;
int cpass_type;
int ccan_change_ftp_params;
int ccan_change_dir;
int chttp_server;
void SetExportCols(PGresult * r);
void SetExportValues(PGresult * r, int row, Export & exp);
};
}
} // namespace Winix
#endif

View File

@@ -0,0 +1,108 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_export_export
#define headerfile_winix_plugins_export_export
#include <string>
namespace Winix
{
namespace Export
{
struct ExportDir
{
long id;
long dir_id;
};
struct Export
{
long id;
long user_id;
std::wstring dir;
long ftp_id;
std::wstring ftp_dir;
std::wstring ftp_name;
std::wstring ftp_server;
std::wstring ftp_login;
std::wstring ftp_pass;
int ftp_pass_type;
bool can_change_ftp_params;
bool can_change_dir;
std::wstring http_server;
Export()
{
Clear();
}
void Clear()
{
id = user_id = ftp_id = -1;
ftp_pass_type = 0;
dir.clear();
ftp_dir.clear();
ftp_name.clear();
ftp_server.clear();
ftp_login.clear();
ftp_pass.clear();
can_change_ftp_params = false;
can_change_dir = false;
http_server.clear();
}
};
}
} // namespace Winix
#endif

View File

@@ -0,0 +1,367 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "core/log.h"
#include "exportinfo.h"
namespace Winix
{
namespace Export
{
ExportInfo::ExportInfo()
{
use_rsa = false;
}
void ExportInfo::SetSystem(System * psystem)
{
system = psystem;
}
void ExportInfo::SetConfig(Config * pconfig)
{
config = pconfig;
}
void ExportInfo::SetEDb(EDb * pdb)
{
edb = pdb;
}
void ExportInfo::SetDb(Db * pdb)
{
db = pdb;
}
void ExportInfo::SetExportThread(ExportThread * pexport_thread)
{
export_thread = pexport_thread;
}
void ExportInfo::ReadExportDirs()
{
edb->GetExportDirs(export_dirs);
}
void ExportInfo::ReadConfigVars()
{
use_rsa = config->Bool(L"export_rsa", false);
rsa_key = config->Text(L"export_rsa_key");
}
ExportDir * ExportInfo::FindDir(long dir_id)
{
for(size_t i=0 ; i<export_dirs.size() ; ++i)
{
if( dir_id == export_dirs[i].dir_id || system->dirs.HasParent(dir_id, export_dirs[i].dir_id) )
return &export_dirs[i];
}
return 0;
}
bool ExportInfo::DecodePass(Export & exp)
{
if( exp.ftp_pass_type == 0 )
{
}
else
{
/*
if( system->crypt.RSA(false, rsa_key, exp.ftp_pass_bin, pass_decrypted) )
{
PT::UTF8ToWide(pass_decrypted, exp.ftp_pass);
system->crypt.ClearString(pass_decrypted);
}
else
{
log << log1 << "Export: I cannot decrypt a password (RSA failed)" << logend;
return false;
}
*/
}
return true;
}
bool ExportInfo::SkipDir(long dir_id, std::wstring & dir)
{
if( system->dirs.MakePath(dir_id, tmp_dir) )
{
if( !tmp_dir.empty() && IsSubString(tmp_dir, dir) )
{
// tmp_dir has a slash at the end
// we want the slash at the beginning
dir.erase(0, tmp_dir.size()-1);
return true;
}
}
return false;
}
void ExportInfo::ResetRecurrenceCheck()
{
recurrence_check.clear();
}
bool ExportInfo::HasRecurrenceId(long id)
{
return (std::find(recurrence_check.begin(), recurrence_check.end(), id) != recurrence_check.end());
}
void ExportInfo::SendFile(const Item & item, bool thumb, bool put_to_recurrence_tab)
{
ExportDir * exp_dir = FindDir(item.parent_id);
if( !exp_dir )
return;
if( HasRecurrenceId(item.id) )
{
log << log1 << "Export: recurrence found on item.id: " << item.id << ", url: " << item.url << " (skipping)" << logend;
return;
}
if( put_to_recurrence_tab )
recurrence_check.push_back(item.id);
msg.Clear();
system->dirs.MakePath(item.parent_id, msg.path);
msg.path += item.url;
if( item.file_type != WINIX_ITEM_FILETYPE_NONE )
{
msg.type = WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC;
if( !system->MakeFilePath(item, msg.url, thumb) )
{
log << log1 << "Export: I cannot create a path to a static file, item id: " << item.id << logend;
return;
}
}
else
{
msg.type = WINIX_PL_EXPORT_TYPE_CREATE_FILE;
msg.url = config->url_proto;
msg.url += config->base_url;// !! IMPROVE ME what about subdomains?
system->dirs.MakePath(item.parent_id, msg.url, false);
msg.url += item.url;
msg.path += L".php"; // !! do konfiga
}
msg.errors = 0;
if( SkipDir(exp_dir->dir_id, msg.path) && edb->GetExport(exp_dir->id, exp) )
{
if( DecodePass(exp) )
{
msg.ftp_login = exp.ftp_login;
msg.ftp_pass = exp.ftp_pass;
msg.ftp_server = exp.ftp_server;
msg.http_server = exp.http_server;
system->dirs.MakePath(exp_dir->dir_id, msg.src_dir);
if( !item.file_path.empty() && thumb ) // !! uzyc file_type
msg.path.insert(0, L"/download"); // !! do konfiga
if( !exp.ftp_dir.empty() )
msg.path.insert(0, exp.ftp_dir);
if( !msg.path.empty() && msg.path[0] != '/' )
msg.path.insert(0, L"/");
export_thread->AddMessage(msg);
}
}
}
void ExportInfo::SendDir(const Item & item)
{
ExportDir * exp_dir = FindDir(item.id);
if( !exp_dir )
return;
if( HasRecurrenceId(item.id) )
{
log << log1 << "Export: recurrence found on item.id: " << item.id << ", url: " << item.url << " (skipping)" << logend;
return;
}
recurrence_check.push_back(item.id);
msg.Clear();
system->dirs.MakePath(item.id, msg.path);
msg.type = WINIX_PL_EXPORT_TYPE_CREATE_FILE;
msg.url = config->url_proto;
msg.url += config->base_url;// !! IMPROVE ME what about subdomains?
system->dirs.MakePath(item.id, msg.url, false);
msg.path += L"index.html"; // !! do konfiga
msg.errors = 0;
if( SkipDir(exp_dir->dir_id, msg.path) && edb->GetExport(exp_dir->id, exp) )
{
if( DecodePass(exp) )
{
msg.ftp_login = exp.ftp_login;
msg.ftp_pass = exp.ftp_pass;
msg.ftp_server = exp.ftp_server;
msg.http_server = exp.http_server;
system->dirs.MakePath(exp_dir->dir_id, msg.src_dir);
if( !exp.ftp_dir.empty() )
msg.path.insert(0, exp.ftp_dir);
if( !msg.path.empty() && msg.path[0] != '/' )
msg.path.insert(0, L"/");
export_thread->AddMessage(msg);
AdditionalExport(item);
}
}
}
void ExportInfo::SendDir(long dir_id)
{
Item * dir = system->dirs.GetDir(dir_id);
if( !dir )
return;
SendDir(*dir);
}
// send all non-static files from a directory
void ExportInfo::SendAllFilesFromDir(long dir_id)
{
iq_dir.SetAll(false, false);
iq_dir.sel_parent_id = true;
iq_dir.sel_url = true;
iq_dir.sel_file = true;
iq_dir.WhereParentId(dir_id);
iq_dir.WhereType(Item::file);
iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
db->GetItems(dir_items, iq_dir);
for(size_t i=0 ; i<dir_items.size() ; ++i)
{
SendFile(dir_items[i]);
}
}
void ExportInfo::AdditionalExport(const Item & item)
{
for(size_t i=0 ; i<item.meta.spaces.size() ; ++i)
{
if( item.meta.spaces[i]->name == L"export" )
AdditionalExport(item, *item.meta.spaces[i]);
}
}
void ExportInfo::AdditionalExport(const Item & item, PT::Space & meta)
{
if( meta.ListText(L"additional_export", additional_export) )
{
for(size_t i=0 ; i<additional_export.size() ; ++i)
{
log << log1 << "exportuje dodatkowo takiego swiniaka: " << additional_export[i] << logend;
AdditionalExport(additional_export[i]);
}
}
}
void ExportInfo::AdditionalExport(const std::wstring & path)
{
int res = system->FollowAllLinks(path, additional_export_dir_tab, additional_export_item);
if( res == 0 )
{
// directory
SendDir(*additional_export_dir_tab.back());
}
else
if( res == 1 )
{
// file
// !! uwaga jesli to bedzie plik statyczny (moze dwa razy uzyc raz false i raz true?)
SendFile(additional_export_item);
}
else
{
log << log1 << "Export: incorrect path for additional export: " << path << logend;
}
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,117 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_export_exportinfo
#define headerfile_winix_plugins_export_exportinfo
#include "core/system.h"
#include "db/db.h"
#include "export.h"
#include "edb.h"
#include "message.h"
#include "exportthread.h"
namespace Winix
{
namespace Export
{
class ExportInfo
{
public:
ExportInfo();
void SetSystem(System * psystem);
void SetConfig(Config * pconfig);
void SetEDb(EDb * pdb);
void SetDb(Db * pdb);
void SetExportThread(ExportThread * pexport_thread);
void ReadExportDirs();
void ReadConfigVars();
ExportDir * FindDir(long dir_id);
bool DecodePass(Export & exp);
void SendFile(const Item & item, bool thumb = false, bool put_to_recurrence_tab = true);
void SendDir(const Item & item);
void SendDir(long dir_id);
void SendAllFilesFromDir(long dir_id);
void ResetRecurrenceCheck();
private:
System * system;
Config * config;
EDb * edb;
Db * db;
ExportThread * export_thread;
bool use_rsa;
std::wstring rsa_key;
std::string pass_decrypted;
Message msg;
Export exp;
std::wstring tmp_dir;
std::vector<ExportDir> export_dirs;
DbItemQuery iq_dir;
std::vector<Item> dir_items;
std::vector<std::wstring> additional_export;
std::vector<Item*> additional_export_dir_tab;
Item additional_export_item;
std::vector<long> recurrence_check;
bool SkipDir(long dir_id, std::wstring & dir);
void AdditionalExport(const Item & item);
void AdditionalExport(const Item & item, PT::Space & meta);
void AdditionalExport(const std::wstring & path);
bool HasRecurrenceId(long id);
};
}
} // namespace Winix
#endif

View File

@@ -0,0 +1,584 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include <cstdio>
#include <cstdlib>
#include <unistd.h>
#include <string.h>
#include "exportthread.h"
#include "core/log.h"
#include "core/misc.h"
#include "utf8/utf8.h"
namespace Winix
{
namespace Export
{
ExportThread * ExportThread::exp_thread;
ExportThread::ExportThread()
{
exp_thread = 0;
browser_name = "Winix Export";
conn_timeout = 5;
conn_max_errors = 3;
}
void ExportThread::SetBaseUrl(const std::wstring & url)
{
// SetBaseUrl() is called before this thread
// is started so we can use 'base_url' later without locking
base_url = url;
}
void ExportThread::AddMessage(const Message & message)
{
message_tab.insert(message_tab.end(), message);
WakeUpThread();
}
// first thread (objects locked)
void ExportThread::AddMessage(int type, const std::wstring & url, const std::wstring & path)
{
message_add_temp.type = type;
message_add_temp.url = url;
message_add_temp.path = path;
AddMessage(message_add_temp);
}
// second thread
// objects are locked
bool ExportThread::SignalReceived()
{
return !message_tab.empty();
}
// second thread
// objects are not locked
void ExportThread::Do()
{
MessageTab::iterator i;
bool end;
Lock();
i = message_tab.begin();
Unlock();
do
{
Lock();
if( i != message_tab.end() )
{
message_work = *i;
Unlock();
DoMessage();
Lock();
// although there was Unlock() used we can use the same iterator 'i' here
// it will *not* be invalidated (MessageTab is a std::list)
// and we are deleting only here
i->errors = message_work.errors;
if( message_work.can_remove )
message_tab.erase(i++);
end = false;
}
else
{
end = true;
}
WaitForSignalSleep(1);
Unlock();
}
while( !end && !IsExitSignal() );
}
// second thread
// objects are not locked
// current message we have in 'message_work'
void ExportThread::DoMessage()
{
bool sent_ok = false;
Convert(message_work.url, url_a);
if( message_work.type == WINIX_PL_EXPORT_TYPE_CREATE_FILE )
{
if( Fetch(url_a.c_str()) )
{
ChangeAdresses(buffer);
if( Put() )
sent_ok = true;
}
}
else
{
if( Put() )
sent_ok = true;
}
if( sent_ok )
{
message_work.can_remove = true;
}
else
{
message_work.errors += 1;
message_work.can_remove = false;
if( message_work.errors > conn_max_errors )
{
message_work.can_remove = true;
Lock();
log << log1 << "Export: too many errors for uploading " << message_work.path << " (skipping)" << logend << logsave;
Unlock();
}
}
}
// second thread
// objects are not locked
bool ExportThread::Fetch(const char * url)
{
Lock();
CURL * curl = curl_easy_init();
Unlock();
if( !curl )
{
Lock();
log << log1 << "Export: I can't use curl" << logend;
Unlock();
return false;
}
error_buf[0] = 0;
exp_thread = this;
buffer.clear();
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, StaticSaveFunction);
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_USERAGENT, browser_name.c_str());
curl_easy_setopt(curl, CURLOPT_TIMEOUT, conn_timeout);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, conn_timeout);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error_buf);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 20);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
if( res != 0 )
{
Lock();
log << log1 << "Export: download failed: " << error_buf << logend << logsave;
Unlock();
return false;
}
return true;
}
size_t ExportThread::StaticSaveFunction(char * ptr, size_t size, size_t nmemb, void *userdata)
{
if( exp_thread )
return exp_thread->SaveFunction(ptr, size, nmemb, userdata);
return 0;
}
size_t ExportThread::SaveFunction(char * ptr, size_t size, size_t nmemb, void *userdata)
{
size_t len = size * nmemb;
if( len > 0 )
buffer.append(ptr, len);
return len;
}
// second thread
// objects are not locked
void ExportThread::Convert(const std::wstring & in, std::string & out, bool clear)
{
Lock();
PT::WideToUTF8(in, out, clear);
Unlock();
}
// second thread
// objects are not locked
bool ExportThread::Put()
{
FILE * file = 0;
if( message_work.type == WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC )
{
Convert(message_work.url, local_path);
file = fopen(local_path.c_str(), "r");
if( !file )
{
Lock();
log << log1 << "Export: I cannot open the file: " << local_path << logend;
Unlock();
return false;
}
else
{
log << log3 << "Export: sending a static file: " << local_path << logend;
}
}
Lock();
CURL * curl = curl_easy_init();
Unlock();
if( !curl )
{
Lock();
log << log1 << "Export: I can't use curl (sending)" << logend;
Unlock();
if( file )
fclose(file);
return false;
}
exp_thread = this;
error_buf[0] = 0;
buffer_read_index = 0;
ftp_server = "ftp://";
Convert(message_work.ftp_server, ftp_server, false);
Convert(message_work.path, ftp_server, false);
Convert(message_work.ftp_login, ftp_login);
Convert(message_work.ftp_pass, ftp_pass);
curl_easy_setopt(curl, CURLOPT_URL, ftp_server.c_str());
curl_easy_setopt(curl, CURLOPT_USERNAME, ftp_login.c_str());
curl_easy_setopt(curl, CURLOPT_PASSWORD, ftp_pass.c_str());
curl_easy_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS, 2);
curl_easy_setopt(curl, CURLOPT_USERAGENT, browser_name.c_str());
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
curl_easy_setopt(curl, CURLOPT_FTP_RESPONSE_TIMEOUT, conn_timeout);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, error_buf);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
if( file )
{
curl_easy_setopt(curl, CURLOPT_READDATA, file);
}
else
{
curl_easy_setopt(curl, CURLOPT_READFUNCTION, StaticReadFunction);
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buffer.size());
}
CURLcode res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
if( file )
fclose(file);
if( res != 0 )
{
Lock();
log << log1 << "Export: upload failed: " << error_buf << " (" << ftp_server << ")" << logend << logsave;
Unlock();
return false;
}
else
{
Lock();
log << log2 << "Export: uploaded: " << ftp_server << logend << logsave;
Unlock();
}
return true;
}
size_t ExportThread::StaticReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata)
{
if( exp_thread )
return exp_thread->ReadFunction(ptr, size, nmemb, userdata);
return 0;
}
size_t ExportThread::ReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata)
{
size_t max_len = size * nmemb;
size_t i;
for(i=0 ; i<max_len && buffer_read_index < buffer.size() ; ++i, ++buffer_read_index )
{
ptr[i] = buffer[buffer_read_index];
}
return i;
}
// second thread
// objects locked
bool ExportThread::HasThumbInAdress(std::string & buf, size_t i)
{
const char * thumb1 = "/-/thumb";
const char * thumb2 = "/download/thumb";
size_t len1 = strlen(thumb1);
size_t len2 = strlen(thumb2);
for( ; i<buf.size() ; ++i)
{
if( IsSubStringp(thumb1, &buf[i]) )
{
buf.erase(i, len1);
return true;
}
if( IsSubStringp(thumb2, &buf[i]) )
{
buf.erase(i, len2);
return true;
}
if( buf[i] == 10 || buf[i] == '"' || buf[i] == ' ' || buf[i] == '\t' ||
buf[i] == '>' ||buf[i] == '<' )
{
return false;
}
}
return false;
}
// second thread
// objects locked
void ExportThread::ChangeAdressesThumb(std::string & buf, const char * http_prefix)
{
look_for_url = http_prefix;
Convert(base_url, look_for_url, false);
Convert(message_work.src_dir, look_for_url, false);
for(size_t i=0 ; i<buf.size() ; ++i)
{
if( IsSubStringp(look_for_url.c_str(), &buf[i]) )
{
i += look_for_url.size() - 1; // without skipping the last slash
if( HasThumbInAdress(buf, i) )
{
if( i <= buf.size() )
buf.insert(i, "/download"); //!! do konfiga (prefiks katalogu z miniaturami na serwerze docelowym)
}
}
}
}
// second thread
// objects not locked
void ExportThread::ChangeAdressesThumb(std::string & buf)
{
Lock();
ChangeAdressesThumb(buf, "http://");
ChangeAdressesThumb(buf, "https://");
Unlock();
}
// second thread
// objects locked
void ExportThread::ChangeLogStrings()
{
log << log3 << "Export: changing string: |" << look_for_url << "|, to: |" << repl_url << "|" << logend;
}
// second thread
// objects locked
void ExportThread::ChangeBaseAdress(std::string & buf,
const char * http_prefix, const char * dir_prefix, const char * dir_postfix,
const char * repl_dir_postfix, bool skip_dir_last_slash)
{
look_for_url = http_prefix;
Convert(base_url, look_for_url, false);
look_for_url += dir_prefix;
Convert(message_work.src_dir, look_for_url, false);
if( skip_dir_last_slash )
NoLastSlash(look_for_url);
look_for_url += dir_postfix;
Convert(message_work.http_server, repl_url);
repl_url += repl_dir_postfix;
ChangeLogStrings();
ReplaceString(buf, look_for_url, repl_url);
}
// second thread
// objects not locked
void ExportThread::ChangeBaseAdress(std::string & buf,
const char * dir_prefix, const char * dir_postfix,
const char * repl_dir_postfix, bool skip_dir_last_slash)
{
Lock();
ChangeBaseAdress(buf, "http://", dir_prefix, dir_postfix, repl_dir_postfix, skip_dir_last_slash);
ChangeBaseAdress(buf, "https://", dir_prefix, dir_postfix, repl_dir_postfix, skip_dir_last_slash);
Unlock();
}
// second thread
// objects not locked
void ExportThread::ChangeSiteNames(std::string & buf)
{
Lock();
// changing:
// /sitename/ -> /
Convert(message_work.src_dir, look_for_url);
repl_url = '/';
ChangeLogStrings();
ReplaceString(buf, look_for_url, repl_url);
// changing:
// /sitename" -> /"
NoLastSlash(look_for_url);
look_for_url += '\"';
repl_url = "/\"";
ChangeLogStrings();
ReplaceString(buf, look_for_url, repl_url);
Unlock();
}
// second thread
// objects not locked
void ExportThread::ChangeAdresses(std::string & buf)
{
// http:// in sources here means either http:// or https://
// changing:
// http://domain.tld/sitename/[...]/file.jpg/-/thumb -> http://otherdomain.tld/download/[...]/file.jpg
// http://domain.tld/sitename/[...]/file.jpg/download/thumb -> http://otherdomain.tld/download/[...]/file.jpg
ChangeAdressesThumb(buf);
// changing:
// http://domain.tld/static/sitename/ -> http://otherdomain.tld/static/
ChangeBaseAdress(buf, "/static", "", "/static/");
// changing:
// http://domain.tld/common/sitename/ -> http://otherdomain.tld/common/
//ChangeAdresss(buf, "/common", "", "/common/");
// changing:
// http://domain.tld/sitename/ -> http://otherdomain.tld/
ChangeBaseAdress(buf, "", "", "/");
// changing:
// http://domain.tld/sitename" -> http://otherdomain.tld"
ChangeBaseAdress(buf, "", "\"", "\"", true);
// changing:
// /sitename/ -> /
// /sitename" -> /"
ChangeSiteNames(buf);
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,123 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_export_exportthread
#define headerfile_winix_plugins_export_exportthread
#include <vector>
#include <list>
#include <curl/curl.h>
#include "core/basethread.h"
#include "message.h"
namespace Winix
{
namespace Export
{
class ExportThread : public BaseThread
{
public:
ExportThread();
void SetBaseUrl(const std::wstring & url);
void AddMessage(const Message & message);
void AddMessage(int type, const std::wstring & url, const std::wstring & path);
private:
typedef std::list<Message> MessageTab;
MessageTab message_tab;
Message message_add_temp;
Message message_work; // a message used by the second thread
static ExportThread * exp_thread;
std::string url_a;
std::string buffer;
size_t buffer_read_index;
std::wstring base_url;
std::string browser_name;
std::string ftp_server;
std::string ftp_login;
std::string ftp_pass;
char error_buf[CURL_ERROR_SIZE];
int conn_timeout; // timeout in seconds
int conn_max_errors; // maximum errors (if there are more then a message is treated as undeliverable)
std::string look_for_url;
std::string repl_url;
std::string local_path;
virtual bool SignalReceived();
virtual void Do();
void DoMessage();
bool Fetch(const char * url);
bool Put();
static size_t StaticSaveFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
size_t SaveFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
static size_t StaticReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
size_t ReadFunction(char * ptr, size_t size, size_t nmemb, void *userdata);
void Convert(const std::wstring & in, std::string & out, bool clear = true);
void ChangeAdresses(std::string & buf);
bool HasThumbInAdress(std::string & buf, size_t i);
void ChangeAdressesThumb(std::string & buf, const char * http_prefix);
void ChangeAdressesThumb(std::string & buf);
void ChangeLogStrings();
void ChangeBaseAdress(std::string & buf,
const char * http_prefix, const char * dir_prefix, const char * dir_postfix,
const char * repl_dir_postfix, bool skip_dir_last_slash = false);
void ChangeBaseAdress(std::string & buf,
const char * dir_prefix, const char * dir_postfix,
const char * repl_dir_postfix, bool skip_dir_last_slash = false);
void ChangeSiteNames(std::string & buf);
};
} // namespace
} // namespace Winix
#endif

View File

@@ -0,0 +1,151 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "funexport.h"
namespace Winix
{
namespace Export
{
FunExport::FunExport()
{
fun.url = L"export";
}
void FunExport::SetExportInfo(ExportInfo * pexport_info)
{
export_info = pexport_info;
}
bool FunExport::HasAccess()
{
// temporarily only a logged user can use this function
// !! IMPROVEME we have to change to only some users can use this function in a specified directory
return cur->session->puser;
}
void FunExport::ExportFile(const Item & item)
{
log << log4 << "Export: exporting file: url: " << item.url << ", id: " << item.id << logend;
if( item.file_type == WINIX_ITEM_FILETYPE_NONE )
{
export_info->SendFile(item, false, true);
}
else
{
export_info->SendFile(item, false, false);
export_info->SendFile(item, true, true);
}
}
void FunExport::ExportDir(const Item & dir, bool static_files_too)
{
export_info->SendDir(dir);
log << log4 << "Export: exporting directory: url: " << dir.url << ", id: " << dir.id << logend;
iq_dir.SetAll(false, false);
iq_dir.sel_parent_id = true;
iq_dir.sel_url = true;
iq_dir.sel_file = true;
iq_dir.WhereParentId(dir.id);
iq_dir.WhereType(Item::file);
if( !static_files_too )
iq_dir.WhereFileType(WINIX_ITEM_FILETYPE_NONE);
db->GetItems(dir_items, iq_dir);
for(size_t i=0 ; i<dir_items.size() ; ++i)
{
ExportFile(dir_items[i]);
}
DirContainer::ParentIterator i = system->dirs.FindFirstChild(dir.id);
for( ; i != system->dirs.ParentEnd() ; i = system->dirs.NextChild(i) )
{
ExportDir(*i->second, static_files_too);
}
}
void FunExport::Export()
{
export_info->ResetRecurrenceCheck();
bool static_files_too = cur->request->IsPostVar(L"staticfilestoo");
if( cur->request->is_item )
ExportFile(cur->request->item);
else
ExportDir(*cur->request->dir_tab.back(), static_files_too);
}
void FunExport::MakePost()
{
Export();
}
void FunExport::MakeGet()
{
// if( cur->request->IsParam(L"noconfirm") )
// Export();
}
} // namespace
} // namespace Winix

View File

@@ -0,0 +1,84 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2012-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_export_funexport
#define headerfile_winix_plugins_export_funexport
#include "functions/functionbase.h"
#include "db/db.h"
#include "exportinfo.h"
namespace Winix
{
namespace Export
{
class FunExport : public FunctionBase
{
public:
FunExport();
void SetExportInfo(ExportInfo * pexport_info);
bool HasAccess();
void MakePost();
void MakeGet();
void ExportFile(const Item & item);
void ExportDir(const Item & dir, bool static_files_too = false);
private:
ExportInfo * export_info;
DbItemQuery iq_dir;
std::vector<Item> dir_items;
void Export();
};
} // namespace
} // namespace Winix
#endif

View File

@@ -0,0 +1,297 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "core/log.h"
#include "core/plugin.h"
#include "exportthread.h"
#include "exportinfo.h"
#include "edb.h"
#include "funexport.h"
namespace Winix
{
extern "C" void Init(PluginInfo &);
namespace Export
{
const wchar_t plugin_name[] = L"export";
int mount_par_export_conf = -1;
ExportThread export_thread;
EDb edb;
ExportInfo export_info;
FunExport fun_export;
void AddWinixFunctions(PluginInfo & info)
{
info.functions->Add(fun_export);
}
void AddMountParams(PluginInfo & info)
{
using TemplatesFunctions::system;
mount_par_export_conf = system->mounts.AddMountPar(L"export_conf");
}
void FstabChanged(PluginInfo & info)
{
}
void InitPlugin(PluginInfo & info)
{
export_thread.SetBaseUrl(info.config->base_url);
info.system->thread_manager.Add(&export_thread, L"export");
export_info.ReadExportDirs();
}
void SendDir(PluginInfo & info)
{
const Item * dir = reinterpret_cast<Item*>(info.p1);
if( dir )
{
export_info.ResetRecurrenceCheck();
export_info.SendDir(*dir);
export_info.SendAllFilesFromDir(dir->id);
}
}
void SendFileAdded(PluginInfo & info)
{
const Item * item = reinterpret_cast<Item*>(info.p1);
if( item )
{
if( item->file_type == WINIX_ITEM_FILETYPE_IMAGE && info.config->image_resize )
{
// there'll be a next message WINIX_IMAGE_RESIZED
log << log4 << "Export: image will be resized, waiting..." << logend;
}
else
{
export_info.ResetRecurrenceCheck();
export_info.SendFile(*item);
export_info.SendDir(item->parent_id);
if( item->file_type == WINIX_ITEM_FILETYPE_NONE )
export_info.SendAllFilesFromDir(item->parent_id);
}
}
}
void SendFileChanged(PluginInfo & info)
{
const Item * item = reinterpret_cast<Item*>(info.p1);
if( item )
{
export_info.ResetRecurrenceCheck();
export_info.SendFile(*item);
export_info.SendDir(item->parent_id);
if( item->file_type == WINIX_ITEM_FILETYPE_NONE )
export_info.SendAllFilesFromDir(item->parent_id);
}
}
void SendFileCopied(PluginInfo & info)
{
const Item * item = reinterpret_cast<Item*>(info.p1);
if( item )
{
export_info.ResetRecurrenceCheck();
export_info.SendDir(item->parent_id);
if( item->file_type == WINIX_ITEM_FILETYPE_NONE )
{
export_info.SendAllFilesFromDir(item->parent_id);
}
else
{
export_info.SendFile(*item);
export_info.SendFile(*item, true);
}
}
}
void SendFileResized(PluginInfo & info)
{
const Item * item = reinterpret_cast<Item*>(info.p1);
if( item )
{
export_info.ResetRecurrenceCheck();
export_info.SendFile(*item);
export_info.SendDir(item->parent_id);
}
}
void SendFileThumb(PluginInfo & info)
{
const Item * item = reinterpret_cast<Item*>(info.p1);
if( item )
{
export_info.ResetRecurrenceCheck();
export_info.SendFile(*item, true);
export_info.SendDir(item->parent_id);
}
}
void SendFilePrepareMove(PluginInfo & info)
{
const Item * item = reinterpret_cast<Item*>(info.p1);
if( item )
{
if( item->file_type == WINIX_ITEM_FILETYPE_NONE )
{
export_info.ResetRecurrenceCheck();
export_info.SendAllFilesFromDir(item->parent_id);
}
}
}
void FileRemoved(PluginInfo & info)
{
const Item * item = reinterpret_cast<Item*>(info.p1);
if( item )
{
export_info.ResetRecurrenceCheck();
export_info.SendDir(item->parent_id);
if( item->file_type == WINIX_ITEM_FILETYPE_NONE )
export_info.SendAllFilesFromDir(item->parent_id);
}
}
void ProcessRequest(PluginInfo & info)
{
if( info.cur->request->function == &info.functions->fun_reload )
{
if( info.cur->request->IsParam(L"export") )
export_info.ReadExportDirs();
}
}
void AddEzcFunctions(PluginInfo & info);
} // namespace
void Init(PluginInfo & info)
{
using namespace Export;
edb.SetConn(info.db->GetConn());
edb.LogQueries(info.config->log_db_query);
edb.SetDirs(&info.system->dirs);
export_info.SetSystem(info.system);
export_info.SetConfig(info.config);
export_info.SetEDb(&edb);
export_info.SetDb(info.db);
export_info.SetExportThread(&export_thread);
fun_export.SetExportInfo(&export_info);
// plugin.Assign(WINIX_TEMPLATES_CREATEFUNCTIONS, AddEzcFunctions);
plugin.Assign(WINIX_ADD_MOUNTS, AddMountParams);
// plugin.Assign(WINIX_FSTAB_CHANGED, FstabChanged);
plugin.Assign(WINIX_CREATE_FUNCTIONS, AddWinixFunctions);
plugin.Assign(WINIX_FILE_ADDED, SendFileAdded);
plugin.Assign(WINIX_FILE_CHANGED, SendFileChanged);
plugin.Assign(WINIX_CREATED_THUMB, SendFileThumb);
plugin.Assign(WINIX_IMAGE_RESIZED, SendFileResized);
plugin.Assign(WINIX_FILE_PREPARE_TO_MOVE, SendFilePrepareMove);
plugin.Assign(WINIX_FILE_MOVED, SendFileCopied);
plugin.Assign(WINIX_FILE_COPIED, SendFileCopied);
plugin.Assign(WINIX_DIR_CONTENT_SORTED, SendDir);
plugin.Assign(WINIX_FILE_REMOVED, FileRemoved);
plugin.Assign(WINIX_PROCESS_REQUEST, ProcessRequest);
plugin.Assign(WINIX_PLUGIN_INIT, InitPlugin);
info.p1 = (void*)(plugin_name);
}
} // namespace Winix

View File

@@ -0,0 +1,103 @@
/*
* This file is a part of Winix
* and is distributed under the 2-Clause BSD licence.
* Author: Tomasz Sowa <t.sowa@ttmath.org>
*/
/*
* Copyright (c) 2011-2014, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef headerfile_winix_plugins_export_message
#define headerfile_winix_plugins_export_message
#include <string>
namespace Winix
{
// message types
#define WINIX_PL_EXPORT_TYPE_CREATE_FILE 1
#define WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC 2
struct Message
{
// message type
int type;
// original (source) url (if message is WINIX_PL_EXPORT_TYPE_CREATE_FILE)
// or a file path (WINIX_PL_EXPORT_TYPE_CREATE_FILE_STATIC)
std::wstring url;
// source directory
std::wstring src_dir;
// output file (directory) name
// relative path
// with a slash at the beginning (and at the end if it is a directory)
std::wstring path;
std::wstring ftp_server;
std::wstring ftp_login;
std::wstring ftp_pass;
// server on which the site will be visible
std::wstring http_server;
// how many errors were with this message
int errors;
// shoud be removed
bool can_remove;
void Clear()
{
type = 0;
errors = 0;
can_remove = true;
url.clear();
src_dir.clear();
path.clear();
ftp_server.clear();
ftp_login.clear();
ftp_pass.clear();
http_server.clear();
}
};
} // namespace Winix
#endif

View File

@@ -0,0 +1,28 @@
include Makefile.o.dep
name = gallery.so
all: $(name)
$(name): $(o)
$(CXX) -shared -Wl,-soname,$(name) -o $(name) $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) $(LDFLAGS) *.o
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(CXXWINIXINCLUDEFLAGS) $<
depend:
makedepend -Y. $(CXXWINIXINCLUDEFLAGS) -f- *.cpp > Makefile.dep
echo -n "o = " > Makefile.o.dep
ls -1 *.cpp | xargs -I foo echo -n foo " " | sed -E "s/([^\.]*)\.cpp[ ]/\1\.o/g" >> Makefile.o.dep
clean:
rm -f *.o
rm -f *.so
rm -f $(name)
include Makefile.dep

View File

@@ -0,0 +1,252 @@
# DO NOT DELETE
gallery.o: gallery.h ../../../winix/functions/functionbase.h
gallery.o: ../../../winix/core/item.h ../../../pikotools/space/space.h
gallery.o: ../../../pikotools/textstream/types.h
gallery.o: ../../../pikotools/date/date.h ../../../winix/db/db.h
gallery.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
gallery.o: ../../../winix/db/dbtextstream.h ../../../winix/core/textstream.h
gallery.o: ../../../winix/core/misc.h ../../../winix/core/item.h
gallery.o: ../../../winix/core/requesttypes.h
gallery.o: ../../../pikotools/textstream/textstream.h
gallery.o: ../../../pikotools/convert/convert.h
gallery.o: ../../../pikotools/convert/inttostr.h
gallery.o: ../../../pikotools/membuffer/membuffer.h
gallery.o: ../../../pikotools/textstream/types.h
gallery.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
gallery.o: ../../../winix/core/error.h ../../../pikotools/space/spaceparser.h
gallery.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
gallery.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
gallery.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
gallery.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
gallery.o: ../../../winix/core/textstream.h
gallery.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
gallery.o: ../../../winix/core/cur.h ../../../winix/core/request.h
gallery.o: ../../../winix/core/error.h ../../../winix/core/config.h
gallery.o: ../../../winix/core/htmlfilter.h
gallery.o: ../../../winix/templates/htmltextstream.h
gallery.o: ../../../pikotools/space/spacetojson.h
gallery.o: ../../../ezc/src/outstreams.h ../../../winix/core/session.h
gallery.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
gallery.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
gallery.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
gallery.o: ../../../winix/core/request.h ../../../winix/core/config.h
gallery.o: ../../../winix/core/system.h ../../../winix/core/job.h
gallery.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
gallery.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
gallery.o: ../../../winix/notify/notify.h ../../../winix/notify/notifypool.h
gallery.o: ../../../winix/templates/patterns.h
gallery.o: ../../../winix/templates/locale.h
gallery.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
gallery.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
gallery.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
gallery.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
gallery.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
gallery.o: ../../../winix/notify/notifythread.h
gallery.o: ../../../winix/core/basethread.h
gallery.o: ../../../winix/notify/templatesnotify.h
gallery.o: ../../../winix/core/users.h ../../../winix/core/ugcontainer.h
gallery.o: ../../../winix/core/lastcontainer.h ../../../winix/core/mounts.h
gallery.o: ../../../winix/core/mountparser.h ../../../winix/core/crypt.h
gallery.o: ../../../winix/core/run.h ../../../winix/core/users.h
gallery.o: ../../../winix/core/groups.h ../../../winix/core/group.h
gallery.o: ../../../winix/core/loadavg.h ../../../winix/core/image.h
gallery.o: ../../../winix/core/threadmanager.h
gallery.o: ../../../winix/core/timezones.h ../../../winix/core/timezone.h
gallery.o: ../../../winix/core/synchro.h galleryinfo.h
galleryinfo.o: galleryinfo.h ../../../winix/core/item.h
galleryinfo.o: ../../../pikotools/space/space.h
galleryinfo.o: ../../../pikotools/textstream/types.h
galleryinfo.o: ../../../pikotools/date/date.h
init.o: gallery.h ../../../winix/functions/functionbase.h
init.o: ../../../winix/core/item.h ../../../pikotools/space/space.h
init.o: ../../../pikotools/textstream/types.h ../../../pikotools/date/date.h
init.o: ../../../winix/db/db.h ../../../winix/db/dbbase.h
init.o: ../../../winix/db/dbconn.h ../../../winix/db/dbtextstream.h
init.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
init.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
init.o: ../../../pikotools/textstream/textstream.h
init.o: ../../../pikotools/convert/convert.h
init.o: ../../../pikotools/convert/inttostr.h
init.o: ../../../pikotools/membuffer/membuffer.h
init.o: ../../../pikotools/textstream/types.h ../../../pikotools/utf8/utf8.h
init.o: ../../../winix/core/winix_const.h ../../../winix/core/error.h
init.o: ../../../pikotools/space/spaceparser.h
init.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
init.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
init.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
init.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
init.o: ../../../winix/core/textstream.h
init.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
init.o: ../../../winix/core/cur.h ../../../winix/core/request.h
init.o: ../../../winix/core/error.h ../../../winix/core/config.h
init.o: ../../../winix/core/htmlfilter.h
init.o: ../../../winix/templates/htmltextstream.h
init.o: ../../../pikotools/space/spacetojson.h ../../../ezc/src/outstreams.h
init.o: ../../../winix/core/session.h ../../../winix/core/user.h
init.o: ../../../winix/core/plugindata.h ../../../winix/core/rebus.h
init.o: ../../../winix/core/ipban.h ../../../winix/core/mount.h
init.o: ../../../winix/templates/locale.h ../../../winix/core/request.h
init.o: ../../../winix/core/config.h ../../../winix/core/system.h
init.o: ../../../winix/core/job.h ../../../winix/core/basethread.h
init.o: ../../../winix/core/synchro.h ../../../winix/core/dirs.h
init.o: ../../../winix/core/dircontainer.h ../../../winix/notify/notify.h
init.o: ../../../winix/notify/notifypool.h
init.o: ../../../winix/templates/patterns.h ../../../winix/templates/locale.h
init.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
init.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
init.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
init.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
init.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
init.o: ../../../winix/notify/notifythread.h ../../../winix/core/basethread.h
init.o: ../../../winix/notify/templatesnotify.h ../../../winix/core/users.h
init.o: ../../../winix/core/ugcontainer.h ../../../winix/core/lastcontainer.h
init.o: ../../../winix/core/mounts.h ../../../winix/core/mountparser.h
init.o: ../../../winix/core/crypt.h ../../../winix/core/run.h
init.o: ../../../winix/core/users.h ../../../winix/core/groups.h
init.o: ../../../winix/core/group.h ../../../winix/core/loadavg.h
init.o: ../../../winix/core/image.h ../../../winix/core/threadmanager.h
init.o: ../../../winix/core/timezones.h ../../../winix/core/timezone.h
init.o: ../../../winix/core/synchro.h galleryinfo.h ../../../winix/core/log.h
init.o: ../../../winix/core/plugin.h ../../../winix/core/pluginmsg.h
init.o: ../../../winix/core/system.h ../../../winix/core/sessionmanager.h
init.o: ../../../winix/core/sessioncontainer.h
init.o: ../../../winix/core/ipbancontainer.h
init.o: ../../../winix/core/sessionidmanager.h ../../../tito/src/base64.h
init.o: ../../../tito/src/aes.h ../../../winix/functions/functions.h
init.o: ../../../winix/functions/functionbase.h
init.o: ../../../winix/functions/functionparser.h ../../../winix/core/cur.h
init.o: ../../../winix/functions/account.h ../../../winix/functions/adduser.h
init.o: ../../../winix/functions/cat.h ../../../winix/functions/chmod.h
init.o: ../../../winix/functions/privchanger.h
init.o: ../../../winix/functions/chown.h ../../../winix/functions/ckeditor.h
init.o: ../../../winix/functions/cp.h ../../../winix/functions/default.h
init.o: ../../../winix/functions/download.h ../../../winix/functions/emacs.h
init.o: ../../../winix/functions/env.h ../../../winix/functions/imgcrop.h
init.o: ../../../winix/functions/last.h ../../../winix/functions/login.h
init.o: ../../../winix/functions/logout.h ../../../winix/functions/ln.h
init.o: ../../../winix/functions/ls.h ../../../winix/functions/man.h
init.o: ../../../winix/functions/meta.h ../../../winix/functions/mkdir.h
init.o: ../../../winix/functions/mv.h ../../../winix/functions/nicedit.h
init.o: ../../../winix/functions/node.h ../../../winix/functions/passwd.h
init.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
init.o: ../../../winix/functions/reload.h ../../../winix/functions/rm.h
init.o: ../../../winix/functions/rmuser.h ../../../winix/functions/sort.h
init.o: ../../../winix/functions/specialdefault.h
init.o: ../../../winix/functions/stat.h ../../../winix/functions/subject.h
init.o: ../../../winix/functions/template.h
init.o: ../../../winix/functions/tinymce.h ../../../winix/functions/uname.h
init.o: ../../../winix/functions/upload.h ../../../winix/functions/uptime.h
init.o: ../../../winix/functions/who.h ../../../winix/functions/vim.h
init.o: ../../../winix/core/htmlfilter.h ../../../winix/templates/templates.h
init.o: ../../../winix/templates/patterncacher.h
init.o: ../../../winix/templates/indexpatterns.h
init.o: ../../../winix/templates/patterns.h
init.o: ../../../winix/templates/changepatterns.h
init.o: ../../../winix/templates/htmltextstream.h
init.o: ../../../winix/core/sessionmanager.h
templates.o: gallery.h ../../../winix/functions/functionbase.h
templates.o: ../../../winix/core/item.h ../../../pikotools/space/space.h
templates.o: ../../../pikotools/textstream/types.h
templates.o: ../../../pikotools/date/date.h ../../../winix/db/db.h
templates.o: ../../../winix/db/dbbase.h ../../../winix/db/dbconn.h
templates.o: ../../../winix/db/dbtextstream.h
templates.o: ../../../winix/core/textstream.h ../../../winix/core/misc.h
templates.o: ../../../winix/core/item.h ../../../winix/core/requesttypes.h
templates.o: ../../../pikotools/textstream/textstream.h
templates.o: ../../../pikotools/convert/convert.h
templates.o: ../../../pikotools/convert/inttostr.h
templates.o: ../../../pikotools/membuffer/membuffer.h
templates.o: ../../../pikotools/textstream/types.h
templates.o: ../../../pikotools/utf8/utf8.h ../../../winix/core/winix_const.h
templates.o: ../../../winix/core/error.h
templates.o: ../../../pikotools/space/spaceparser.h
templates.o: ../../../pikotools/space/space.h ../../../winix/db/dbitemquery.h
templates.o: ../../../winix/db/dbitemcolumns.h ../../../winix/core/user.h
templates.o: ../../../winix/core/group.h ../../../winix/core/dircontainer.h
templates.o: ../../../winix/core/ugcontainer.h ../../../winix/core/log.h
templates.o: ../../../winix/core/textstream.h
templates.o: ../../../winix/core/logmanipulators.h ../../../winix/core/slog.h
templates.o: ../../../winix/core/cur.h ../../../winix/core/request.h
templates.o: ../../../winix/core/error.h ../../../winix/core/config.h
templates.o: ../../../winix/core/htmlfilter.h
templates.o: ../../../winix/templates/htmltextstream.h
templates.o: ../../../pikotools/space/spacetojson.h
templates.o: ../../../ezc/src/outstreams.h ../../../winix/core/session.h
templates.o: ../../../winix/core/user.h ../../../winix/core/plugindata.h
templates.o: ../../../winix/core/rebus.h ../../../winix/core/ipban.h
templates.o: ../../../winix/core/mount.h ../../../winix/templates/locale.h
templates.o: ../../../winix/core/request.h ../../../winix/core/config.h
templates.o: ../../../winix/core/system.h ../../../winix/core/job.h
templates.o: ../../../winix/core/basethread.h ../../../winix/core/synchro.h
templates.o: ../../../winix/core/dirs.h ../../../winix/core/dircontainer.h
templates.o: ../../../winix/notify/notify.h
templates.o: ../../../winix/notify/notifypool.h
templates.o: ../../../winix/templates/patterns.h
templates.o: ../../../winix/templates/locale.h
templates.o: ../../../winix/templates/localefilter.h ../../../ezc/src/ezc.h
templates.o: ../../../ezc/src/generator.h ../../../ezc/src/blocks.h
templates.o: ../../../ezc/src/cache.h ../../../ezc/src/functions.h
templates.o: ../../../ezc/src/funinfo.h ../../../ezc/src/objects.h
templates.o: ../../../ezc/src/pattern.h ../../../ezc/src/patternparser.h
templates.o: ../../../winix/notify/notifythread.h
templates.o: ../../../winix/core/basethread.h
templates.o: ../../../winix/notify/templatesnotify.h
templates.o: ../../../winix/core/users.h ../../../winix/core/ugcontainer.h
templates.o: ../../../winix/core/lastcontainer.h ../../../winix/core/mounts.h
templates.o: ../../../winix/core/mountparser.h ../../../winix/core/crypt.h
templates.o: ../../../winix/core/run.h ../../../winix/core/users.h
templates.o: ../../../winix/core/groups.h ../../../winix/core/group.h
templates.o: ../../../winix/core/loadavg.h ../../../winix/core/image.h
templates.o: ../../../winix/core/threadmanager.h
templates.o: ../../../winix/core/timezones.h ../../../winix/core/timezone.h
templates.o: ../../../winix/core/synchro.h galleryinfo.h
templates.o: ../../../winix/core/misc.h ../../../winix/core/plugin.h
templates.o: ../../../winix/core/pluginmsg.h ../../../winix/core/system.h
templates.o: ../../../winix/core/sessionmanager.h
templates.o: ../../../winix/core/sessioncontainer.h
templates.o: ../../../winix/core/ipbancontainer.h
templates.o: ../../../winix/core/sessionidmanager.h
templates.o: ../../../tito/src/base64.h ../../../tito/src/aes.h
templates.o: ../../../winix/functions/functions.h
templates.o: ../../../winix/functions/functionbase.h
templates.o: ../../../winix/functions/functionparser.h
templates.o: ../../../winix/core/cur.h ../../../winix/functions/account.h
templates.o: ../../../winix/functions/adduser.h
templates.o: ../../../winix/functions/cat.h ../../../winix/functions/chmod.h
templates.o: ../../../winix/functions/privchanger.h
templates.o: ../../../winix/functions/chown.h
templates.o: ../../../winix/functions/ckeditor.h
templates.o: ../../../winix/functions/cp.h ../../../winix/functions/default.h
templates.o: ../../../winix/functions/download.h
templates.o: ../../../winix/functions/emacs.h ../../../winix/functions/env.h
templates.o: ../../../winix/functions/imgcrop.h
templates.o: ../../../winix/functions/last.h ../../../winix/functions/login.h
templates.o: ../../../winix/functions/logout.h ../../../winix/functions/ln.h
templates.o: ../../../winix/functions/ls.h ../../../winix/functions/man.h
templates.o: ../../../winix/functions/meta.h ../../../winix/functions/mkdir.h
templates.o: ../../../winix/functions/mv.h ../../../winix/functions/nicedit.h
templates.o: ../../../winix/functions/node.h
templates.o: ../../../winix/functions/passwd.h
templates.o: ../../../winix/functions/priv.h ../../../winix/functions/pw.h
templates.o: ../../../winix/functions/reload.h ../../../winix/functions/rm.h
templates.o: ../../../winix/functions/rmuser.h
templates.o: ../../../winix/functions/sort.h
templates.o: ../../../winix/functions/specialdefault.h
templates.o: ../../../winix/functions/stat.h
templates.o: ../../../winix/functions/subject.h
templates.o: ../../../winix/functions/template.h
templates.o: ../../../winix/functions/tinymce.h
templates.o: ../../../winix/functions/uname.h
templates.o: ../../../winix/functions/upload.h
templates.o: ../../../winix/functions/uptime.h ../../../winix/functions/who.h
templates.o: ../../../winix/functions/vim.h ../../../winix/core/htmlfilter.h
templates.o: ../../../winix/templates/templates.h
templates.o: ../../../winix/templates/patterncacher.h
templates.o: ../../../winix/templates/indexpatterns.h
templates.o: ../../../winix/templates/patterns.h
templates.o: ../../../winix/templates/changepatterns.h
templates.o: ../../../winix/templates/htmltextstream.h
templates.o: ../../../winix/core/sessionmanager.h
templates.o: ../../../winix/templates/miscspace.h
templates.o: ../../../winix/templates/templates.h

View File

@@ -0,0 +1 @@
o = gallery.o galleryinfo.o init.o templates.o

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