Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 161 lines (153 sloc) 7.014 kb
62171ed @philfree add the license information
authored
1 <?php
2 /**COPYRIGHTS**/
3 // Copyright 2008 - 2010 all rights reserved, SQLFusion LLC, info@sqlfusion.com
4 /**COPYRIGHTS**/
5
6 $pageTitle = 'Ofuz :: Share Notes and Files';
7 $Author = 'SQLFusion LLC';
8 $Keywords = 'Keywords for search engine';
9 $Description = 'Description for search engine';
10 $background_color = 'white';
11 include_once('config.php');
12 include_once('includes/ofuz_check_access.script.inc.php');
13 include_once('includes/header.inc.php');
14
15 //$do_notes = new ContactNotes($GLOBALS['conx']);
16 $do_contact = new Contact($GLOBALS['conx']);
17 //$do_company = new Company($GLOBALS['conx']);
18 //$do_task = new Task($GLOBALS['conx']);
19 //$do_task_category = new TaskCategory($GLOBALS['conx']);
20 //$do_contact_task = new Contact();
21
22 if (is_object($_SESSION["eDetail_contact"])) {
23 $idcontact = $_SESSION["eDetail_contact"]->getparam("idcontact");
24 } elseif (isset($_GET['id'])) {
25 $idcontact = $_GET['id'];
26 } elseif($do_contact->idcontact){
27 $idcontact = $do_contact->idcontact;
28 } elseif(is_object($_SESSION['ContactEditSave'])) {
29 $idcontact = $_SESSION['ContactEditSave']->idcontact;
30 }
31 $do_contact->getContactDetails($idcontact);
32
33 if (!is_object($_SESSION['do_sharenotes'])) {
34 $do_contact_notes = new ContactNotes();
35 $do_contact_notes->sessionPersistent("do_sharenotes", "index.php", 36000);
36 }
37 //echo $_SESSION['do_sharenotes'];
38 ?>
39 <?php $thistab = 'Welcome'; include_once('ofuz_navtabs.php'); ?>
40 <div class="content">
41 <script type="text/javascript">
42 //<![CDATA[
43 var openform;
44 function fnEditTask(task) {
45 if ($("#e"+openform).length > 0) fnCancelEdit(openform);
46 openform = task;
47 $.ajax({
48 type: "GET",
49 <?php
50 $e_editForm = new Event("Task->eventAjaxEditTaskForm");
51 $e_editForm->setEventControler("ajax_evctl.php");
52 $e_editForm->setSecure(false);
53 ?>
54 url: "<?php echo $e_editForm->getUrl(); ?>",
55 data: "id="+task,
56 success: function(html){
57 $("#t"+task).hide(0);
58 $("#e"+task)[0].innerHTML = html;
59 $("#e"+task).show(0);
60 }
61 });
62 };
63 function fnCancelEdit(task) {
64 $("#e"+task).hide(0);
65 $("#e"+task)[0].innerHTML = "";
66 $("#t"+task).show(0);
67 };
68 function fnTaskComplete(task) {
69 $.ajax({
70 type: "GET",
71 <?php
72 $e_editForm = new Event("Task->eventAjaxTaskComplete");
73 $e_editForm->setEventControler("ajax_evctl.php");
74 $e_editForm->setSecure(false);
75 ?>
76 url: "<?php echo $e_editForm->getUrl(); ?>",
77 data: "id="+task,
78 success: function(){
79 $("#t"+task).css("text-decoration", "line-through");
80 $("#t"+task).fadeOut("slow", function() {
81 $("#e"+task).remove();
82 $("#b"+task).remove();
83 });
84 }
85 });
86 };
87 $(document).ready(function() {
88 $("div[id^=notetext]").hover(function(){$("div[id^=trashcan]",this).show("fast");},function(){$("div[id^=trashcan]",this).hide("fast");});
89 });
90 //]]>
91 </script>
92 <div class="content">
93 <table class="main">
94 <tr>
95 <td class="main_left">
96 <!--<div class="col_pad_25">
97 <div class="sidebox1a"></div>
98 </div>-->
99 </td>
100 <td class="main_right">
101 <div class="mainheader">
102 <div class="pad20">
103 <span class="headline14">Share files and Notes</span>
104 </div>
105 </div>
106 <div class="contentfull">
107 Description comes here.......
108 <div class="dottedline"></div>
109 <?php
110 //checks if already Notes Shared (Url link is generated)
111 $portal_code = $_SESSION['do_sharenotes']->checkIfNotesShared($idcontact);
112 //generating an Event to create an unique URL link to Share Notes & Files
113 $e_generate_url = new Event("do_sharenotes->generateUrlToShareNotes");
114 $e_generate_url->addParam("idcontact",$idcontact);
115 $e_generate_url->addParam("goto", $_SERVER['PHP_SELF']);
116 //generating an Event to create an new unique URL link to Share Notes & Files
117 $e_generate_new_url = new Event("do_sharenotes->generateNewUrlToShareNotes");
118 $e_generate_new_url->addParam("idcontact", $idcontact);
119 $e_generate_new_url->addParam("goto", $_SERVER['PHP_SELF']);
120 //generating an Event to stop sharing the Notes & Files
121 $e_stop_sharing_notes = new Event("do_sharenotes->stopSharingNotes");
122 $e_stop_sharing_notes->addParam("idcontact", $idcontact);
123 $e_stop_sharing_notes->addParam("goto", $_SERVER['PHP_SELF']);
124
125 if($portal_code){
126 ?>
127 <div class="section">
128
129 <div>You have already shared Notes with <?php echo "<b>".$do_contact->firstname." ".$do_contact->lastname."</b>"; ?></div>
130 <div id="share_file_notes_url"> <b>contact portal</b> :
131 <?php echo "<a href='http://dev2.sqlfusion.com/ofuz3/contact_portal.php?pc=".$portal_code."'>http://dev2.sqlfusion.com/ofuz3/contact_portal.php?pc=".$portal_code."</a>"; ?>
132 </div>
133 <div id="share_file_notes_generate">
134 <?php echo $e_generate_url->getLink("resend access to my contact"); ?> : <?php echo $e_generate_new_url->getLink("Generate a new access"); ?> : <?php echo $e_stop_sharing_notes->getLink("Stop sharing"); ?>
135 </div>
136 </div>
137 <?php
138 } else{
139 ?>
140 <div class="section">
141 <?php
142 /*$e_generateUrl = new Event("do_sharenotes->generateUrlToShareNotes");
143 $e_generateUrl->addParam("idcontact",$idcontact);
144 $e_generateUrl->addParam("goto", $_SERVER['PHP_SELF']);*/
145
146 ?>
147 <div id="sharenotes" class="text8">
148 <?php echo $e_generate_url->getLink("Share Notes & Files with ")."<b>".$do_contact->firstname." ".$do_contact->lastname."</b>"; ?>
149 </div>
150 </div>
151 <?php } ?>
152 <div id="share_file_notes_msg"><?php if($_GET['msg']){ echo htmlentities($_GET['msg']);} ?></div>
153 <div class="bottompad40"></div>
154 </div>
155 </td>
156 </tr>
157 </table>
158 </div>
159
160 </body>
161 </html>
Something went wrong with that request. Please try again.