function isAuth()
 {
     $db = sf::getLib("db");
     $result = $db->fetch_first("SELECT * FROM " . $this->table . " WHERE `controller` = '" . router::getController() . "' AND method = '" . router::getMethod() . "'");
     if ($result) {
         if (sf::getPlugin("authentic")->isLogin($result['user_group_ids'])) {
             return true;
         } else {
             return false;
         }
     } else {
         $this->setController(router::getController());
         $this->setControllerName(router::getController());
         $this->setMethod(router::getMethod());
         $this->setUserGroupIds("1");
         $this->save();
         return false;
     }
 }
Esempio n. 2
0
		  <li><img src="<?php 
    echo site_path("up_files/" . $images[$i]);
    ?>
" width="150" height="100" alt="" /><input name="images[]" type="checkbox" checked="checked" value="<?php 
    echo $images[$i];
    ?>
" /></li>
		  <?php 
}
?>
		  </ul></td>
	    </tr>
        <tr>
          <th align="center">详细描述</th>
          <td colspan="3" align="center"><?php 
echo sf::getPlugin("Fckeditor", "content", $product->getContent(), '100%', 600)->create();
?>
</td>
        </tr>
        <tr>
          <td colspan="4" align="center"><input type="submit" name="button" id="button" value="保存资料" />
            <input name="id" type="hidden" id="id" value="<?php 
echo $product->getId();
?>
" />
            <input name="fromUrl" type="hidden" id="fromUrl" value="<?php 
echo getFromUrl();
?>
" /></td>
        </tr>
      </form>
Esempio n. 3
0
            是否发布 </label></td>
        </tr>
		<tr>
          <th align="right" width="80">封面图片</th>
          <td><input name="cover" type="text" id="cover" value="<?php 
echo $article->getCover();
?>
" onfocus="loadbox.load('<?php 
echo site_url("common/upload");
?>
',function(json){$('#cover').val(json[0].path);});" /></td>
        </tr>
        <tr>
          <th align="center">页面内容</th>
          <td align="center"><?php 
echo sf::getPlugin("Fckeditor", "content", $article->getContent(), '100%', 600)->create();
?>
</td>
        </tr>
        <tr>
          <td colspan="2" align="center"><input type="submit" name="button" id="button" value="保存资料" />
            <input name="id" type="hidden" id="id" value="<?php 
echo $article->getId();
?>
" />
            <input name="fromUrl" type="hidden" id="fromUrl" value="<?php 
echo getFromUrl();
?>
" /></td>
        </tr>
      </form>
Esempio n. 4
0
 function logout()
 {
     if (sf::getPlugin("authentic")->logout()) {
         $this->page_debug(lang::get("Has been logout!"), site_url("/"));
     }
 }
Esempio n. 5
0
          <td><?php 
echo $ad->getBrief();
?>
</td>
        </tr>
        <tr>
          <th align="right">广告属性</th>
          <td><?php 
echo $ad->getIsPublicStr();
?>
</td>
        </tr>
        <tr>
          <th align="center">广告代码</th>
          <td align="left"><?php 
echo '&lt;?=sf::getPlugin("AdPlugin")-&gt;generate(' . $ad->getId() . ')?&gt;';
?>
</textarea>
          </label></td>
        </tr>
        <tr>
          <th align="center">广告内容</th>
          <td align="left"><?php 
echo sf::getPlugin("AdPlugin")->generate($ad->getId());
?>
</td>
        </tr>
    </table>
  </div>
</div>
Esempio n. 6
0
" size="30" class="required"/></td>
		</tr>
		<tr>
          <th align="right" width="80">工作地点</th>
          <td><input name="work_address" type="text" id="work_address" value="<?php 
echo $job->getWorkAddress();
?>
" size="30" class="required"/>
          <em>*</em></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
		</tr>
		<tr>
          <th align="right" width="80">详细要求</th>
          <td colspan="3"><?php 
echo sf::getPlugin("Fckeditor", "content", $job->getContent(), '100%', 450)->create();
?>
</td>
        </tr>
        <tr>
          <th align="right">联系人</th>
          <td><label>
            <input name="linkman" type="text" id="linkman" value="<?php 
echo $job->getLinkman();
?>
" size="30" class="required"/>
          </label></td>
          <th>联系电话</th>
          <td><input name="linkman_phone" type="text" id="linkman_phone" value="<?php 
echo $job->getLinkmanPhone();
?>